Cisco QoS monitoring

This plugin checks for the QoS status configured on Cisco routers.

QoS summary mode

In this mode the plugin works as follows:

  • get the entire QoS configuration.
  • sum up all dropped traffic on all interfaces and all classes
  • calculate the average drop rate in bits per second
  • evaluate calculated drop rate against warning/critical thresholds
  • return the corresponding Nagios status & performance data

In order to use this mode you need to call the plugin using the following command line arguments:

-i ALL -m ALL -w -c

  Example

$ ./check_cisco_qos.pl -H 10.10.10.10 -C public -w 10 -c 20  -i ALL -m ALL
QOS: Total drop rate (0.00 bits/s) is below warning threshold (10 bits/s): OK | Sent=62232.52Bits/s;Dropped=0.00Bits/s

This mode is useful if you just want to know how much is dropped as a result of QoS processing.

Class summary mode

In this mode the plugin works as follows:

  • get the entire QoS configuration.
  • sum up all dropped traffic on all interfaces for one specific QoS class
  • calculate the average drop rate in bits per second
  • evaluate calculated drop rate against warning/critical thresholds
  • return the corresponding Nagios status & performance data

In order to use this mode you need to call the plugin using the following command line arguments:

-i ALL -m -w -c

Example

    $ ./check_cisco_qos.pl -H 10.10.10.10 -C public -w 10 -c 20  -i ALL -m class-default     QOS: Total drop rate for class class-default (0.00 bits/s) is below warning threshold (10 bits/s): OK | Sent=79310.40Bits/s;Dropped=0.00Bits/s

This mode is useful when you have standard QoS policies deployed on multiple routers with varying interface names. It allows to define one probe per QoS class and to deploy it on multiple routers.

Interface summary mode

In this mode the plugin works as follows:

   - get the entire QoS configuration.    - sum up all dropped traffic of all QoS classes on one specific interface    - calculate the average drop rate in bits per second    - evaluate calculated drop rate against warning/critical thresholds    - return the corresponding Nagios status & performance data

In order to use this mode you need to call the plugin using the following command line arguments:

-i -m ALL -w -c

Example

# ./check_cisco_qos.pl -H 10.10.10.10 -C public -w 10 -c 20  -i MF1 -m ALL
QOS: Total drop rate on MF1 (33184.85 bits/s) is above critical threshold (20 bits/s): CRITICAL | Sent=2208926.56Bits/s;Dropped=33184.85Bits/s

This mode is useful to monitor dropped traffic per interface.

Detailled mode

In this mode the plugin works as follows:

  • get the entire QoS configuration.
  • get dropped traffic of one QoS class on one specific interface
  • calculate the average drop rate in bits per second
  • evaluate calculated drop rate against warning/critical thresholds
  • return the corresponding Nagios status & performance data

In order to use this mode you need to call the plugin using the following command line arguments:

-i -m -w -c

 Example

# ./check_cisco_qos.pl -H 10.10.10.10 -C public -w 10 -c 20  -i MF1 -m class-default
QOS: Drop rate for class-default on MF1 (1409 bits/s) is above critical threshold (20 bits/s): CRITICAL | Sent=73395Bits/s;Dropped=1409Bits/s

Notes

Interface names

This plugin identifies interface names based on their short name like "Gi0/1".

You can run the plugin in debug mode using -i ALL -m ALL -d to find out short interface names on your router.

Bit rate calculation

The first time you run the plugin it will create a temporary file in /tmp. This file contains 3 lines:

  • the last drop counter in bits  (lastDrop=XXXXXXX)
  • the last sent counter in bits  (lastPost=XXXXXXX)
  • the last epoch time in seconds (lastEpoch=XXXXXXX)

The second time you run the plugin, it will compare actual values against the previous ones and calculate the rates as follows:

  • dropRate = (current drop counter - last drop counter) / (current epoch - last epoch)
  • sentRate = (current post counter - last post counter) / (current epoch - last epoch)

  SNMP counters

The SNMP counters being used are:

  • cbQosCMDropByte (.1.3.6.1.4.1.9.9.166.1.15.1.1.16) --> traffic dropped as a result of QoS processing
  • cbQosCMPostPolicyByte (.1.3.6.1.4.1.9.9.166.1.15.1.1.9) --> traffic sent after QoS processing