Details
-
New Feature
-
Status: Done
-
Medium
-
Resolution: Done
-
None
-
None
-
2
-
Yes
-
Yes
-
Yes
Description
Since PMM-3177 we fully managed Prometheus configuration files. Manual edits are not supported. Some users want to be able to change generated configuration to add additional scrape jobs, configure remote storages, etc. Our APIs (including coming APIs for External exporters PMM-4478) solve part of the problem (additional scrape jobs), but not all of it (remote storages).
To solve this problem, we introduce a new file at /srv/prometheus/prometheus.base.yml. When pmm-managed starts the Prometheus file generation process, it should try to load this file first. If it is present and can be parsed, use it as a base for adding managed scrape jobs instead using the blank state as we do now:
https://github.com/percona/pmm-managed/blob/e74ff4d6c8d975a7fccf3605ecfd326bc462c245/services/prometheus/prometheus.go#L142-L157
Log error and continue as if this file is not present if it can't be read, parsed, etc.
No new API is needed now. prometheus.yml can be regenerated by container restart, pmm-managed restart, or SetSettings API call with an empty body.
QA: no Automated tests for now
DOC: Mention in FAQ section, no additional blog post and etc
Attachments
Issue Links
- relates to
-
PMM-5464 Update code copied from Prometheus to 2.16
-
- Done
-