[Xymon] xymoncgimsg.cgi

Ralph Mitchell ralphmitchell at gmail.com
Wed Dec 7 19:10:20 CET 2011


I just realized that my response went solely to Henrik, instead of going to
the list address as I expected.  So, here it is again.

On Tue, Dec 6, 2011 at 4:11 PM, Henrik Størner <henrik at hswn.dk> wrote:

> On 06-12-2011 21:17, Stef Coene wrote:
>
>> Hi,
>>
>> Some time ago Ralph Mitchell posted a message that he was able to use
>> curl to post a message to the cgi script xymoncgimsg.cgi.
>> http://comments.gmane.org/**gmane.comp.monitoring.hobbit/**27772<http://comments.gmane.org/gmane.comp.monitoring.hobbit/27772>
>> I'm trying to do the same, but it's not working.
>>
>
> I tried it here, and it works fine. You need to copy the xymoncgimsg.cgi
> binary to your ~xymon/cgi-bin/ directory (or setup a symlink and configure
> the webserver to accept links), but then it works fine.
>
> I didn't try the SSL client-certificate stuff that Ralph was doing, but a
> plain "send a command to xymond" stuff is working OK.
>
> Here's the commandline I used:
>
> curl \
>   -d "xymondboard" \
>   -H "Content-type: application/octet-stream" \
>   -H "Mime-version: 1.0" \
>   http://www.xymon.com/xymon-**cgi/xymoncgimsg.cgi<http://www.xymon.com/xymon-cgi/xymoncgimsg.cgi>
>
> This just sends a "xymondboard" command to fetch the current status of all
> Xymon tests; you can replace it with a status message or the client data,
> if that is what you want to transmit.
>
> Note that if you use an https-URL, many curl installations do not come
> with an up-to-date set of root certificates, so you will either need to
> update that - or use the "-k" option to disable checking of the SSL
> certificate from the server.




Yep, that's how I did it.  As far as certificates go, if you're posting to
a secure server that you control, you should be able to lift the CA cert
chain from the server itself.  It ought to have the certs to verify its own
cert when it starts up.  You can cat several pem-encoded certs together
into one file, then supply that to curl:

     --cacert /path/to/secure/xymon-server/cert.pem

or dump the individual pem certs into a directory and give that location
using --capath.

Ralph Mitchell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20111207/f9d0ef58/attachment.html>


More information about the Xymon mailing list