Skip to main content

Metrics filtering

The agent supports allowing and denying metrics. For a metric to be collected, it needs to be explicitly allowed and not denied. In other words, deny takes precedence over allow.

The number of metrics (default and custom) you can send to the Bleemeo API is limited by your plan (see invoice for more information regarding custom metrics). You should only send metrics that are important to you.

To configure filters, you need to use the metric field in the configuration:

metric:
allow_metrics:
- cpu_used
- node_cpu_seconds_*
- { __name__="process_count", instance="my_instance" }
deny_metrics:
- node_cpu_seconds_global
include_default_metrics: true

Each line in allow or deny list is either:

  • a simple metric name. Without {} or *. The metric name must exactly match this name.
  • a pattern, using * but without {}. The * wildcard represents any number of any character (or no character). Useful for prefix.
  • a PromQL metric selector, whichs allow to filter on labels.

When include_default_metrics is set to true (the default or in the configuration file), filters for default metrics are dynamically generated. The list of default metrics can be found on each metric sources pages.

Available metrics​

To find the metrics you can allow, you may use the agent local metric endpoint. For instance, you can use curl on the server the agent is running:

curl 'http://localhost:8015/metrics?noFilter'| less

This endpoint shows all metrics gathered by the agent without any filtering.