Page 1 of 1

New Nagios install - Adding 15 (60 ports) switches

Posted: Fri Oct 16, 2020 7:10 am
by hybmrock
Hello,

I've been browsing the web a lot in the last 3 days looking for some ways to modify my switch.cfg file properly. I only got the same info over and over again about how to setup the Host definition and service definition.

Good things is now I can monitor my Up time, Ping BUT I would like to use SNMP to monitor all the switches ports. With a total of 900 ports to monitor I was wondering if I must setup this block of code 900 times !! and only changes the ifOperStatus.x:

#define service {
#
# use generic-service ; Inherit values from a template
# host_name linksys-srw224p
# service_description Port 1 Link Status
# check_command check_snmp!-C public -o ifOperStatus.1 -r 1 -m RFC1213-MIB
#}

I will also wish to monitor traffic using MRTG but I face the same issue, is there a way to automate/script the check so I don't need to create so much entry in my fswitch.cfg file?

How do you guys work outthere?

Best regards,

Re: New Nagios install - Adding 15 (60 ports) switches

Posted: Tue Oct 20, 2020 4:03 pm
by gormank
One thing you can do is rather than define the hostname, define a hostgroup, add the switches to that, then monitor the hostgroup.
I'd have a look at the the check_snmp -h output and -o option and maybe give it a list of IF OIDs, or the OID that contains the table of all IFs.

Re: New Nagios install - Adding 15 (60 ports) switches

Posted: Thu Oct 22, 2020 5:05 pm
by snapier3
I normally try the passive monitoring approach utilizing SNMP when dealing with network devices.

NagiosXI with SNMP traps
https://assets.nagios.com/downloads/nag ... ios_XI.pdf
https://support.nagios.com/kb/article/n ... s-852.html

NagiosXI + SNMP v3 Docs
https://support.nagios.com/kb/article.php?id=827

--SN