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

Prometheus metrics for Inventory data

    XMLWordPrintable

    Details

    • 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

      Description

      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.

        Smart Checklist

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  Created:
                  Updated:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - Not Specified
                    Not Specified
                    Logged:
                    Time Spent - 27 minutes
                    27m