Metric labels enable users to filter metrics efficiently in the Graphs Dashboard. This functionality is available for all G1 and G2 metrics from Agent version 19.0.0.
To configure metric labels, follow the steps below:
Step 1: Create a Metric Configuration YAML File
Create a configuration file named MetricLabel_config.yaml
in the agent/conf
folder using the following format:
Explanation of YAML Fields
resource_level_labels
: These labels apply to all metrics sent by the Agent.metrics_specific_labels
: Labels specific to particular metrics (supports regex format).common_metric_labels
: Labels common across all instances of a particular metric.instance_name labels
: Labels specific to individual metric instances (supports regex format).
Step 2: Restart the Agent
After configuring the MetricLabel_config.yaml
file, restart the Agent. Any changes to the file require an Agent restart to take effect.
Example Configuration File
Here is an example configuration file: