-
Type:
New Feature
-
Status: Open
-
Priority:
High
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: PMM ManageD
-
Labels:
-
Story Points:3
pmm-managed should expose Inventory information about Nodes, Services, and Agents as Prometheus metrics. That will help us create more robust and simple PromQL queries in our Grafana dashboards.
Implementation
- Expose inventory metrics on a separate endpoint /metrics/inventory on debug server.
- Make Prometheus scrape them every 5 seconds with a timeout of 4 seconds.
- Get Inventory data in a single transaction.
- Expose metrics for all objects like that:
nodes{node_id="123…", node_type="…", custom_foo="bar", …} 1 nodes{node_id="456…", node_type="…", custom_foo="bar", …} 1 services{…} 1 agents{…, disabled="1"} 1 agents{…, disabled="0"} 1 agents{…, disabled="1"} 0 agents{…, disabled="0"} 0
Add all unified labels to all metrics (use UnifiedLabels() methods on Node, Service and Agent models).
disabled label for agents contains 1 if it is disabled, 0 if it is enabled.
The value of the agents metric is 1 if this Agent's pmm-agent is connected, 0 if not.
- relates to
-
PMM-4562 MongoDB and MySQL registered instances with empty cluster labels (--environment=<label>) were not visible in the dashboard despite being added instances.
-
- Done
-
-
PMM-4756 Dashboards were not showing services with empty environments.
-
- Done
-
-
PMM-5340 The Scraping Time Drift graph on the Prometheus dashboard was showing wrong values because the actual metrics resolution wasn't taken into account
-
- Done
-