-
Type:
Improvement
-
Status: Done
-
Priority:
Medium
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: 2.3.0
-
Component/s: PMM ManageD
-
Labels:None
-
Story Points:5
-
Epic Link:
-
Sprint:Platform Sprint 8, Platform Sprint 9
-
Needs Review:Yes
-
Needs QA:Yes
-
Needs Doc:No
DoD
- GetSettings and ChangeSettings APIs work with AlertManager configuration.
Implementation
- Add AlertManager address (a single string) to Settings.
- Expand ChangeSettings API to set (string) or remove (boolean flag) AlertManager address, and to set (a string with content) or remove (boolean flag) rules file.
- Expand GetSettings API to return those values.
- Put this file into a temporary location and check it with promtool. If it's ok, put a file on the filesystem in a fixed location /srv/prometheus/rules/pmm.rules.yml (that path is already added to prometheus.yml generator) and reload Prometheus.
- Try to chmod this file. If it fails, log error and continue.
- Do not store rules in the database.
Discussion
- We don't have "upload file" fields.