summaryrefslogtreecommitdiffstats
path: root/tools/docker-compose/README.md
diff options
context:
space:
mode:
authorRebeccah <rhunter@redhat.com>2022-09-19 19:03:20 +0200
committerRebeccah <rhunter@redhat.com>2022-09-23 21:05:57 +0200
commit88f0ab0233d8a1c63595f47ae3cff8e6b687769e (patch)
treed99ff65f5e1d882251cb5385a8b6c4d640f46bf5 /tools/docker-compose/README.md
parentMerge pull request #12778 from keithjgrant/12542-schedule-exceptions (diff)
downloadawx-88f0ab0233d8a1c63595f47ae3cff8e6b687769e.tar.xz
awx-88f0ab0233d8a1c63595f47ae3cff8e6b687769e.zip
add new alert rule for when error rate is over a certain rate, also fix
typo in URL and in grafana alert rule Important learning: no newlines in rules/equations turns out datasourceUid can be set in prometheus_source.yml, and it can be anything we want. So I have set it to awx_alert, the PBFAnumbersetc value it was set to before was an autogenerated UID, and it would actually work just with that generated value, but because we want it to make sense, we're setting the value in prometheus_source.yml finally, update the docs to be reflective of grafana docs and how to export new rules a user might want to add. Co-authored-by: Elijah DeLee <kdelee@redhat.com>
Diffstat (limited to 'tools/docker-compose/README.md')
-rw-r--r--tools/docker-compose/README.md10
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/docker-compose/README.md b/tools/docker-compose/README.md
index 9080a6339b..585c2cd5bb 100644
--- a/tools/docker-compose/README.md
+++ b/tools/docker-compose/README.md
@@ -483,5 +483,11 @@ $ PROMETHEUS=yes GRAFANA=yes make docker-compose
### Alerts in Grafana
-We are configuring alerts in grafana using the provisioning files method. This feature is new in Grafana as of August, 2022. Documentation can be found: https://grafana.com/docs/grafana/latest/administration/provisioning/#alerting however it does not fully show all parameters to the config. One way to understand how to build rules is to build them in the UI and use chrometools to inspect the payload as you save the rules. It appears that the "data" portion of the payload for each rule is the same syntax as needed in the provisioning file config. To reload the alerts without restarting the container, from within the container you can send a POST with `curl -X POST http://admin:admin@localhost:3000/api/admin/provisioning/alerting/relo
-ad`. Keep in mind the grafana container does not default contain `curl` and you can get it with `apk add curl`.
+We are configuring alerts in grafana using the provisioning files method. This feature is new in Grafana as of August, 2022. Documentation can be found: https://grafana.com/docs/grafana/latest/administration/provisioning/#alerting however it does not fully show all parameters to the config.
+
+One way to understand how to build rules is to build them in the UI and use chrometools to inspect the payload as you save the rules. It appears that the "data" portion of the payload for each rule is the same syntax as needed in the provisioning file config. To reload the alerts without restarting the container, from within the container you can send a POST with `curl -X POST http://admin:admin@localhost:3000/api/admin/provisioning/alerting/reload`. Keep in mind the grafana container does not contain `curl`. You can install it with the command `apk add curl`.
+
+Another way to export rules is explore the api.
+1. Get all the folders: `GET` to `/api/folders`
+2. Get the rules `GET` to `/api/ruler/grafana/api/v1/rules/{{ Folder }}`
+