check_eseries_nic

Checks various aspects of network interface cards (NIC).

Description

This plugin monitors the NIC’s:

  • link-status
  • current-speed setting (1gig, 10gig, …)
  • setup-error condition (true = has error / false = no error)

A typical output would look like:

NETAPP ESERIES NIC CRITICAL - 4 nics checked, 3 CRITICAL
.280107002000000000000: speedUnknown (CRITICAL), slot 1, label P2
.280007002000000000000: speedUnknown (CRITICAL), slot 0, label P1
wan1.280107001000000000000: speedUnknown (CRITICAL), slot 1, label P2
wan0.280007001000000000000: speed1gig, slot 0, label P1

The patterns given to the --exclude|-X and --include|-I parameters allow to check specific NICs only.

With --ok-status=<regex> the status can be defined which should be considered ok (e.g. ^(1gig|10gig)$). See also the Examples section below.

Examples

Check the link-status of all network interfaces:

$ ./check_eseries_nic link-status -H 10.1.1.11 --system-id=1
NETAPP ESERIES NIC CRITICAL - 4 nics checked, 3 CRITICAL
.280107002000000000000: down (CRITICAL), slot 1, label P2
.280007002000000000000: down (CRITICAL), slot 0, label P1
wan1.280107001000000000000: down (CRITICAL), slot 1, label P2
wan0.280007001000000000000: up, slot 0, label P1

Same as above but exclude unnamed NICs:

$ ./check_eseries_nic link-status -H 10.1.1.11 --system-id=1 -X "^\."
NETAPP ESERIES NIC CRITICAL - 2 nics checked, 1 CRITICAL
wan1.280107001000000000000: down (CRITICAL), slot 1, label P2
wan0.280007001000000000000: up, slot 0, label P1

The instance names are composed from the interface name and the id. If the interface name is empty, the instance name starts with a dot, which we use here as pattern (^\. = literal dot at the beginning) to exclude them.


Check the current speed setting:

$ ./check_eseries_nic current-speed -H 10.1.1.11 --system-id=1 -X "^\."
NETAPP ESERIES NIC CRITICAL - 2 nics checked, 1 CRITICAL
wan1.280107001000000000000: speedUnknown (CRITICAL), slot 1, label P2
wan0.280007001000000000000: speed1gig, slot 0, label P1

Same as above but speedUnknown is ok as well:

$ ./check_eseries_nic current-speed -H 10.1.1.11 --system-id=1 -X "^\." --ok-value="^(speedUnknown|speed1gig)$"
NETAPP ESERIES NIC OK - 2 nics checked
wan1.280107001000000000000: speedUnknown, slot 1, label P2
wan0.280007001000000000000: speed1gig, slot 0, label P1

A more readable, but a little less secure, pattern for --ok-value would be "Unknown|1gig".


Check for setup-errors:

$ ./check_eseries_nic setup-error -H 10.1.1.11 --system-id=1
NETAPP ESERIES NIC OK - 4 nics checked
.280107002000000000000: false, slot 1, label P2
.280007002000000000000: false, slot 0, label P1
wan1.280107001000000000000: false, slot 1, label P2
wan0.280007001000000000000: false, slot 0, label P1