lausser / check_nwc_health

nwc = network component. This plugin checks lots of aspects of routers, switches, wlan controllers, firewalls,.....
http://labs.consol.de/nagios/check_nwc_health
GNU General Public License v2.0
146 stars 88 forks source link

SNMP v3 Sercurity Level parameter #329

Closed gbin2265 closed 2 months ago

gbin2265 commented 3 months ago

Hello,

When I want to establish an SNMP v3 connection, I also need to provide a security level of noAuthNoPriv for our F5.

In snmpwalk, there exists the parameter: -l LEVEL set security level (noAuthNoPriv|authNoPriv|authPriv)

Does such a parameter also exist for the check_nwc_health plugin?

I think that because there is no security level parameter, I am getting this error :

CRITICAL - cannot create session object: Received usmStatsUnsupportedSecLevels.0 Report-PDU with value 13 during synchronization ` regards, Geert

gbin2265 commented 2 months ago

Hello,

I found out how you handle the 'Security Level' ou determine the level based on the parameters. I had also included the community, and that was the problem.

  if (grep(/-X/, @credentials) and grep(/-A/, @credentials)) {
    push(@credentials, "-l authPriv");
  } elsif (grep(/-A/, @credentials)) {
    push(@credentials, "-l authNoPriv");
  } elsif (! grep(/-c/, @credentials)) {
    push(@credentials, "-l noAuthNoPriv");
  }

I close the case.