hawkular / hawkular-openshift-agent

A Hawkular feed that collects metrics from Prometheus and/or Jolokia endpoints deployed in one or more pods within an OpenShift node.
16 stars 21 forks source link

be able to exclude metrics #154

Open jmazzitelli opened 7 years ago

jmazzitelli commented 7 years ago

Agent can be told to collect Jolokia MBeans using MBean patterns (e.g. domain:type=*). Agent can also be told to collect Prometheus metrics that are labeled (e.g. if a metric named "foo" is labeled, all labeled metrics are stored as different time series).

It would be nice to be able to tell the agent to exclude certain metrics. For example if a set of JMX MBeans are:

We should be able to tell the agent to exclude the "A" and "B" mbeans but still collect metrics from "one" and "two". So perhaps something like this can be in the config file (this is just a guess how it could be implemented, but you get the idea):

metrics:
- name: domain:type:*#*
  exclude:
  - type: A
  - type: B

We need to support being able to exclude based on multiple labels:

metrics:
- name: domain:type:*,subtype=*#*
  exclude:
  - type: A
    subtype: Aprime
  - type: B
    subtype: Bprime