check_netapp_lun (lun's state)

Checks if LUNs are online and/or mapped.

Usage

$ check_netapp_lun state -H <host> [...] [--help]
$ check_netapp_lun state -H <host> --ok-status=[…] […] [--help]

Description

The LUN plugin retrieves the state of the LUN and compares it to the value of --ok-status (string or regular expression). This string contains information about both the online/offline state and whether the LUN is mapped or not. See the examples below for how to write this string using regular expressions.

Important Parameters

--include / --exclude: Include or exclude LUNs based on their instance-name. The instance-name is composed of the SVM-name, the volume-name and the LUN-name (svm-name.volume-name.lun-name), so that you can filter on any of these components.

Breaking change in v4.0.0: The instance-name of check_netapp_lun state changed from svm-name.svm-uuid to svm-name.volume-name.lun-name. If your configuration uses --include/-I or --exclude/-X referencing the previous UUID-based names, you must adjust them to the new scheme.

For all other parameters consult --help on the commandline.

Examples

Check all LUNs for their state using the --ok-status default. These LUNs are both online and mapped, which is the default OK-status:

$ check_netapp_lun state -H filer 
NETAPP LUN STATE OK - 2 Luns checked
prod-fc-01.vmware_ds01.lun_datastore1: online, mapped:true
prod-fc-01.hyperv_cl01.lun_witness: online, mapped:true

Check all LUNs for their state using the --ok-status default. One of the LUNs is online but not mapped – therefore the CRITICAL exit:

$ check_netapp_lun state -H filer 
NETAPP LUN STATE CRITICAL - 2 Luns checked, 1 CRITICAL
prod-fc-01.vmware_ds01.lun_datastore1: online, mapped:false (CRITICAL)
prod-fc-01.hyperv_cl01.lun_witness: online, mapped:true

If you want to check only for online/offline, but ignore the mapped state, the following --ok-status pattern will work:

$ check_netapp_lun state -H filer --ok-status='~^online'
NETAPP LUN STATE OK - 2 Luns checked
prod-fc-01.vmware_ds01.lun_datastore1: online, mapped:false
prod-fc-01.hyperv_cl01.lun_witness: online, mapped:true

If you want to check only for the mapped-state, but ignore the online/offline, the following will work: --ok-status='~mapped:true$'