You are here

Submitting Passive Checks through REST API

2 posts / 0 new
Last post
jayeshs2000
jayeshs2000's picture
Submitting Passive Checks through REST API

I could not find any documentation for submitting passive checks through the OpsView REST API.

I tried to install Nagios NRDP to submit passive checks that way, but testing that through the browser failed with:

<result> <status>-1</status> <message>COMMAND FILE UNWRITEABLE</message> </result>   Anybody else use passive checks with their OpsView installation? How do you script those?    
awijntje
awijntje's picture
Re: Submitting Passive Checks through REST API

he there,

Opsview uses NRD to recieve check information (most notably from slaves in a distributed setup) but you can also use NSCA to submit passive checks.

I'm not sure it is even possible to submit a check result using the API (it is mainly focussed on provisioning (adding hosts and users) and retrieving information).

Had a quick look at the documentation for NRDP and it seems NRDP writes directly to the nagios spool directory (and not as NSCA to the external command file).

So in this case you would have to look into how you set the spool directory in NRDP to get it write it to the correct spool directory in the Opsview install (althought this should be the same as a vanilla nagios install).

It does however require you to make the checks you are running into passive checks (as they might now be active checks).

Hope this helps,

Alan