[infra] sync prometheus configuration template with production changes#722
[infra] sync prometheus configuration template with production changes#722vivekgsharma merged 1 commit intov1.0-devfrom
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughThe Prometheus configuration template was updated to replace hardcoded intervals and timeouts with configurable variables, introduce external labels, and enable dynamic generation of scrape jobs and targets. Conditional logic now defines jobs based on inventory groups and supports additional custom jobs via variables, enhancing flexibility and parameterization. Changes
Sequence Diagram(s)sequenceDiagram
participant Ansible
participant Prometheus Template (Jinja2)
participant Inventory/Vars
Ansible->>Prometheus Template (Jinja2): Render with variables and inventory
Prometheus Template (Jinja2)->>Inventory/Vars: Fetch intervals, timeouts, labels, job configs
Prometheus Template (Jinja2)->>Prometheus Template (Jinja2): Conditionally define jobs (self, group-based, additional)
Prometheus Template (Jinja2)-->>Ansible: Rendered prometheus.yml with dynamic jobs and targets
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Description:
Issue being fixed or feature implemented
The prometheus.yml.j2 template was outdated compared to the manual changes that had been applied directly on the metrics server. This meant future deployments would overwrite the working production configuration and potentially break Grafana dashboards and monitoring.
What was done?
How Has This Been Tested?
Breaking Changes
None.
Checklist:
Summary by CodeRabbit
New Features
Improvements