Nagios API for third party integration
Nagios API for third party integration
Is there any in-build API inside Nagios Core to get status data and configuration data for integration with third party application like Django?
Re: Nagios API for third party integration
In terms of pulling data, you can use the JSON CGIs (you can skip to the "To get started using the CGIs" section):
https://labs.nagios.com/2014/06/19/expl ... -7-part-1/
In terms of pushing data, that's a bit trickier. You can leverage the external commands file to programatically take just about any action in Nagios Core, but you'd need write access for that file on the machine itself which can be a pain when integrating with web frameworks. To get around that, you can leverage something like NRDP to submit those external commands:
https://github.com/NagiosEnterprises/nrdp
https://old.nagios.org/developerinfo/ex ... ndlist.php
If you have a specific use case you wanted more information about, I'm sure myself and others could provide answers.
Though it's not free, Nagios XI includes a fairly robust REST API.
https://support.nagios.com/kb/article/n ... d-api.html
https://labs.nagios.com/2014/06/19/expl ... -7-part-1/
In terms of pushing data, that's a bit trickier. You can leverage the external commands file to programatically take just about any action in Nagios Core, but you'd need write access for that file on the machine itself which can be a pain when integrating with web frameworks. To get around that, you can leverage something like NRDP to submit those external commands:
https://github.com/NagiosEnterprises/nrdp
https://old.nagios.org/developerinfo/ex ... ndlist.php
If you have a specific use case you wanted more information about, I'm sure myself and others could provide answers.
Though it's not free, Nagios XI includes a fairly robust REST API.
https://support.nagios.com/kb/article/n ... d-api.html
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: Nagios API for third party integration
Nagios XI can actually be free, depending on how many hosts you're monitoring (<7). So you may be able to use that, depending on your requirements.
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
Re: Nagios API for third party integration
Did the responses from eloyd and mcapra answer your questions?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Nagios API for third party integration
Yes Thanks a lot.
Is there any complete documentation for API developer. i.e. response data details and how to call all API.
Is there any complete documentation for API developer. i.e. response data details and how to call all API.
Re: Nagios API for third party integration
Did you read https://labs.nagios.com/2014/06/19/expl ... 0-7-part-1?
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
Re: Nagios API for third party integration
Let me chime in here...
This "JSON-feature" looks great! I have on question though: Where can I find a description of all the result "fields"?
E.g.
"host_name", "description", "time_ok", "time_warning", "time_critical" and "time_unknown" seems quite straightforward - but the other six?
As I said, are there and documentation available which explains this?
This "JSON-feature" looks great! I have on question though: Where can I find a description of all the result "fields"?
E.g.
Code: Select all
"servicegroup": {
"name": "XYZ",
"services": [
{
"host_name": "ABC",
"description": "DEF",
"time_ok": 0,
"time_warning": 0,
"time_critical": 0,
"time_unknown": 0,
"scheduled_time_ok": 0,
"scheduled_time_warning": 0,
"scheduled_time_critical": 0,
"scheduled_time_unknown": 0,
"time_indeterminate_nodata": 0,
"time_indeterminate_notrunning": 0
},
As I said, are there and documentation available which explains this?
--
D/\N
D/\N
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Nagios API for third party integration
It looks like nothing other than the URLs already given. Of course, it's all hanging out at https://github.com/NagiosEnterprises/nagioscore/ too.danjoh wrote: As I said, are there and documentation available which explains this?