Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non configured tags #64

Open
mwringe opened this issue Dec 9, 2016 · 1 comment
Open

Non configured tags #64

mwringe opened this issue Dec 9, 2016 · 1 comment

Comments

@mwringe
Copy link
Contributor

mwringe commented Dec 9, 2016

Right now, most of our tags require that they be specified in the agents global setting or in the metric setting.

But, there are things like the description tag which get brought in from the Prometheus endpoint directly. To keep things consistent, these should also be required to be specified in the tag definition somewhere.

I would expect to have to specify it somewhere like here: https://github.com/hawkular/hawkular-openshift-agent/blob/master/deploy/openshift/hawkular-openshift-agent-configmap.yaml#L15

We may also want to consider this as well for things like 'units' (mainly just to control things like naming and to keep it consistent with other tags).

We may also want to specify in that file the behaviour of empty tags. If a tag does not have a value, should it still be added? should it have an empty/null value?

@jmazzitelli
Copy link
Contributor

But, there are things like the description tag which get brought in from the Prometheus endpoint
directly. To keep things consistent, these should also be required to be specified in the tag definition
somewhere.

We would use:

tags:
  description: ${METRIC:description}

NOTE: we need to fix the PR so the description is set correctly. See my comment in PR #62.

The metric description would either come automatically from Prometheus (and Jolokia if JMX has description data for MBeans, I have to research that, I'm pretty sure JMX does support something like this) or a user can define their own description explicitly (which today is the only way to get descriptions for Jolokia metrics and for the times when a Prometheus metric has no HELP text available - this is the way we allow a user to define one).

metrics:
- name: my_prom_metric
  description: This is the description of my_prom_metric. It explains that this metric is.

We can do the same for "units":

metrics:
- name: my_prom_metric
  description: This is the description of my_prom_metric. It explains that this metric is.
  units: kHz

In the agent global config we can then have:

tags:
  description: ${METRIC:description}
  units: ${METRIC:units}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants