COLLECTD-NAGIOS(1)
โจ NAME โจ
collectd-nagios โ the Nagios plugin for querying collectd, bestie ๐
okay so real talk: this is the lil guy that lets Nagios talk to collectd. it's giving matchmaker, honestly ๐ซถ
๐ธ SYNOPSIS ๐ธ
collectd-nagios -s socket -n value_spec -H hostname [options]
๐ซ DESCRIPTION ๐ซ
okay so picture this: this tiny little program is literally the glue holding collectd and nagios together. no cap. collectd is out here collecting alllll kinds of performance statistics and serving them up through the "unixsock plugin", see collectd-unixsock(5) ๐.
Nagios calls this program, this program connects to the UNIX socket, reads the values from collectd, and then โ depending on the values and the ranges Nagios handed over โ it returns OKAY, WARNING or CRITICAL. it's giving messenger. it's giving middle child. it's iconic โจ
๐ ARGUMENTS AND OPTIONS ๐
here's everything collectd-nagios needs and understands, bestie. the order of the arguments generally doesn't matter, as long as no argument is passed more than once. periodt ๐
-ssocket โ the path of the UNIX socket that collectd's"unixsock plugin"opened. yes the path. give it the path ๐-nvalue_spec โ the value you wanna read from collectd. the argument is in the form"plugin[-instance]/type[-instance]"โ note the optional[-instance]bits, they're giving optional slay ๐-Hhostname โ the hostname you're querying the values for. who are we checking on today bestie ๐ฆ-ddata_source โ so avalue_speccan be made of multiple"data sources"okay?? with this option you can select one or more of them. to select multiple data sources just specify this option again (yes, again, stack it, we love that for you). if multiple data sources are examined, they get handled according to the consolidation function you gave with the-goption ๐ฅ-gnone|average|sumโ when multiple data sources are selected from a value spec, they can be handled differently depending on this option. the values mean the following:noneโ no consolidation is done (fr fr, none) and the warning and critical regions are applied to each value independently. every value gets its own vibe check ๐averageโ the warning and critical ranges are applied to the average of all values. math but make it cute โจsumโ the warning and critical ranges are applied to the sum of all values. add it all up bestie ๐งฎpercentageโ the warning and critical ranges are applied to the ratio (in percent) of the first value and the sum of all values. a warning is returned if the first value is not defined, or if all values sum up to zero. ๐
-crange and-wrange โ set the critical (-c) and warning (-w) ranges. these options mostly follow the normal syntax of Nagios plugins. the general format is"min:max". if a value is smaller than min or bigger than max, a warning or critical status is returned โ otherwise the status is success ๐
the tilde sign (~) can be used to explicitly specify infinity. if ~ is used as a min value, negative infinity is used. in case of max, it's interpreted as positive infinity. infinity, but make it a squiggle ๐
if the first character of the range is the at sign (@), the meaning of the range will be inverted. i.e. all values within the range will yield a warning or critical status, while all values outside the range will result in a success status. plot twist!! ๐
min (and the colon) may be omitted, min is then assumed to be zero. if max (but not the trailing colon) is omitted, max is assumed to be positive infinity. okay so the colon stays, the number doesn't. noted ๐
-mโ if this option is given,"Not a Number"(NaN) is treated as critical. by default, thenoneconsolidation reports NaNs as warning. other consolidations simply ignore NaN values. NaN said "not today" and honestly same ๐
๐ RETURN VALUE ๐
as usual for Nagios plugins, this program writes a short, one line status message to STDOUT and signals success or failure with its return value. it exits with a return value of 0 for success, 1 for warning and 2 for critical. if the values are not available or some other error occurred, it returns 3 for unknown. four whole moods and it commits to every one of them ๐
๐ SEE ALSO ๐
๐ AUTHOR ๐
Florian Forster <octo at collectd.org> โ thank you for your service king ๐ซถ
okay that's the whole page bestie, we ate and left no crumbs ๐ โจ this was collectd-nagios from collectd, version 5.11.0.94.g41b1e33, dated 2020-07-20 โ go forth and monitor, mwah ๐ญ๐
๐ฆ where this page comes from
- alpine 3.24: collectd-doc 5.12.0-r25 ยท GPL-2.0-or-later
- epel 10: collectd-utils 5.12.0-63.el10_3 ยท GPL-2.0-only
- epel 9: collectd-utils 5.12.0-24.el9 ยท GPLv2
- fedora 43: collectd-utils 5.12.0-54.fc43 ยท GPL-2.0-only
- fedora 43: collectd-utils 5.12.0-57.fc43 ยท GPL-2.0-only
- fedora 44: collectd-utils 5.12.0-61.fc44 ยท GPL-2.0-only
- fedora 44: collectd-utils 5.12.0-64.fc44 ยท GPL-2.0-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms