From f906eef5b2b1a19b5b32abf61fcc5b09b5e2457e Mon Sep 17 00:00:00 2001 From: anantharam Date: Mon, 11 Nov 2024 13:49:20 +0530 Subject: [PATCH] add steps to add new alerts for servers --- argocd-helm-charts/prometheus-linuxaid/Readme.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/argocd-helm-charts/prometheus-linuxaid/Readme.md b/argocd-helm-charts/prometheus-linuxaid/Readme.md index 65a43140..fa617351 100644 --- a/argocd-helm-charts/prometheus-linuxaid/Readme.md +++ b/argocd-helm-charts/prometheus-linuxaid/Readme.md @@ -40,10 +40,19 @@ mysql: https://github.com/percona/grafana-dashboards/blob/main/dashboards/MySQL/ * grafana pvc is not supported https://github.com/grafana/grafana-operator/issues/296 * grafana resource as well, the crd seems to be little broken when grafana guys migrated from v4 to v5 - ## How to test new rule + ```sh cd argocd-helm-charts/prometheus-linuxaid docker run -ti --rm -v $(pwd):/etc/prometheus/:ro --entrypoint /bin/promtool prom/prometheus test rules /etc/prometheus/tests/${NEW_RULE}.yaml ``` + +## Steps to create new alert for servers + +* add alert rule and test files in `rules` and `tests` directory in [`argocd-helm-charts/prometheus-linuxaid`](../prometheus-linuxaid/) +* add `PrometheusRule` template in [`argocd-helm-charts/prometheus-linuxaid/templates`](./templates/) +* enable the monitoring in LinuxAid in +[`modules/enableit/monitor/manifests/system`](https://gitea.obmondo.com/EnableIT/LinuxAid/src/branch/master/modules/enableit/monitor/manifests/system) by creating a +new file f.ex [dns.pp](https://gitea.obmondo.com/EnableIT/LinuxAid/src/branch/master/modules/enableit/monitor/manifests/system/dns.pp)(if it doesn't exist) +* set prometheusRule value to true in value file, f.ex [for dns alerts](https://gitea.obmondo.com/EnableIT/KubeAid/src/branch/master/argocd-helm-charts/prometheus-linuxaid/values.yaml#L28)