This is a prerelease version.

View latest

Prometheus Exporter

Hazelcast Management Center can expose the metrics collected from cluster members to Prometheus. This feature can be turned on by setting the system property to true.

Prometheus can be configured to scrape Management Center in prometheus.yml as follows:

  - job_name: 'HZ MC'
    # scheme defaults to 'http'.
    - targets: ['localhost:8080'] # replace this address with the network address of Hazelcast Management Center

After starting Prometheus with this configuration, all metrics will be exported to Prometheus with the hz_ prefix. The metrics are also available via the member JMX API. With the default configuration, Management Center exports all metrics reported by the cluster members. Since it can be overly verbose for some usecases, the metrics can be filtered with the or the system properties, both being comma-separated lists of metric names.

Example of starting Management Center with specifying the metrics exported to Prometheus:

java -jar \,hz_map_totalPutLatency \
  -jar hazelcast-management-center-5.1-SNAPSHOT.jar

Example of starting Management Center with specifying the metrics to be excluded from the Prometheus export:

java -jar \,hz_memory_freeHeap \
  -jar hazelcast-management-center-5.1-SNAPSHOT.jar

By default, Prometheus connects via the same IP and port as the Management Center web interface. It is possible to override the port number using the system property. Let’s say you have started Management Center as shown below:

java -jar \ \
  -jar hazelcast-management-center-5.1-SNAPSHOT.jar

Then, the Prometheus endpoint will be available at http://localhost:2222/metrics, which should be reflected by the Prometheus configuration as below:

  - job_name: 'HZ MC'
    - targets: ['localhost:2222']
If you want to visualize the Prometheus metrics using Grafana, then you can start with this dashboard.


Starting from Management Center 5.0, the Prometheus Exporter supports basic authentication, to secure the scrape endpoint.

First, you need to set it up using the following MC-Conf command: set prometheus-auth <my-user> <my-pass>

Then, you need to configure Prometheus as follows:

  - job_name: 'HZ MC'
    - targets: ['localhost:8080']
      username: my-user
      password: my-pass

You can reset the authentication with the security reset command, which will also delete all users from the database.