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.<br><br><div class="gmail_quote">On Tue, Dec 6, 2011 at 4:11 PM, Henrik Størner <span dir="ltr"><<a href="mailto:henrik@hswn.dk">henrik@hswn.dk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On 06-12-2011 21:17, Stef Coene wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
Some time ago Ralph Mitchell posted a message that he was able to use<br>
curl to post a message to the cgi script xymoncgimsg.cgi.<br>
<a href="http://comments.gmane.org/gmane.comp.monitoring.hobbit/27772" target="_blank">http://comments.gmane.org/<u></u>gmane.comp.monitoring.hobbit/<u></u>27772</a><br>
I'm trying to do the same, but it's not working.<br>
</blockquote>
<br></div>
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.<br>
<br>
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.<br>
<br>
Here's the commandline I used:<br>
<br>
curl \<br>
   -d "xymondboard" \<br>
   -H "Content-type: application/octet-stream" \<br>
   -H "Mime-version: 1.0" \<br>
   <a href="http://www.xymon.com/xymon-cgi/xymoncgimsg.cgi" target="_blank">http://www.xymon.com/xymon-<u></u>cgi/xymoncgimsg.cgi</a><br>
<br>
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.<br>
<br>
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.</blockquote>
<div><br></div><div> </div></div><div><br></div><div><div>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:</div>
<div><br></div><div>     --cacert /path/to/secure/xymon-server/cert.pem</div><div><br></div><div>or dump the individual pem certs into a directory and give that location using --capath.</div></div><div><br></div><div>Ralph Mitchell</div>
<div><br></div>