Overly Long Outputs

Checks such as Disk or ShelfBay have very long outputs with (depending on the configuration of the filer) long lists of instances even when everything is perfectly fine. At first, this might seem a bit confusing, but the checks can be configured according to your needs. Let’s take a look at an example with a very simple simulator. This is the initial output: $ **./check_netapp_pro.pl Disk -H sim812** NETAPP_PRO DISK CRITICAL - 14 disks checked, 1 critical and 0 warning No SVC-ACK relevant changes in reason. sim812 v5.16: not failed sim812 v5.17: not failed sim812 v5.18: not failed sim812 v5.19: not failed sim812 v5.21: not failed sim812 v5.22: not failed sim812 v5.24: not failed sim812 v5.25: not failed sim812 v5.26: not failed sim812 v5.27: not failed sim812 v5.28: not failed sim812 v5.29: not failed sim812 v5.32: not failed sim812 v5.20: admin failed (CRITICAL) Notice that the critical instances are listed at very the end. This can be changed as follows: $ ./check_netapp_pro.pl Disk -H sim812 **‑‑sort_criterion=exit ‑‑sort_order=descending** NETAPP_PRO DISK CRITICAL - 14 disks checked, 1 critical and 0 warning No SVC-ACK relevant changes in reason. sim812 v5.20: admin failed (CRITICAL) sim812 v5.16: not failed sim812 v5.17: not failed sim812 v5.18: not failed sim812 v5.19: not failed sim812 v5.21: not failed sim812 v5.22: not failed sim812 v5.24: not failed sim812 v5.25: not failed sim812 v5.26: not failed sim812 v5.27: not failed sim812 v5.28: not failed sim812 v5.29: not failed sim812 v5.32: not failed

Identifying the Troublemaker

How do we get an warning message that is short enough to be sent by SMS and at the same time lists the critical instances? Such a message could look like this: NETAPP_PRO DISK CRITICAL - 14 disks checked, 1 critical and 0 warning, sim812 v5.20: admin failed (CRITICAL) This might be useful for a filer admin that would like to receive warning messages on his cellphone. Let’s take a look at how to recreate the above message step by step:

Step 1:

The entire output containing CRITICAL and OK instances is not helping the filer admin getting an overview of the system. Very often therefore, only the SERVICEOUTPUT is set to be sent by SMS in the configuration of the notifications in the monitoring system. So, this would result in only the first line, everything up to the first newline. In our example: NETAPP_PRO DISK CRITICAL - 14 disks checked, 1 critical and 0 warning The output is much shorter and one quick look at the GUI will be enough to know what is going on.

Step 2:

In case that you would like to avoid having to take a look at the GUI, it is possible to set the parameter --show_problems (version 3.1.0 and up), which will change the first line to: NETAPP_PRO DISK CRITICAL - 14 disks checked, 1 critical and 0 warning, **sim812 v5.20: admin failed (CRITICAL)**

Step 3:

The status can also be hidden using  ‑‑show_status=none, making the message is even shorter: NETAPP_PRO DISK CRITICAL - 14 disks checked, 1 critical and 0 warning, **sim812 v5.20: admin failed**

Numerical Values

For numerical values, ‑‑show_problems uses the switch ‑‑factor, which can be used to set the SI factor for the threshold, meaning, if Kilo-, Mega- or Terabyte should be used for the check. This can also improve the readability of the output: $ ./check_netapp_pro.pl Usage ‑o volume ‑s vfiler0 ‑H sim812 ‑‑show_problems ‑‑show_status=none **‑‑factor=Gi**‑w 10 ‑c 20 NETAPP_PRO USAGE WARNING - 2 volumes checked, 0 critical and 1 warning, lun1: 15.2GiB

Too Long for an SMS?

If the first line is longer that 140 characters, it will be shortened and labeled with [...]. The maximum length can be set in the check_netapp_pro.pl script with the parameter max_length_single_line.


Updating to a New Version
Check for Unassigned Disks

Comments