Collectd monitoring plugin¶
Article last updated: 2026-12-02.
What it does¶
The Collectd monitoring plugin reads the values that a local collectd instance exposes through collectdctl and sends them to Pandora FMS as modules of one agent. Each run lists the available metrics with collectdctl listval, reads each value with collectdctl getval, applies the optional include and ignore regular expressions and delivers the agent through Tentacle.
The plugin is a standalone agent generator. It runs on the host that runs collectd, uses the local collectdctl binary and sends the generated agent with Tentacle. It does not write to a local data folder and does not print module XML.
Prepare¶
Compatibility¶
| Scope | State | Evidence |
|---|---|---|
collectd with the collectdctl binary available |
Required |
The plugin executes collectdctl listval and collectdctl getval |
A local collectd instance reachable by collectdctl |
Required |
The binary reads the local collectd socket |
Python 3 with pandoraPlugintools and pycryptodome |
Required when running from source |
The script imports pandoraPlugintools; the requirements list both packages |
| Tentacle server reachable from the plugin host | Required |
The agent is always delivered with Tentacle |
| Pandora FMS NG 784 and later | Not validated |
No release-specific validation record exists |
Requirements¶
- collectd installed and running on the host that executes the plugin.
- The
collectdctlbinary, by default/usr/bin/collectdctl. - The
pandoraPlugintoolsPython package andpycryptodomewhen running from source; the packaged binary includes them. - A Tentacle server reachable from the plugin host on port
41121.
Install the plugin¶
Copy pandora_collectd (or pandora_collectd.py and its dependencies) to the host that runs collectd. The packaged binary includes Python and the libraries. The plugin must run on the same host as collectd because it uses the local collectdctl socket.
Configure¶
Run the plugin with the optional filters and the Tentacle destination:
./pandora_collectd -a <AGENT_ALIAS> -i <TENTACLE_IP>
| Option | Required | Default | Description |
|---|---|---|---|
-c, --collectdctl |
No | /usr/bin/collectdctl |
Path to the collectdctl binary. |
-r, --add_regexp |
No | .* |
Regular expression that a metric must match to be included. |
-R, --ignore_regexp |
No | None | Regular expression that excludes a metric. |
-d, --agent_description |
No | pandroa_collectd |
Agent description. |
-a, --agent_alias |
No | pandora_collectd |
Agent alias. |
-i, --tentacle_ip |
No | 127.0.0.1 |
Tentacle server address. |
-p, --tentacle_port |
No | 41121 |
Tentacle port. |
-O, --tentacle_extra_opts |
No | Empty | Extra options for the Tentacle client. |
-v, --verbose |
No | Disabled | Prints every metric and value on standard output. |
Example:
./pandora_collectd -c /usr/bin/collectdctl -a collectd_prod -r '^cpu-.*' -i 192.0.2.10
The agent name is the MD5 hash of --agent_alias. The alias is stored as the agent alias.
Filters¶
--add_regexpis applied withre.match, so it matches at the beginning of the metric name.--ignore_regexpis applied after the include filter; a metric that matches it is skipped.- With the defaults, every metric returned by
collectdctl listvalis included.
Verify¶
List the metrics that collectd exposes:
/usr/bin/collectdctl listval
Run the plugin with --verbose and a test alias:
./pandora_collectd -a collectd_test -i 127.0.0.1 -v
A successful run prints metric:value for every included metric and then prints 1. The agent appears in Pandora FMS after the Tentacle transfer.
Understand the results¶
The plugin creates one agent with one generic_data module per metric. The module name is <metric>_<type>, where <metric> is the identifier returned by collectdctl listval and <type> is the value type returned by collectdctl getval (for example value or gauge). The value is converted to a float.
The plugin does not add units, descriptions beyond the metric name, or thresholds. The module catalog depends on the collectd plugins loaded on the host.
Operate and troubleshoot¶
Error banary for colletdctl— the path in-cdoes not exist or is not executable. The message keeps the spelling of the script.collectdctl listvalreturns nothing — collectd is not running, the socket is not accessible or the user cannot read it.collectdctl getvalfails for one metric — the metric disappeared betweenlistvalandgetval, or its type is not numeric. The plugin exits on the command error.- The agent does not arrive — check the Tentacle address, the port and the network path. The plugin always uses Tentacle; it has no local-folder mode.
- No modules appear — the include regular expression is too restrictive or the ignore expression excludes everything. Run with
-vto see the candidates. No module named pandoraPlugintools— install the package or use the packaged binary.
Reference¶
Command-line options¶
| Option | Description |
|---|---|
-c, --collectdctl |
Path to collectdctl. |
-r, --add_regexp |
Include regular expression. |
-R, --ignore_regexp |
Ignore regular expression. |
-d, --agent_description |
Agent description. |
-a, --agent_alias |
Agent alias. |
-i, --tentacle_ip |
Tentacle address. |
-p, --tentacle_port |
Tentacle port. |
-O, --tentacle_extra_opts |
Extra Tentacle options. |
-v, --verbose |
Print metrics and values. |
Commands executed¶
| Command | Purpose |
|---|---|
collectdctl listval |
List the available metrics. |
collectdctl getval <metric> |
Read the value of one metric. |
Addon identity¶
| Field | Value |
|---|---|
| Marketplace identifier | pandorafms.collectd |
| Marketplace name | Collectd monitoring |
| Package | pandora_collectd.zip |
| Type | Standalone plugin, agent generator |
| Executable | pandora_collectd |
| License | Free download |