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

HAProxy monitoring: Ability to add HAProxy services with `pmm-admin [inventory] add [service] haproxy` command

Details

    • 3
    • Yes
    • Yes
    • Yes
    • [obsolete] C/S Core

    Description

      We should implement Management API and Inventory API for HAProxy.

      We should have the same level of support we have for ProxySQL. The only difference will be that we will use built-in support for prometheus metrics in HAProxy v2.

      Under the hood, pmm-admin add haproxy will add HAProxy Service (new Service type) and external exporter for that service. Connection checking is a must there.

      For testing we can use our repository:

      # percona-release enable pdpxc-8.0
      * Enabling the Percona Distribution for MySQL 8.0 - PXC repository
      <*> All done!
      
      # yum install -q -y percona-haproxy
      
      # haproxy -vv | grep Prometheus
      Built with the Prometheus exporter as a service

      Management API and Inventory APIs should have all endpoints and fields that External exporters does and should have the same logic as external exporters. With only one difference: agent type should be haproxy.

       

      Suggested implementation:

      • CLI
        • `pmm-admin add haproxy --address=<address> --listen-port=<port> --username=<username> --password=<password>`
        • `pmm-admin remove haproxy <service name>`
        • `pmm-admin inventory add service haproxy`
        • `pmm-admin inventory remove service haproxy <service name>`
        • Username and password usage is the same as for external exporters
        • Add flag for skip connection check

       

      How to test:
      Case 1 (pmm-admin add haproxy):

      • Setup HAProxy with built-in prometheus exporter
      • pmm-admin add haproxy
      • get list of services via CLI `pmm-admin list`
        • check if we have HAProxy service there and external exporter there
      • Check that we are getting metrics from HAProxy via Advanced Data Exploration dashboard in Grafana.
      • remove HAProxy via CLI

      Case 2 (pmm-admin inventory add service haproxy):

      • Setup HAProxy with built-in prometheus exporter
      • pmm-admin inventory add service haproxy
      • get list of services via CLI `pmm-admin list`
        • check if we have HAProxy service there
      • remove HAProxy via CLI

      DOC:

      • pmm-admin CLI reference manual
      • Description about adding HAProxy in documentation 

      Attachments

        Issue Links

          Activity

            People

              jiri.ctvrtka Jiří Čtvrtka
              nurlan.moldomurov Nurlan Moldomurov
              Votes:
              0 Vote for this issue
              Watchers:
              3 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 - 4 hours, 30 minutes
                  4h 30m

                  Smart Checklist