check_netapp_netport (Link State)

Checks the link-state of net-ports.

Usage

$ check_netapp_netport -H <host> [--ok-state=<regex>] [...] [--help]

Description

This plugin checks each net-ports link-state. Alarms if link-state is not up (default).

sim96cluster::> network port show

Node: sim96cluster-01
                                                  Speed(Mbps) Health
Port      IPspace      Broadcast Domain Link MTU  Admin/Oper  Status
--------- ------------ ---------------- ---- ---- ----------- --------
e0a       Default      Default          up   1500  auto/1000  healthy
e0b       Default      Default          down 1500  auto/-     -
e0c       Default      Default          up   1500  auto/1000  healthy
e0d       Default      Default          up   1500  auto/1000  healthy
4 entries were displayed.

Examples

Simple Examples

./check_netapp_netport -H sim96
NETAPP NETPORT OK - 4 netports checked
sim96cluster-01.e0b.physical: up, enabled
sim96cluster-01.e0d.physical: up, enabled
sim96cluster-01.e0c.physical: up, enabled
sim96cluster-01.e0a.physical: up, enabled

Checks all net-ports. Would return CRITICAL if the state is not ‘up’


./check_netapp_netport -H sim96
NETAPP NETPORT CRITICAL - 4 netports checked, 1 CRITICAL
sim96cluster-01.e0b.physical: down (CRITICAL), enabled
sim96cluster-01.e0d.physical: up, enabled
sim96cluster-01.e0c.physical: up, enabled
sim96cluster-01.e0a.physical: up, enabled

Same as above - but one of the ports is down.


Advanced Examples

Skipping disabled ports

Disabling a port is often not possible via the filer’s UI. So this switch might be useless on some systems.

./check_netapp_netport -H sim96
NETAPP NETPORT CRITICAL - 4 netports checked, 1 CRITICAL
sim96cluster-01.e0b.physical: down (CRITICAL), disabled
sim96cluster-01.e0d.physical: up, enabled
sim96cluster-01.e0c.physical: up, enabled
sim96cluster-01.e0a.physical: up, enabled

One of the ports is still down but disabled as well. This allows to skip it by means of the --ignore-disabled switch:

./check_netapp_netport -H sim96 --ignore-disabled
NETAPP NETPORT OK - 3 netports checked
Skipped 1 disabled instances (enabled: false)
sim96cluster-01.e0d.physical: up, enabled
sim96cluster-01.e0c.physical: up, enabled
sim96cluster-01.e0a.physical: up, enabled

Skipping (or choosing) ports by name

With --exclude and --include ports can be excluded or included depending on their instance name <node>.<port>.<type> (e.g. node-01.e0a.physical, node-01.a0a.lag). Since these parameters also accept a regular expression specific nodes can be tested. (See also Regular Expressions)

./check_netapp_netport -H sim96 --include='~\.e0a\.'
NETAPP NETPORT OK - 1 netport checked
3 instances skipped because of --include/--exclude settings
sim96cluster-01.e0a.physical: up, enabled

Checks exactly one net-port.


./check_netapp_netport -H mycluster --include='~^mycluster-01\.'
NETAPP NETPORT OK - 4 netports checked
mycluster-01.e0b.physical: up, enabled
mycluster-01.e0d.physical: up, enabled
mycluster-01.e0c.physical: up, enabled
mycluster-01.e0a.physical: up, enabled

Checks only the net-ports on node “01”.


Monitoring Interface Groups

For partial degradation monitoring of interface groups (e.g. detecting when an ifgrp is up but has lost some member ports), use the dedicated check_netapp_ifgrp check. It compares active ports against member ports and can alarm on partial failures — something check_netapp_netport cannot detect.

check_netapp_netport can see interface groups but only reports their overall link-state (up or down). To avoid duplicate alerts, you can exclude ifgrps from this check:

./check_netapp_netport -H cluster1
NETAPP NETPORT CRITICAL - 9 netports checked, 1 CRITICAL
cluster1-01.e0a.physical: up, enabled
cluster1-01.e0b.physical: up, enabled
cluster1-01.e0c.physical: up, enabled
cluster1-01.e0d.physical: up, enabled
cluster1-02.e0a.physical: up, enabled
cluster1-02.e0b.physical: up, enabled
cluster1-02.e0c.physical: up, enabled
cluster1-02.e0d.physical: up, enabled
cluster1-01.a0a.lag: down (CRITICAL), enabled

Exclude interface groups and monitor them separately with check_netapp_ifgrp:

./check_netapp_netport -H cluster1 --exclude='~lag$'
NETAPP NETPORT OK - 8 netports checked
1 instances skipped because of --include/--exclude settings
cluster1-01.e0a.physical: up, enabled
cluster1-01.e0b.physical: up, enabled
cluster1-01.e0c.physical: up, enabled
cluster1-01.e0d.physical: up, enabled
cluster1-02.e0a.physical: up, enabled
cluster1-02.e0b.physical: up, enabled
cluster1-02.e0c.physical: up, enabled
cluster1-02.e0d.physical: up, enabled