I am posting to devel because my initial thread on the users mailing list now concerns developers more than it does the average user. <br><br>Some background first. I am developing an API into Nagios so that I can safely expose Nagios internals to scripts and applications that don't reside on the same system as the Nagios daemon. Using NFS to share the var directory was never really an option in my environment, so I put together a little API over http that uses the same Apache basic auth mechanism as the CGI's to restrict access. A query is made by forming a URL and an XML object is returned containing the query results. For example, a query like 
<a href="https://nagios.domain.com/=/find/host/address/192.168.1.1">https://nagios.domain.com/=/find/host/address/192.168.1.1</a> would return an XML object identical to the one found in the objects.cache for the host with that address, but in XML instead of a tab-delimited key/value pair inside a curly brackets block. Now that this works, I am working on adding functionality that will let me submit commands to the 
nagios.cmd pipe through my API. <br><br>My problem is that if i simply submit a command to the API and it is placed in the FIFO pipe, I have no meaningful information to pass back to the client. This creates a problem, as the client may wish to sit in a loop waiting for the command to be processed before continuing. (For example, scheduling a service downtime before stopping a database to take a backup snapshot.) I need to find some way to determine the success or failure of an external command and then return that to the client within the http timeout window. After looking at 
commands.c I am starting to believe this isn't possible with the current external commands implementation. I would really like to continue designing my API as an add-on to Nagios and not something that requires patching (or replacing) parts of the base system. 
<br><br>Any suggestions on how I would accomplish this? (More background on this at <a href="http://thread.gmane.org/gmane.network.nagios.user/51971">http://thread.gmane.org/gmane.network.nagios.user/51971</a>)<br><br>-Scott Sanders
<br>