Nagios XI - Automation using Ansible

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
veeravamsi
Posts: 146
Joined: Wed Jan 23, 2019 3:35 am

Nagios XI - Automation using Ansible

Post by veeravamsi »

Hi Team,

We are exploring options to Auto-Deploy Nagios Monitoring using Ansible , and i also read some article on nagios website about tight integration with these two Tools . So is there any Ansible YAML Playbooks that are already built or used by any of your customers to deploy monitoring ?

1. If we use Nagios APIs to deploy monitoring ? If so , I didnt find any API for Templates ?
2. Should we go with writing Scripts to invoke to do this task ?

Thank you in advance.

--Vamsi
User avatar
jbrunkow
Posts: 441
Joined: Fri Mar 13, 2020 10:45 am

Re: Nagios XI - Automation using Ansible

Post by jbrunkow »

The ones listed in the videos are located in:

/usr/local/nagiosxi/scripts/automation/ansible/ncpa_autoregister

Although we do not currently support Ansible integration, we are happy to announce that we will be adding it in the next release of version 5.7 this summer! The relevant playbooks will likely also be disclosed at that time.

I do not believe the API contains a method for deploying agents.

I hope that helps! :)
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
veeravamsi
Posts: 146
Joined: Wed Jan 23, 2019 3:35 am

Re: Nagios XI - Automation using Ansible

Post by veeravamsi »

This is awesome :). I will go through the scripts/modules on that path.

Do you know if this will Deploy Monitoring ( CPU , Mem , Disk , etc as defined in Templates ) ? Meaning we can invoke relevant APIs from other Tools/Integrations to Deploy Monitoring for given Server ( or Set of Servers ).
User avatar
jbrunkow
Posts: 441
Joined: Fri Mar 13, 2020 10:45 am

Re: Nagios XI - Automation using Ansible

Post by jbrunkow »

From what I've seen, the NCPA deployment with Ansible looks kind of like a Wizard. Like a Wizard, I believe it deploys a default set of checks. Like almost all Nagios products, I'm sure that feature will be configurable as well! I believe an agent deployed from it should also be able to communicate with the API.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
veeravamsi
Posts: 146
Joined: Wed Jan 23, 2019 3:35 am

Re: Nagios XI - Automation using Ansible

Post by veeravamsi »

Thanks alot. One last question - Does Nagios has any API to Enable/Disable a Monitor( Service or Host checks ) ?
User avatar
jbrunkow
Posts: 441
Joined: Fri Mar 13, 2020 10:45 am

Re: Nagios XI - Automation using Ansible

Post by jbrunkow »

Nagios XI does indeed offer a REST API. The documentation for which is located in the Help section of your XI instance > under API Docs and Developer Docs on the left pane.

Code: Select all

http://< IP address >/nagiosxi/help/api.php
I don't see a way to turn monitoring off for a given host that way. You can schedule Downtime by navigating to Schedule Downtime under Incident Management on the left pane of the home page.

What is the scenario where you would want to disable monitoring? Maybe I can be more helpful if I understand the context better.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
veeravamsi
Posts: 146
Joined: Wed Jan 23, 2019 3:35 am

Re: Nagios XI - Automation using Ansible

Post by veeravamsi »

Sure np. We are trying to automate things ( or let Users do simple things ) like Enable / Disable Monitor remotely using API or command when Service(s) is Down and dont want to receive too many Alerts/Notifications.
User avatar
jbrunkow
Posts: 441
Joined: Fri Mar 13, 2020 10:45 am

Re: Nagios XI - Automation using Ansible

Post by jbrunkow »

That sounds like a use case for downtime or acknowledging alerts, depending on whether the event is planned or not.

Alternatively, you could acknowledge a problem by clicking on Host (or) Service Status > then on the title of the object producing unwanted notifications > and clicking Acknowledge this problem on the Host (or) Service Status Detail page.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked