Page 1 of 1

Is the Nagios 4.X API read only?

Posted: Wed Apr 29, 2015 5:54 pm
by instantkarma
Hello,

I'm learning to use APIs and would like to be able to silence alarms, comment, etc. with out having to do it manually for each host in Nagios. My technical understanding of RESTful services and JSON is still pretty weak. I'm using nagios-api and nagira in a dev environment, they each have their strengths and weaknesses, but productionalizing them will take time that I could apply elsewhere, so what about the built-in Nagios API? JSONquery works fine for a dashboard but I'm not seeing a PUT/POST mechanism. Google has not been particularly helpful, and sorry, but the Nagios documentation isn't great in this regard, so I thought I'd better just ask the smart people of this forum.

How do you guys recommend programattically going about doing this? I would love to hear your thoughts!

Specifically, this is for Nagios 4.0.8 and Apache 2.2.27, both built from source running on Ubuntu 12.04 LTS. Am I reading that 4.1 will have this ability?

Thank you and thank you again!

Re: Is the Nagios 4.X API read only?

Posted: Thu Apr 30, 2015 11:28 am
by abrist
The JSON api is indeed read only. We have discussed adding command submission, etc to the api, but for now, it is just for pulling object config, status, and historical output. You can still submit command to the cmd.cgi as usual, so integration with other web apps is still easy and very possible.

Re: Is the Nagios 4.X API read only?

Posted: Thu Apr 30, 2015 1:33 pm
by instantkarma
Thank you, I appreciate your response.

Re: Is the Nagios 4.X API read only?

Posted: Thu Apr 30, 2015 2:11 pm
by ssax
Can we mark this as resolved and lock the topic?

Re: Is the Nagios 4.X API read only?

Posted: Fri May 01, 2015 5:45 pm
by instantkarma
Yes, thanks