JMX Monitoring

Saagie includes a pre-installed monitoring system. Its role is to expose JMX metrics for components created by Saagie that run on a Java Virtual Machine (JVM). The JMX metrics are exposed through the Saagie HTTP API using Jolokia. When installing Saagie, you can enable the exposition of these metrics via the Saagie HTTP API.

If you installed Saagie without enabling JMX monitoring and would like to enable it now, contact Saagie.

1. Exposed components

Each exposed component is available via its own HTTP path. The jmx Kubernetes Ingress of the saagie-common namespace contains a list of all available paths.

To list all available paths, use this command line:

kubectl -n saagie-common get ingress jmx -o jsonpath='{range .spec.rules[*].http.paths[*]}{.path}{"\n"}{end}'

Your result should look like this:


Each path has a corresponding pod; some names differ slightly.

2. Jolokia credentials

When installing Saagie, you are given the option to provide your Jolokia username and password. If no credentials are provided, they will be generated automatically by the installer. Credentials can be recovered from the jolokia Kubernetes secret, which contains the Jolokia configuration file.

Use this command line to extract your configuration file:

kubectl -n saagie-common get secret jolokia -o jsonpath='{\.properties}' | base64 -d

Your result should look like this, where user and password are your credentials:


3. How to collect JMX metrics

Collect JMX metrics using an HTTP call.

The following example uses curl to get the memory consumption of the projects-and-jobs JVM. <saagie_host> is your Saagie host and <jokolia_user> and <jokolia_password> are your Jokolia login credentials.

curl https://<saagie_host>/jmx/projects/ -u <jokolia_user>:<jokolia_password> -XPOST -d '{"type":"read","mbean":"java.lang:type=Memory","attribute":"HeapMemoryUsage"}'

Your result should look like this:


Refer to Jolokia documentation to learn more about requesting Jolokia.