Actian Monitor > Using Actian Monitor > Metrics > Creating Custom Metrics
Was this helpful?
Creating Custom Metrics
You can create your own metrics to track by adding metric definitions to ‘actianmonitor-custom-metrics.yaml’ located in your installation’s config directory. To enable this feature, edit the ‘docker-compose.yaml’ and remove the # in front of the line:
#- ./config/actianmonitor-custom-metrics.yaml:/home/actian/custom-metrics.yaml
Custom metrics are only read during startup. Actian Monitor will need to be restarted (i.e. docker compose down / docker compose up) after editing the file.
The docker log will indicate which custom metrics have been loaded. For example, if you enable these example customer metrics, expect to see these corresponding log entries during the Actian Monitor startup:
actianmonitor | 2026-01-26 19:10:08,870 INFO : [main] ActianMonitorConfig : Loading custom metrics from /home/actian/custom-metrics.yaml
actianmonitor | 2026-01-26 19:10:08,970 INFO : [main] ClientResponder : Added custom metric producer df
actianmonitor | 2026-01-26 19:10:08,970 INFO : [main] ClientResponder : Added custom metric producer procstat
actianmonitor | 2026-01-26 19:10:08,976 INFO : [main] ClientResponder : Added custom metric producer vm
If there are any errors in the custom metric YAML file, these will display in the docker compose log (the Actian Monitor log file is also stored the logs directory) and the Actian Monitor will not start.
actianmonitor | 2026-01-26 19:13:29,691 INFO : [main] ActianMonitorConfig : Loading custom metrics from /home/actian/custom-metrics.yaml
 
actianmonitor | 2026-01-26 19:13:29,696 ERROR: [main] ActianMonitor : Error reading configuration (Cannot create property=dd for JavaBean=com.actian.monitor.config.CustomMetrics@6572421
actianmonitor | in 'reader', line 8, column 1:
actianmonitor | dd:
actianmonitor | ^
actianmonitor | Unable to find property 'dd' on class: com.actian.monitor.config.CustomMetrics
actianmonitor | in 'reader', line 8, column 4:
actianmonitor | dd:
actianmonitor | ^
actianmonitor | )
Metric Producer parameters and descriptions:
Parameter
Description
name
Name of this producer, used by the otel-agent in OTel metric names
units
Parse can use ‘regex’, ‘template’, or ‘value’.
description
The linux command to execute.
refresh_rate
Rate in seconds that this metric will be re-read by the agent.
Metrics parameters and descriptions:
Parameter
Description
name
Name of this metric, it is also used in the regex to pull out the value.
units
The OTel metric units.
description
The OTel metric description.
type
The metric value type, either ‘long’ or ‘double’..
It is required that the regex can extract values and attributes when parse=regex . This can generate multiple metrics with different attributes if the commmand returns multiple output lines.
Note:  We do not check and/or error out if there are duplicate metrics/attribute tuples
Example regex: "^(?<filesystem>\\S+)\\s+\\d+\\s+\\d+\\s+(?<available>\\d+)\\s+\\S+\\s+(?<mounted>.*+)$"
Metrics can also have a list of attribute names. These should each have a corresponding group name in the regex. It is not considered an error if an attribute is not supplied.
Last modified date: 01/29/2026