Checks if LUNs are online and/or mapped.
$ check_netapp_lun state -H <host> [...] [--help]
$ check_netapp_lun state -H <host> --ok-status=[…] […] [--help]
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.
--include
/ --exclude
: Include or exclude LUNs based on their name. The SVM-name is pre-fixed to the LUN-name so that you can filter also based on the SVM-name.
For all other parameters consult --help
on the commandline.
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.eac6-baee60: online, mapped:true
prod-fc-01.2641-51cadc: 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.badc-baee34: online, mapped:false (CRITICAL)
prod-fc-01.4956-51cace: 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.badc-baee34: online, mapped:false
prod-fc-01.4956-51cace: 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$