Uploaded image for project: 'Percona Monitoring and Management'
  1. Percona Monitoring and Management
  2. PMM-3387

Prometheus custom configuration is now supported by PMM Server.

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Done
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 2.4.0
    • Component/s: PMM ManageD
    • Labels:
      None
    • Story Points:
      2
    • Sprint:
      Platform Sprint 10, Platform Sprint 11
    • Needs Review:
      Yes
    • Needs QA:
      Yes
    • Needs Doc:
      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

        Smart Checklist

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                Unassigned
                Reporter:
                alexey.palazhchenko Alexey Palazhchenko
                Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - Not Specified
                    Not Specified
                    Logged:
                    Time Spent - 1 day, 5 hours, 11 minutes
                    1d 5h 11m