PMDAHAPROXY(1)

πŸ“¦
version 7.2.2 Β· 3 versions
, in arch rolling, centos-stream 10, centos-stream 9, debian trixie, fedora 43, fedora 44, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– PMDAHAPROXY(1) β€” the HAProxy PMDA, bestie edition πŸ’–

okay so real talk, this is the manual for pmdahaproxy, living in the General Commands Manual section of your friendly neighbourhood PCP docs. buckle up πŸŽ€


✨ NAME ✨

pmdahaproxy β€” HAProxy PMDA 🐝


🌸 DESCRIPTION 🌸

So pmdahaproxy is a Performance Metrics Domain Agent (PMDA), and its whole thing β€” its moment, its main character era β€” is pulling live performance data straight out of an HAProxy statistics socket or URL. no cap. πŸ’…

By default, the HAProxy stats socket is the vibe used to retrieve the metric. But if you set the optional URL option (scroll down, it's in the config section, iykyk), then the HAProxy URL is used instead. pick your fighter. πŸ¦‹

Heads up bestie: for the actual detailed description of each metric, go read the HAProxy documentation. that's not this page's job, this page is just the connector. 🫢

πŸ‘‘ INSTALLATION πŸ‘‘

pmdahaproxy reads an optional ini-style configuration file:

  • $PCP_PMDAS_DIR/haproxy/haproxy.conf

This file can contain, in its [pmda] section, overriding values for the following PMDA options:

  • user
  • socket

By default, root and /var/lib/haproxy/stats are used as the values for these options, respectively. yes literally those two, in that order, that's the default pairing periodt.

The [pmda] section can also contain these parameters:

  • url
  • auth
  • pass

When the url option is defined, a URL connection to HAProxy is used instead. 🌈 And just so you know what you're feeding it: pmdahaproxy expects CSV data from the HAProxy URL. an example of a compatible URL is:

http://127.0.0.1:9000/?stats;csv
⚠️ Real talk, don't skip this: the HAProxy statistics socket and/or URL need to be separately enabled in the HAProxy configuration file. pmdahaproxy can't manifest them out of thin air, that's not the vibe. please refer to the HAProxy configuration documentation for details. πŸ’€

Depending on your system and your HAProxy configuration, using a non-root user may also be possible β€” especially with URL based connections. so that's an option if you're feeling independent. ✨

Once the needed setup is ready, you can test the connection and install the PMDA to enable access to the names and values for the HAProxy performance metrics. To install, do the following as root:

# cd $PCP_PMDAS_DIR/haproxy
# ./connect
# ./Install

To uninstall, do the following as root:

# cd $PCP_PMDAS_DIR/haproxy
# ./Remove

And now the important part 🚨 β€” pmdahaproxy is launched by pmcd(1) and should never be executed directly. it's not a "run it yourself" situation, it's a "let the daemon handle it" situation. The Install and Remove scripts notify pmcd(1) when the agent is installed or removed, so the whole handshake is handled for you. slay. πŸ’…


πŸŽ€ FILES πŸŽ€

  • $PCP_PMDAS_DIR/haproxy/haproxy.conf β€” configuration file for the pmdahaproxy agent
  • $PCP_PMDAS_DIR/haproxy/connect β€” connection test helper using the pmdahaproxy agent configuration
  • $PCP_PMDAS_DIR/haproxy/Install β€” installation script for the pmdahaproxy agent
  • $PCP_PMDAS_DIR/haproxy/Remove β€” undo installation script for the pmdahaproxy agent
  • $PCP_LOG_DIR/pmcd/haproxy.log β€” default log file for messages from the pmdahaproxy agent

🧚 PCP ENVIRONMENT 🧚

Environment variables with the prefix PCP_ are used to parameterize the file and directory names used by PCP. πŸ¦‹ On each installation, the file /etc/pcp.conf contains the local values for these variables. And if you want to live a little, the $PCP_CONF variable may be used to specify an alternative configuration file, as described in pcp.conf(5). obsessed with the flexibility honestly.


⭐ SEE ALSO ⭐

PCPIntro(1), haproxy(1) and pmcd(1). go read them, they're the supporting cast and they ate. πŸ”₯


and that's the whole page bestie!! πŸ’– this one's from Performance Co-Pilot, version PCP, and the page itself is PMDAHAPROXY(1) β€” so like, that's the manual, that's the name, we're done here. mwah πŸŽ€πŸ«Άβœ¨

πŸ“¦ where this page comes from