Skip to content

Filtering Metrics

Vova Nekhai edited this page Jan 24, 2020 · 3 revisions

By applying such configuration, all metrics will be sent Anodot system.

global:
 scrape_interval: 60s
 evaluation_interval: 60s
remote_write:
 - url: "http://anodot-prometheus-remote-write:1234/receive"

To reduce metrics number, write_relabel_configs, should be applied.

Such configuration, will send to Anodot only metrics with label {job="envoy-stats"}

global:
 scrape_interval: 15s
remote_write:
  - url: "http://anodot-prometheus-remote-write:1234/receive"
    write_relabel_configs:
     - source_labels: [ job ]
       regex: 'envoy-stats'
       action: keep

Such configuration, will send to Anodot only metrics with name container_tasks_state or container_memory_failures_total

global:
 scrape_interval: 15s
remote_write:
  - url: "http://anodot-prometheus-remote-write:1234/receive"
    write_relabel_configs:      
     - source_labels: [__name__]
       regex: '(container_tasks_state|container_memory_failures_total)'
       action: keep
Clone this wiki locally