Java applications export a wealth of monitoring metrics and information over the standard Java Management Extensions interface. Jolokia, on the other hand, is a HTTP/REST interface for accessing this information remotely. Jolokia is the fourth metrics integration support by Aiven after Aiven InfluxDB & Grafana, Datadog and Prometheus.

Enabling Jolokia endpoint in Aiven

To enable Jolokia integration for Aiven services you first need to create a new Jolokia endpoint configuration. This can be created from the Service Integrations page. You only need to specify a display name for the configuration and the system will automatically generate username and password for authentication. In most cases, you can re-use the same Jolokia endpoint configuration for all services within a project.

Next, to finally enable Jolokia integration, you need to go to the Service Overview page of each service you want to enable the integration for. Click the Manage Integrations button next to Service Integrations and then select Jolokia from the popup. After finishing the wizard the system will configure the endpoint on all nodes of the service that provide access to the metrics.

Aiven Jolokia intergration is configured to allow HTTP POST request to read values from the service specific metrics. Bulk requests are supported for batch collection as well. For further information on the protocol, can refer to Jolokia documentation.

Please do note that many of the metrics are specific to a Kafka broker or Cassandra cluster node, so you may need to query each individual node for the full picture.

Here's a quick example of a CURL request. The CA certificate can be downloaded on the Service Overview page or alternatively or with the Aiven command line client: avn project ca-get. The file is identical for all endpoints and services in the same project.

curl --cacert project-ca.crt \
    -X POST \
    https://jolbpko8:PWD@HOST_IP:6733/jolokia/  \
    -d \
'{"type":"read","mbean":"kafka.server:type=ReplicaManager,name=PartitionCount"}'
Did this answer your question?