The Prometheus Filter

The Prometheus Filter

Use this filter to configure the Prometheus metrics to be exposed for scraping.

The Prometheus Filter prevents metric flooding in the Prometheus host storage.

The filter is inclusive (whitelist-style) — you define which metrics to include. Only matching metrics will be exposed for scraping. Except in the situation where no Prometheus Filter exists or all existing Prometheus Filters are disabled, then all available metrics are exposed for scraping. The exception is MIM metrics from batch workflows. In the case of MIMs from batch workflows, no metrics will be collected unless there is a filter whitelisting them.

A Prometheus filter consists of one or many metric filters. Each metric filter has a Metric Name Filter and one or more Label Filters. A metric that passes at least one of the metric filters will be exposed for scraping.

Example of a Prometheus filter with one metric filter with no label filters.

Setting

Description

Setting

Description

Enabled

Whether this Prometheus Filter is enabled or not. 

Metric Name Filter

A filter is applied to the metric name.

Label Filter(s)

A label filter narrows down the metrics matched by the metric name filter by requiring specific label values.

Steps to add a Metric Name Filter

To add a metric name filter, take the following steps:

  1. Click the Add button. 
     

  2. In the dialog, enter a Metric Name Filter in a regular expression. 
     

  3. Optionally, specify one or more label filters by entering the Label along with a corresponding Label Value Filter in regular expression. 

  4. Click Add to add the metric filter.

  5. Click Close when done. 

Add Metric Name Filter dialog

In the above example, five metric filters are configured. See the description in the table below.

Setting

Label Value Filter

Description

Setting

Label Value Filter

Description

jvm_.*
java_.*
process_.*



Will give you Global statistics (JVM, processes, event management).

com_digitalroute_event.*



MIM metrics related to the event handling system.

com_digitalroute_wf_.*

workflow=Default.myWorkflow.*

Workflow MIM metrics for the workflows in the Default folder that have names beginning with "myWorkflow".