Page 1 of 1

Access Point Monitoring

Posted: Mon Jan 04, 2021 12:07 pm
by vignesha
Hi Team,

We have a requirement to monitor Access point in nagios.

So we tried to monitor from WLC how much access point connected count and connected access point name details through OID and MIB's, but to configure threshold limit we need your help

1.3.6.1.4.1.9.9.618.1.8.4.0 OID exact count of AP’s (if count reduce we need critical alert)
1.3.6.1.4.1.9.9.513.1.1.1.1.5 OID of AP’s Name (if access point is not there then in mentioned MIB then it should trigger critical alert)

Output:
[root@xxxxxxxxx libexec]# ./check_snmp -H xx.xxx.x.xxx -P 3 -L authNoPriv -U nagios -A 'xxxxxxxxxx' -m IF-MIB -o 1.3.6.1.4.1.9.9.618.1.8.4.0 -c '< 38'
SNMP OK - 38 | SNMPv2-SMI::enterprises.9.9.618.1.8.4.0=38;;38;

[root@xxxxxxxxx libexec]# ./check_snmp -H xx.xxx.x.xxx -P 3 -L authNoPriv -U nagios -A 'xxxxxxxxxx' -m IF-MIB -o 1.3.6.1.4.1.9.9.618.1.8.4.0 -c '< 37'
SNMP CRITICAL - *38* | SNMPv2-SMI::enterprises.9.9.618.1.8.4.0=38;;37;

[root@xxxxxxxxx libexec]# ./check_snmp -H xx.xxx.x.xxx -P 3 -L authNoPriv -U nagios -A 'xxxxxxxxxx' -m SNMPv2-SMI -o 'enterprises.9.9.513.1.1.1.1.5.8.208.159.237.159.48','enterprises.9.9.513.1.1.1.1.5.12.133.37.50.206.96'
SNMP OK - "BLADAPxxxxx" "BLADAPxxxxxx" |

[root@xxxxxxxxx libexec]# ./check_snmp -H xx.xxx.x.xxx -P 3 -L authNoPriv -U nagios -A 'xxxxxxxxxx' -m SNMPv2-SMI -o 'enterprises.9.9.513.1.1.1.1.5.8.208.159.237.159.48','enterprises.9.9.513.1.1.1.1.5.12.133.37.50.206.96'
SNMP OK - "BLADAPxxxxxx" No Such Instance currently exists at this OID |

Re: Access Point Monitoring

Posted: Tue Jan 05, 2021 2:40 pm
by cdienger
Nagios threshold format is covered in https://www.nagios-plugins.org/doc/guid ... HOLDFORMAT.

To send a critical if the count goes below 38 you would want to use "38:". For example:

Code: Select all

./check_snmp -H xx.xxx.x.xxx -P 3 -L authNoPriv -U nagios -A 'xxxxxxxxxx' -m IF-MIB -o 1.3.6.1.4.1.9.9.618.1.8.4.0 -c '38:'
and to match a string:

Code: Select all

./check_snmp -H xx.xxx.x.xxx -P 3 -L authNoPriv -U nagios -A 'xxxxxxxxxx' -m SNMPv2-SMI -o 'enterprises.9.9.513.1.1.1.1.5.8.208.159.237.159.48' -s 'BLADAPxxxxx' -v
The -s option is for an exact string match. There is also the -r and -R for both case sensitive and insensitive regex matches which may be better suited for some things. I also would recommend running it with the -v otpion while testing to get verbose output(sometimes the non-verbose output can hide necessary information that prevents the match from working).

Re: Access Point Monitoring

Posted: Thu Jan 07, 2021 8:16 am
by vignesha
Hi,

Thanks for your help.

We planned to configure all access point MIB's under single service and if any Access points went down we need critical alert.

For a single MIB its working as expected, but for multiple MIB's its not working its triggering only critical alert.

Output:

[root@xxxxxxxx libexec]# /usr/local/nagios/libexec/check_snmp -H xx.xxx.x.xxx -P 3 -L authNoPriv -U xxxxx -A xxxxxxxx -m SNMPv2-SMI -o 'enterprises.9.9.513.1.1.1.1.5.8.208.159.237.159.48','enterprises.9.9.513.1.1.1.1.5.12.133.37.50.206.96' -t 240 -r 'BLADAPxxxx:BLADAPxxxx' -v
/bin/snmpget -Le -t 240 -r 5 -m SNMPv2-SMI -v 3 [context] [authpriv] xx.xxx.x.xxx:161 enterprises.9.9.513.1.1.1.1.5.8.208.159.237.159.48 enterprises.9.9.513.1.1.1.1.5.12.133.37.50.206.96
SNMPv2-SMI::enterprises.9.9.513.1.1.1.1.5.8.208.159.237.159.48 = STRING: "BLADAPxxxx"
SNMPv2-SMI::enterprises.9.9.513.1.1.1.1.5.12.133.37.50.206.96 = STRING: "BLADAPxxxx"
SNMP CRITICAL - *"BLADAPxxxx"* "BLADAPxxxx" |

[root@xxxxxxxx libexec]# /usr/local/nagios/libexec/check_snmp -H xx.xxx.x.xxx -P 3 -L authNoPriv -U xxxxx -A xxxxxxxx -m SNMPv2-SMI -o 'enterprises.9.9.513.1.1.1.1.5.8.208.159.237.159.48' -R BLADAPxxxx
SNMP OK - "BLADAPxxxxx" |

[root@xxxxxxxx libexec]# /usr/local/nagios/libexec/check_snmp -H xx.xxx.x.xxx -P 3 -L authNoPriv -U xxxxx -A xxxxxxxx -m SNMPv2-SMI -o 'enterprises.9.9.513.1.1.1.1.5.8.208.159.237.159.48' -R BLADAPxxxx
SNMP CRITICAL - *"BLADAPxxxxx"* |

[root@xxxxxxxx libexec]# /usr/local/nagios/libexec/check_snmp -H xx.xxx.x.xxx -P 3 -L authNoPriv -U xxxxx -A xxxxxxxx -m SNMPv2-SMI -o 'enterprises.9.9.513.1.1.1.1.5.8.208.159.237.159.48' -r BLADAPxxxx
SNMP CRITICAL - *"BLADAPxxxx"* |

[root@xxxxxxxx libexec]# /usr/local/nagios/libexec/check_snmp -H xx.xxx.x.xxx -P 3 -L authNoPriv -U xxxxx -A xxxxxxxx -m SNMPv2-SMI -o 'enterprises.9.9.513.1.1.1.1.5.8.208.159.237.159.48' -r BLADAPxxxx
SNMP OK - "BLADAPxxxx" |

Re: Access Point Monitoring

Posted: Thu Jan 07, 2021 8:16 am
by vignesha
Hi,

Thanks for your help.

We planned to configure all access point MIB's under single service and if any Access points went down we need critical alert.

For a single MIB its working as expected, but for multiple MIB's its not working its triggering only critical alert.

Output:

[root@xxxxxxxx libexec]# /usr/local/nagios/libexec/check_snmp -H xx.xxx.x.xxx -P 3 -L authNoPriv -U xxxxx -A xxxxxxxx -m SNMPv2-SMI -o 'enterprises.9.9.513.1.1.1.1.5.8.208.159.237.159.48','enterprises.9.9.513.1.1.1.1.5.12.133.37.50.206.96' -t 240 -r 'BLADAPxxxx:BLADAPxxxx' -v
/bin/snmpget -Le -t 240 -r 5 -m SNMPv2-SMI -v 3 [context] [authpriv] xx.xxx.x.xxx:161 enterprises.9.9.513.1.1.1.1.5.8.208.159.237.159.48 enterprises.9.9.513.1.1.1.1.5.12.133.37.50.206.96
SNMPv2-SMI::enterprises.9.9.513.1.1.1.1.5.8.208.159.237.159.48 = STRING: "BLADAPxxxx"
SNMPv2-SMI::enterprises.9.9.513.1.1.1.1.5.12.133.37.50.206.96 = STRING: "BLADAPxxxx"
SNMP CRITICAL - *"BLADAPxxxx"* "BLADAPxxxx" |

[root@xxxxxxxx libexec]# /usr/local/nagios/libexec/check_snmp -H xx.xxx.x.xxx -P 3 -L authNoPriv -U xxxxx -A xxxxxxxx -m SNMPv2-SMI -o 'enterprises.9.9.513.1.1.1.1.5.8.208.159.237.159.48' -R BLADAPxxxx
SNMP OK - "BLADAPxxxxx" |

[root@xxxxxxxx libexec]# /usr/local/nagios/libexec/check_snmp -H xx.xxx.x.xxx -P 3 -L authNoPriv -U xxxxx -A xxxxxxxx -m SNMPv2-SMI -o 'enterprises.9.9.513.1.1.1.1.5.8.208.159.237.159.48' -R BLADAPxxxx
SNMP CRITICAL - *"BLADAPxxxxx"* |

[root@xxxxxxxx libexec]# /usr/local/nagios/libexec/check_snmp -H xx.xxx.x.xxx -P 3 -L authNoPriv -U xxxxx -A xxxxxxxx -m SNMPv2-SMI -o 'enterprises.9.9.513.1.1.1.1.5.8.208.159.237.159.48' -r BLADAPxxxx
SNMP CRITICAL - *"BLADAPxxxx"* |

[root@xxxxxxxx libexec]# /usr/local/nagios/libexec/check_snmp -H xx.xxx.x.xxx -P 3 -L authNoPriv -U xxxxx -A xxxxxxxx -m SNMPv2-SMI -o 'enterprises.9.9.513.1.1.1.1.5.8.208.159.237.159.48' -r BLADAPxxxx
SNMP OK - "BLADAPxxxx" |

Re: Access Point Monitoring

Posted: Thu Jan 07, 2021 6:06 pm
by cdienger
The plugin only always for one match at a time. From the --help:
Note that only one string and one regex may be checked at present
The check_cluster plugin may be helpful here. It can group services into a single service so you could have multiple services set up (to check each OID) but group them into a single service for notifications. See https://assets.nagios.com/downloads/nag ... sters.html for details. A command would using this plugin can be created under Configure > Core Config Manager > Commands.