Alerts are duplicated because of the monitor external label

Bug #1914303 reported by Benjamin Allot
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Prometheus2 charm
New
Medium
Unassigned

Bug Description

* A few references on the issue:

  * https://www.robustperception.io/high-availability-prometheus-alerting-and-notification#more-3014
  * https://image.slidesharecdn.com/promcon-180811113528/95/taking-advantage-of-prometheus-relabeling-37-638.jpg?cb=1533987350

* The issue is that the prometheus.yml file is jinja2 templated in a weird way [0].
  The "monitor" label is based on the service name, which means that we cannot really aggregate this without the admin indicating what he wants to do with this label.
  Plus there is the question of the other external labels that can be set in extra.

  I don't see right away a good option to "fix" this. This software is just too complex to be smarter than "put the raw configuration in a juju config" path IMHO.

  The external label are usually used to avoid duplicates when a storage aggregate the metrics from several datacenters.
  I don't see the value of having an automatic external label that is set automatically based on the name of the service.

  I would suggest the following solution:

  * remove the "monitor" external label and let the juju config item external-labels be defined only by the `external-labels` config
  * add another alert-relabel-config juju items, that would include a string, getting the yaml that would be used to configure the section

[0]: https://git.launchpad.net/charm-prometheus2/tree/src/templates/prometheus.yml.j2#n7

Benjamin Allot (ballot)
description: updated
Revision history for this message
Junien F (axino) wrote :

Why remove the "monitor" label ? When you have multiple apps deployed, I think it's useful to have it.

I feel like just allowing the user, via a juju config option, to configure alert relabeling would be enough here ?

Benjamin Allot (ballot)
description: updated
description: updated
Edin S (exsdev)
Changed in charm-prometheus2:
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.