The following command on Nagios's default "check_disk" command gives the following output:
# ./check_disk -w 20% -c 10% -p / --units=MB
DISK OK - free space: / 17887 MB (47% inode=93%);| /=19481MB;31495;35432;0;39369
All well and good, but does anyone know what the last four numbers (separated by semicolons) mean? Is there any way, other than wrapping the command in a script, to tailor the output to something which makes sense at first glance?
Thanks in advance...
Any data after the pipe (
|
) in a Nagios check output is performance data, or "perfdata", which you can collect and process for time-series trending purposes (a Google for "nagios rrd" will provide a variety of tools to help you in this endeavour). What exact values are provided vary by plugin, and unfortunately the detailed help output from plugins isn't always the most useful. However, the set of semicolon-separated values is (supposed to be) standardised, as per the Nagios plugin development guidelines. Specifically, the values in your perfdata are:The first item is useful for drawing graphs directly; the rest are useful for drawing threshold lines (warn/crit) and scaling the graphs appropriately.
This is "Performance data". Performance data is defined by Nagios as "everything after the | of the plugin output". This data is used by 3rd party programs for charts. Please see more details in the documentation https://nagios-plugins.org/doc/guidelines.html#AEN200