ZBXPCP(3)

πŸ“¦
version 7.2.2 Β· 4 versions
, in arch rolling, centos-stream 10, fedora 43, fedora 44, ubuntu resolute, ubuntu stonking

✨ ZBXPCP(3) β€” the Zabbix Agent Loadable PCP Module, bestie edition ✨

okay so real talk, this is section 3 of the library functions manual, and the whole vibe is: zbxpcp, the Zabbix Agent Loadable PCP Module. that's the NAME, that's the whole thing, let's go πŸ’…


πŸ¦‹ NAME πŸ¦‹

zbxpcp β€” Zabbix Agent Loadable PCP Module. yes that's it. short, sweet, iconic. πŸ‘‘


🌸 DESCRIPTION 🌸

so the zbxpcp loadable module extends the Zabbix agent by making Performance Co-Pilot (PCP) metrics available to it. that's the whole plot. πŸŽ€

once you've got the zbxpcp module configured in zabbix_agentd.conf, all the PCP metrics are available from the Zabbix agent just like any other agent items. no special treatment, no VIP list, they just show up. and because it's a loadable module (a DSO, iykyk), zbxpcp does not rely on any external programs β€” it goes straight to the PCP APIs to fetch PCP metrics when requested. main character energy, no middleman. ✨

a typical Linux PCP installation offers over 1,000 metrics by default and is in turn extensible with its own plugins, aka PMDAs (``Performance Metrics Domain Agents''). and listen, on top of very complete /proc based statistics, the readily available PCP PMDAs provide support for such system and application level components as:

  • 389 Directory Server
  • Apache
  • containers
  • HAProxy
  • GFS2
  • Gluster
  • libvirt
  • MySQL
  • NFS
  • Oracle
  • Postfix
  • PostgreSQL
  • Samba
  • Sendmail

among others. yeah. all of that. 🫢

PCP also runs on many platforms, including Linux, macOS, FreeBSD, NetBSD, Solaris, and Windows. it's giving "runs everywhere, no cap". πŸ’€

for a PCP introduction, see PCPIntro(1). to investigate the available PCP metrics, use for example pminfo(1). the PCP Quick Reference Guide is available at the PCP home page https://pcp.io/. 🌈

for general information about Zabbix data collection and loadable modules, see https://www.zabbix.com/documentation/3.0/manual/config/items. for a Zabbix introduction and downloads, see https://www.zabbix.com/. ⭐

and the lil compatibility note you cannot skip: zbxpcp is compatible with the Zabbix module API version 1. periodt.


πŸŽ€ CONFIGURATION πŸŽ€

first things first bestie: make sure PCP is installed and configured properly. see the above references for instructions, and use for example pminfo(1) to make sure the PCP metrics can actually be fetched. vibe check your metrics first, don't skip this. πŸ™ˆ

to enable the zbxpcp loadable module in a Zabbix agent, the following lines must be added to the Zabbix agent configuration file zabbix_agentd.conf β€” and make sure to use the correct LoadModulePath:

LoadModulePath=/usr/lib64/zabbix/agent/
LoadModule=zbxpcp.so

after restarting the Zabbix agent, all the PCP metrics will be available with the pcp. prefix like all the other agent items. this can be verified with the commands:

$ pminfo -t
$ zabbix_agentd -p
$ pminfo -f kernel.all.sysfork
$ zabbix_get -s 127.0.0.1 -p 10050 -k pcp.kernel.all.sysfork

then, to collect PCP metrics from Zabbix agents, the Zabbix server side configuration is as usual (see Zabbix documentation if needed). nothing extra, nothing spicy. πŸ’œ

⚠️ no like seriously, read this one: the PCP pmcd service must always be running when starting up a zbxpcp enabled Zabbix agent, otherwise the module will fail to load and the PCP metrics will not become available. special care must be taken to make sure this happens also when rebooting the system. set that service up properly or it's over fr fr. 😭

🧚 FILES 🧚

  • /etc/zabbix/zabbix_agentd.conf β€” typical Zabbix agent configuration file location. the classic. the usual suspect. πŸ“
  • /etc/zabbix/zbxpcp-derived-metrics.conf β€” optional PCP derived metrics configuration file for zbxpcp. see pmLoadDerivedConfig(3) for more info on derived metrics. optional but cute. ✨
  • $PCP_LIB_DIR/zabbix/agent/zbxpcp.so β€” Zabbix agent loadable PCP module. the actual star of the show right here. πŸ‘‘

🌈 SEE ALSO 🌈

PCPIntro(1), pminfo(1), pmrep(1), zabbix_get(1), pmLoadDerivedConfig(3) and zabbix_agentd(8). go read those too, they're all part of the friend group. 🫢


and that's the page!! brought to you by Performance Co-Pilot, PCP, and this very ZBXPCP(3) manual β€” slay, stay hydrated, and keep pmcd running bestie πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from