Adding hundreds of Routers

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Matthew.Cary
Posts: 32
Joined: Fri Nov 10, 2017 11:43 am

Adding hundreds of Routers

Post by Matthew.Cary »

Up until now I've been using a template based approach to getting my Servers into XI, and it's been working well. I now need to get about 5-600 cisco switches into Nagios and I'm finding the devil is in the details.

Running the Network Switch/Router works great and I can get one router into XI just great, but I really dread doing this up to 600 times, I'd much rather automate or template the process.

The approach I've been taking with server templates doesn't seem to transfer well to Routers as XI wants a mrtg config file for each router to graph performance and I'm discovering I do need to let XI interrogate each router via SMTP to get port configs (which the wizard does, but I don't see an easy way to template that)

Surely there is a better way than just running the wizard over and over again?
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Adding hundreds of Routers

Post by npolovenko »

Hi, @Matthew.Cary. You're right, network switch/router wizard is hard to automate because it not only creates service and host checks but does a custom port autodiscovery, creates new mrtg config files. So there is no easy way to automate this, unfortunately.
You could come up with your own script that will generate mrtg configs+create service and host checks. Autodiscovery part will be much harder to implement though.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
rbond
Posts: 4
Joined: Tue Jan 30, 2018 12:36 pm

Re: Adding hundreds of Routers

Post by rbond »

One might try the API method for adding hosts as it will allow you to add batches of objects like hosts all from one script. The Nagios Help document found under the help menu will show how to use the api for the POST Config/Host endpoint will help you best. I've used it and it works great. version 5.5 may have improvements in this regard. Other than that, one may look into creating other shell scripts from external automation that can quickly create host config files from a list.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Adding hundreds of Routers

Post by npolovenko »

Thanks for the advice, @rbond. Creating hosts with API is definitely a good way to start automating this. A bigger challenge I see is creating MRTG config files. And even bigger is automating a port discovery on a switch/router.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked