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:

/jmx/projects/
/jmx/jobchestrator/
/jmx/conforama/
/jmx/phagocytor/
/jmx/platform-controller/
/jmx/scredz/
/jmx/auth/
/jmx/authentication/
/jmx/idmacl/
/jmx/profile/
/jmx/security/
/jmx/settings/
/jmx/traefik-ingress-bouncer/
/jmx/governance/
/jmx/dataset-access/
/jmx/rule-manager/

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='{@.data.jolokia\.properties}' | base64 -d

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

port=7777
host=0.0.0.0
user=<your_username>
password=<your_password>
discoveryEnabled=false

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:

{"request":{"mbean":"java.lang:type=Memory","attribute":"HeapMemoryUsage","type":"read"},"value":{"init":83886080,"committed":227393536,"max":1297481728,"used":152818440},"timestamp":1582287246,"status":200}

Refer to Jolokia documentation to learn more about requesting Jolokia.