commit fb3262183102171da5704868d7522290b3a9ede4
Author: Nobuto Murata <email address hidden>
Date: Sun Mar 17 22:55:39 2024 +0900
Don't expect a static job name
A job name passed via the prometheus_scrape library doesn't end up as a
static job name in the prometheus configuration file in the COS world
even though COS expects a fixed string. Practically we cannot have a
static job name like job=ceph in any of the alert rules in COS since the
charms will convert the string "ceph" into:
Let's give up the possibility of the static job name and use "up{}" so
it will be annotated with the model name/ID, etc. without any specific
job related condition. It will break the alert rules when one unit have
more than one scraping endpoint because there will be no way to
distinguish multiple scraping jobs. Ceph MON only has one prometheus
endpoint for the time being so this change shouldn't cause an immediate
issue. Overall, it's not ideal but at least better than the current
status, which is an alert error out of the box.
The following alert rule:
> up{} == 0
will be converted and annotated as:
> up{juju_application="ceph-mon",juju_model="ceph",juju_model_uuid="UUID"} == 0
Reviewed: https:/ /review. opendev. org/c/openstack /charm- ceph-mon/ +/901826 /opendev. org/openstack/ charm-ceph- mon/commit/ fb3262183102171 da5704868d75222 90b3a9ede4
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit fb3262183102171 da5704868d75222 90b3a9ede4
Author: Nobuto Murata <email address hidden>
Date: Sun Mar 17 22:55:39 2024 +0900
Don't expect a static job name
A job name passed via the prometheus_scrape library doesn't end up as a
static job name in the prometheus configuration file in the COS world
even though COS expects a fixed string. Practically we cannot have a
static job name like job=ceph in any of the alert rules in COS since the
charms will convert the string "ceph" into:
> juju_MODELNAME_ ID_APPNAME_ prometheus_ scrape_ JOBNAME( ceph)-N
Let's give up the possibility of the static job name and use "up{}" so
it will be annotated with the model name/ID, etc. without any specific
job related condition. It will break the alert rules when one unit have
more than one scraping endpoint because there will be no way to
distinguish multiple scraping jobs. Ceph MON only has one prometheus
endpoint for the time being so this change shouldn't cause an immediate
issue. Overall, it's not ideal but at least better than the current
status, which is an alert error out of the box.
The following alert rule: application= "ceph-mon" ,juju_model= "ceph", juju_model_ uuid="UUID" } == 0
> up{} == 0
will be converted and annotated as:
> up{juju_
Closes-Bug: #2044062
Change-Id: I0df8bc0238349b 5f03179dfb8f4da 95da48140c7