Comment 13 for bug 2044062

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-ceph-mon (master)

Reviewed: https://review.opendev.org/c/openstack/charm-ceph-mon/+/901826
Committed: https://opendev.org/openstack/charm-ceph-mon/commit/fb3262183102171da5704868d7522290b3a9ede4
Submitter: "Zuul (22348)"
Branch: master

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:

    > 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:
    > up{} == 0
    will be converted and annotated as:
    > up{juju_application="ceph-mon",juju_model="ceph",juju_model_uuid="UUID"} == 0

    Closes-Bug: #2044062

    Change-Id: I0df8bc0238349b5f03179dfb8f4da95da48140c7