From a5027e37ec1856b92e2af3fd19e23af537d040af Mon Sep 17 00:00:00 2001 From: Nizamudeen A Date: Mon, 25 Sep 2023 18:58:06 +0530 Subject: [PATCH] mgr/dashboard: fix broken alert generator Currently the alert generator is broken if you try to run `tox -ealerts-fix`. I fixed it and ran the command and it built a new json file as well. Signed-off-by: Nizamudeen A --- monitoring/ceph-mixin/README.md | 6 ++++++ monitoring/ceph-mixin/alerts.jsonnet | 2 +- monitoring/ceph-mixin/jsonnetfile.lock.json | 2 +- monitoring/ceph-mixin/prometheus_alerts.libsonnet | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/monitoring/ceph-mixin/README.md b/monitoring/ceph-mixin/README.md index 4772021939e..f34d67f92a0 100644 --- a/monitoring/ceph-mixin/README.md +++ b/monitoring/ceph-mixin/README.md @@ -73,4 +73,10 @@ The jsonnet code located in this directory depends on some Jsonnet third party libraries. To update those libraries you can run `jb update` and then update the generated files using `tox -egrafonnet-fix`. +### Building alerts from `prometheus_alerts.libsonnet` + +To rebuild the `prometheus_alerts.yml` file from the corresponding libsonnet, +you can run `tox -ealerts-fix`. + + ##### Any upgrade or downgrade to different major versions of the recommended tools mentioned above is not supported. diff --git a/monitoring/ceph-mixin/alerts.jsonnet b/monitoring/ceph-mixin/alerts.jsonnet index ab7907c76fd..13e70179f14 100644 --- a/monitoring/ceph-mixin/alerts.jsonnet +++ b/monitoring/ceph-mixin/alerts.jsonnet @@ -1 +1 @@ -std.manifestYamlDoc(((import 'config.libsonnet') + (import 'alerts.libsonnet')).prometheusAlerts, indent_array_in_object=true, quote_keys=false) +std.manifestYamlDoc((import 'mixin.libsonnet').prometheusAlerts, indent_array_in_object=true, quote_keys=false) diff --git a/monitoring/ceph-mixin/jsonnetfile.lock.json b/monitoring/ceph-mixin/jsonnetfile.lock.json index 3c9d38d935c..480438230f3 100644 --- a/monitoring/ceph-mixin/jsonnetfile.lock.json +++ b/monitoring/ceph-mixin/jsonnetfile.lock.json @@ -8,7 +8,7 @@ "subdir": "grafonnet" } }, - "version": "30280196507e0fe6fa978a3e0eaca3a62844f817", + "version": "a1d61cce1da59c71409b99b5c7568511fec661ea", "sum": "342u++/7rViR/zj2jeJOjshzglkZ1SY+hFNuyCBFMdc=" } ], diff --git a/monitoring/ceph-mixin/prometheus_alerts.libsonnet b/monitoring/ceph-mixin/prometheus_alerts.libsonnet index a7c994ba9b6..b90573be6c0 100644 --- a/monitoring/ceph-mixin/prometheus_alerts.libsonnet +++ b/monitoring/ceph-mixin/prometheus_alerts.libsonnet @@ -236,7 +236,7 @@ annotations: { documentation: 'https://docs.ceph.com/en/latest/rados/operations/health-checks#device-health-toomany', summary: 'Too many devices are predicted to fail, unable to resolve%(cluster)s' % $.MultiClusterSummary(), - description: 'The device health module has determined that devices predicted to fail can not be remediated automatically, since too many OSDs would be removed from the cluster to ensure performance and availabililty. Prevent data integrity issues by adding new OSDs so that data may be relocated.', + description: 'The device health module has determined that devices predicted to fail can not be remediated automatically, since too many OSDs would be removed from the cluster to ensure performance and availability. Prevent data integrity issues by adding new OSDs so that data may be relocated.', }, }, { -- 2.39.5