GridGain Developers Hub

Configuring Metrics

Metrics collection might affect the performance of an application. So, by default all metric sources are disabled.

Metrics Management

All metric management is performed through the GridGain CLI tool.

Checking Metric Sources and Enabled Metrics

The GridGain CLI tool can list all available metric sources:

node metric source list

This command lists all metric sources. To check the list of metrics, enable the metric source you need and then use the following command:

node metric list

This command will return the list of all currently available metrics, organized with their exporters.

Enabling Metric Sources

Metric sources are enabled on per-node basis. You can specify the node interact with by using the -u parameter to specify node URL or -n parameter to specify node name. For example, here is how you can enable jvm metric source:

node metric source enable -n=defaultNode jvm

Disabling Metric Sources

Metric sources are also disabled on per-node basis. You can specify the node interact with by using the -u parameter to specify node URL or -n parameter to specify node name. For example, here is how you can enable jvm metric source:

node metric source disable -n=defaultNode jvm

Accessing Metrics

You can work with metrics by using any external tool. To access the metrics, you need to enable the jmx exporter in cluster configuration:

cluster config update metrics.exporters.jmx.exporterName=jmx

After you do, monitoring tools will be able to collect enabled metrics from the node:

jmc metrics