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.
- 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:
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.