Skip to main contentMerative SPM on Kubernetes

Monitoring performance using JMX statistics

What is Cúram JMX?

Cúram JMX statistics provides operational data from a running Merative Social Program Management (SPM) application. JMX statistics for use with a traditional application server.

For more information about JMX statistics, see the Social Program Management Cúram JMX Configuration Guide.

The Social Program Management PDF documentation is available to download from Merative Support Docs.

Cúram JMX Kubernetes Limitations

Cúram JMX statistics behave similarly in Kubernetes, but have the following limitations: Using the Administration Application

  • Access by using the SPM Administration Application is not supported because:
    • Not all pods have the requisite SPM client installed, which means JMS performance is unavailable using this access mechanism.
    • The reverse proxy nature of Kubernetes means that even for the pods with clients installed, identifying the correct target server would be difficult.

Therefore, for Kubernetes you are restricted to using the timer-based access method. For more information about JMX statistics, see Using the JMX timer in the Social Program Management Cúram JMX Configuration Guide.

Cúram JMX timer-based statistics on Kubernetes

This mechanism writes the JMX statistics periodically at a file system location. The advantage of this mechanism is that it can be used for collecting statistics from every server in an environment

The primary properties used to configure timer-based statistics are integrated into the Helm Charts.

A prerequisite for using timer-based SPM JMX statistics is to override global.apps.common.persistence.enabled=true.

You must also consider the other persistence-related settings and configure them appropriately.

Cúram JMX statistics persisteance

Persistence is required for timer-based statistics because the non-permanent nature of pods means that as they come and go, you might need statistics from an earlier execution.

Enable timer-based JMX statistics with a global.apps.common.persistence.jmxstats.enabled=true override. Once configured, the following SPM properties are added to the Liberty pod jvm.options files with the defaults shown:

-Dcuram.jmx.output_statistics_timer_enabled=true
-Dcuram.jmx.output_statistics_timer_folder=/tmp/jmx/
-Dcuram.jmx.output_statistics_timer_period=60000

You can override the value of the timer period by using global.apps.common.persistence.jmxstats.timerPeriod where the value is specified as the number of milliseconds between each timer. For example, 60000 = 1 minute.

Inside the specified timer folder are the statistics XML files, named with a datetimestamp and pod name.

For example:202009171025363411@bugsbunny-apps-curam-producer-6c9bf7dc46-snw4w-1661122509.xml

Considerations

  • The default of 1 minute for the timer period might be too short because over an extended time, depending upon the amount of application activity, the persistent storage could be exhausted.

    • Consider also the length of time a pod will run; if the timer period is too short, data since the last timer period is lost.
  • No timer-based statistics are generated until the first login or JMS message is processed.

  • Turn off statistics for running pods by editing the configmaps where -Dcuram.jmx.output_statistics_timer_enabled=true is set, changing the value to false, and restarting the pods. For example:

    • Use the kubectl get configmaps command to list all the configmaps.
    • The configmaps you need to change are those named with *-jvm-override-* and the number and names of the configmaps vary depending on your configuration.
    • For each configmap, use the kubectl edit configmap command to change the curam.jmx.output_statistics_timer_enabled setting to false.
    • Use the kubectl delete pod command for each of the application producer and consumer pods that have a corresponding application name to the configmap.
    • On restart the new pod no longer generates statistics files.
  • By default, statistics are accumulated over the life of a pod; therefore, the last file generated is a superset of all the other files for that pod, therefore and you should only need the latest file.

    • There is a property to change this behavior so each period resets the statistics, but then you would have to address how to amalgamate the data and make sense of it; so,changing this is not recommended.
  • In support of EJB timers, IBM WebSphere Liberty dynamically creates three tables each time a pod starts; a PART, PROP, and TASK table.

    • The amount of data in these tables is small; but, over time could result in a large number of these tables in your database.
    • You should monitor these tables and drop those for pods that no longer exist.
    • These tables are prefixed with EJBTIMER_, followed by the pod name. For example, for the bugsbunny-apps-curam-consumer deployment, the following three tables were created for a single pod:
    EJBTIMER_BUGSBUNNY_APPS_CURAM_CONSUMER_786586FD5F_BGMGWPART
    EJBTIMER_BUGSBUNNY_APPS_CURAM_CONSUMER_786586FD5F_BGMGWPROP
    EJBTIMER_BUGSBUNNY_APPS_CURAM_CONSUMER_786586FD5F_BGMGWTASK

    In the context of Kubernetes pods, if the JMX and Liberty metrics are being made available from the pods by the JMX Exporter to be scraped by Prometheus, the following rules file may be employed to ensure that the metrics are surfaced and labelled appropriately.