— Texto copiado de http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN201 —
Performance data is defined by Nagios as «everything after the | of the plugin output» – please refer to Nagios documentation for information on capturing this data to logfiles. However, it is the responsibility of the plugin writer to ensure the performance data is in a «Nagios plugins» format. This is the expected format:
‘label’=value[UOM];[warn];[crit];[min];[max]
Notes:
- space separated list of label/value pairs
- label can contain any characters except the equals sign or single quote (‘)
- the single quotes for the label are optional. Required if spaces are in the label
- label length is arbitrary, but ideally the first 19 characters are unique (due to a limitation in RRD). Be aware of a limitation in the amount of data that NRPE returns to Nagios
- to specify a quote character, use two single quotes
- warn, crit, min or max may be null (for example, if the threshold is not defined or min and max do not apply). Trailing unfilled semicolons can be dropped
- min and max are not required if UOM=%
- value, min and max in class [-0-9.]. Must all be the same UOM
- warn and crit are in the range format (see Section 2.5). Must be the same UOM
- UOM (unit of measurement) is one of:
- no unit specified – assume a number (int or float) of things (eg, users, processes, load averages)
- s – seconds (also us, ms)
- % – percentage
- B – bytes (also KB, MB, TB)
- c – a continous counter (such as bytes transmitted on an interface)
It is up to third party programs to convert the Nagios plugins performance data into graphs.
Por ejemplo:
[root@server /nagios-plugins]# ./check_memory.sh 85 95 MEM OK - 40% used, 2170 MB free |mem=1388M;3024.30;3380.10;0;3558
Nagios performance data syntax