In my two articles Overly Long Outputs and Turning Off Performance Data Output I discuss shortened text outputs. Whereas the second article describes how to reduce the actual output of the plugin, the first article simply addresses the question on how to properly display the output data. The amount of bytes sent from the plugin to the monitoring system is not reduced by any of the methods described in the articles – and this can be a significant amount of data, when thousand of hard disks are being monitored at once. Some parts of the monitoring framework, such as gourmand simply can’t deal with it anymore.

This is why we reintroduced the possibility to set a limit on text outputs, which can be found directly in the check_netapp_pro.pl script

max_length_single_line => 140, # single line and first line
max_length_multi_line => 65_536 - 140, # multi line for Nagios 3.x

An explenation for the values above:

140 characters is the maximum size of an SMS and should not be exceeded for the Nagios Macro SERVICEOUTPUT.

64kiB (65.536 Byte) is the limit for several tools in the Nagios context. If we subtract the length of SERVICEOUTPUT, we obtain the maximum value for LONGSERVICEOUTPUT (we use the subtraction for demonstration purposes in order to explain their relationship)

These values are used for all checks executed with check_netapp_pro.pl. Please be aware that custom values will be overriden with each update, since the file is replaced.

What happens when the plugin’s output exceeds any of these thresholds? Simply put, the relevant segment is trimmed to the set threshold and marked with [...] at the end to indicate a shortened output.

An example for a request from a simulator with a set threshold of 100 for max_length_multi_line, a value not recommended for production:

$ ./check_netapp_pro.pl Usage -H sim83n1 -o volume --perf_format=suppress
NETAPP_PRO USAGE WARNING - 4 volumes checked, 0 critical and 1 warning
No SVC-ACK relevant changes in reason.
vol0: 1.5GiB (WARNING)
vol12: 0.0G [...] |

In comparison, the shortened output including perf data:

NETAPP_PRO USAGE WARNING - 4 volumes checked, 0 critical and 1 warning
No SVC-ACK relevant changes in reason.
vol0: 1.5GiB (WARNING)
vol12: 0.0GiB
vol0: 0.0GiB
vol11: 0.0GiB
| vol0=1595994112B;1428077772.8;1836099993.6;0;2040111104 vol0=425984B;1428077772.8;1836099993.6;0;2040111104 vol11=122880B;13946060.8;17930649.6;0;19922944 vol12=10686464B;13946060.8;17930649.6;0;19922944