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

need a more unique description tag #131

Closed jmazzitelli closed 7 years ago

jmazzitelli commented 7 years ago

Right now, the OpenShift UI needs to look at the tag "description" to label the graphs. When HOSA writes Prometheus metrics to H-Metrics, the "description" is the "help" text for the metric family that the metric belongs to. This is not good enough because there can be N time series data for that metric family description (N == the number of unique combinations of label values per metric family).

We need a more unique description so the UI graphs can uniquely identify the time series that is being displayed.

Example of the problem:

Suppose I have a Prometheus endpoint that emits these two metrics (notice they both belong to the same metric family name "total_meals_served"):

#HELP total_meals_served The total number of meals served
#TYPE total_meals_served counter
total_meals_served{food=steak}  10  1395066363000
total_meals_served{food=pasta}   5  1395066363000

The OpenShift UI will show two graphs for these two time-series metrics, but both will be labeled The total number of means served. We can't tell which graph shows the steak meals and which show the pasta meals.

We need a better description that can incorporate the label and their values.

jmazzitelli commented 7 years ago

I will try to get this to work (I almost have it now). If no description is explicitly defined in the metrics: section of the config, the Prometheus description is used with the label/value pairs appended at the end, comma-separated and enclosed in curly braces. So to follow the example earlier, the descriptions should look like total_meals_served {food=steak} and total_meals_served {food=pasta}