Page 1 of 1

Routers and Switches templates

Posted: Sun Aug 18, 2019 9:10 am
by elade
Hi,

I’m writing automation for deploy Nagios alerts and I’m having trouble using Network Switch / Router wizard.
I found out how to create the files in /etc/mrtg/conf.d/ and /usr/local/nagiosxi/tmp/ (/usr/bin/cfgmaker).
After that how I create the X.X.X.X.cfg file and import it to XI?
There any way to use this wizard in ansible play-book?

Re: Routers and Switches templates

Posted: Mon Aug 19, 2019 9:54 am
by mbellerue
The best way to create the configuration file via automation would be to use the Nagios XI API. You can get the API key for authentication by clicking on your username in the upper right corner of Nagios XI. You can get a lot of good information on how to use the API from Help -> Config Reference.

Code: Select all

curl -XGET "http://<NagiosXIHostOrIPAddress>/nagiosxi/api/v1/config/host?apikey=<YourAPIKey>&pretty=1"

Re: Routers and Switches templates

Posted: Wed Aug 21, 2019 2:31 am
by elade
Hi mbellerue,

Thank you.

You can close the topic

Re: Routers and Switches templates

Posted: Wed Aug 21, 2019 7:19 am
by scottwilkerson
elade wrote:Hi mbellerue,

Thank you.

You can close the topic
Great!

Locking