Page 1 of 1

adding snmp service monitors

Posted: Tue Nov 06, 2018 1:56 pm
by michaewlewis
I'm working on a new installation of Nagios XI and have a few devices that have about 100 identical snmp oid's that I want to monitor with nagios. Using the gui is a bit clunky for that many oid's, so I was wondering if there was a way to make it easier to bring them in. Is that something I could bring in via the command line? Or is there another route I should take?

Re: adding snmp service monitors

Posted: Tue Nov 06, 2018 4:03 pm
by lmiltchev
...have about 100 identical snmp oid's that I want to monitor with nagios
If you had the same OID that you would like to monitor on 100 machines, you could create one service, and add it to a hostgroup. This way, the service will be automatically added to all host, members of the hostgroup.

Most likely however, you have 100 DIFFERENT OIDs, that you need to add. :) Correct me if I am wrong. In this case, you could use Nagios XI REST API to add the services. You could also use some scripting solution to create the configs, dump them in the "/user/local/nagios/etc/import/" directory, and run "reconfigure_nagios.sh".

Re: adding snmp service monitors

Posted: Tue Nov 06, 2018 4:36 pm
by michaewlewis
I have 100 different OIDs on a few devices. But most of the different OIDs are very similar.
The devices are radios that have 30-40 remote stations associated with them and the OIDs are the same up until the last decimal. For example, there is RSSI, SNR, and Status for each of the 30-40 remote stations. So, I need .x.x.x.1.......0, .1, .2, ..., .40, and all of those would be RSSI for different remotes. Similarly for the SNR and status. And then, of course, I need to make sure they match up correctly with the proper remote.
I really don't want to get into scripting on this, but it's starting to look like I'll have to..... I only have 4 devices that will need it....

Re: adding snmp service monitors

Posted: Wed Nov 07, 2018 12:49 pm
by lmiltchev
Even though the OIDs are similar, they are not the same, so you would have to create different services. I don't see how this could be done without implementing a custom scripting solution, especially if all of these need to "match up correctly with the proper remote". In any case, you could use the REST API in XI or placing configs in the import directory, and running reconfigure_xi.sh.