Page 1 of 1
Configuring REST API to access Services in NAGIOSXI
Posted: Wed Aug 10, 2016 8:34 am
by network2016
Hi
I am looking for different REst APIs available to access/export NagiosXI data to external services [WEB,or using Curl on different machine].
I have used the Back end API component of Nagios and seen few APIs there ,but they are limited I would like to get any information from the Nagios Database using APIs or curl function externally.
So can anyone please advice me what options are available in this regards . I am looking following solutions,
1. can I create a customized API for ex, get Alarm information for 5 minutes or
2. get SNMP traps information for particular host, or any services of any host at a given time period.
3. Also,what is the location where the inbuilt APIs resides in nagios Database. [which folder or file contain that]
Please help me with this.
Thank you in advance !!!!!
Waiting for the comments and help
Re: Configure Nagios to transfer DB to another server
Posted: Wed Aug 10, 2016 12:17 pm
by mcapra
Here's a document on offloading the Nagios XI database:
https://assets.nagios.com/downloads/nag ... Server.pdf
You don't really need a "second Nagios XI server" so much as an external database server. This is done pretty often with the intention of improving the performance of a Nagios XI installation.
Re: Configuring REST API to access Services in NAGIOSXI
Posted: Thu Oct 13, 2016 2:13 am
by network2016
network2016 wrote:Hi
I am looking for different REst APIs available to access/export NagiosXI data to external services [WEB,or using Curl on different machine].
I have used the Back end API component of Nagios and seen few APIs there ,but they are limited I would like to get any information from the Nagios Database using APIs or curl function externally.
So can anyone please advice me what options are available in this regards . I am looking following solutions,
1. can I create a customized API for ex, get Alarm information for 5 minutes or
2. get SNMP traps information for particular host, or any services of any host at a given time period.
3. Also,what is the location where the inbuilt APIs resides in nagios Database. [which folder or file contain that]
Please help me with this.
Thank you in advance !!!!!
Waiting for the comments and help
Re: Configuring REST API to access Services in NAGIOSXI
Posted: Thu Oct 13, 2016 9:09 am
by tmcdonald
Were you meaning to add more? I am not sure why you quoted yourself.
Re: Configuring REST API to access Services in NAGIOSXI
Posted: Fri Oct 14, 2016 6:00 am
by jacek
@network2016 - You are looking for the new REST API I think:
To view the REST API documentation in Nagios XI go to the “Help” menu, then click on the “Introduction” menu on the left (Nagios XI API Docs tab).
Re: Configuring REST API to access Services in NAGIOSXI
Posted: Fri Oct 14, 2016 1:32 pm
by mcapra
Thanks
@slytheer!
@network2016 I would suggest reviewing the documents previously mentioned and asking any specific questions you may have after doing that.
1. can I create a customized API for ex, get Alarm information for 5 minutes or
You can use the REST API previously mentioned to do similar operations (get current alerts for example).
2. get SNMP traps information for particular host, or any services of any host at a given time period.
Assuming these are configured as services, you can use the REST API to pull specific host/service status information as well.
3. Also,what is the location where the inbuilt APIs resides in nagios Database. [which folder or file contain that]
Not sure what you mean by this? The default mysql credentials on Nagios XI machines is
root:nagiosxi. You should be able to view the tables that way, but we do not recommend/support direct database modification.