<div class="gmail_quote">On Mon, Oct 10, 2011 at 2:58 PM, T.J. Yang <span dir="ltr"><<a href="mailto:tjyang2001@gmail.com">tjyang2001@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi, Henrik<br>
<br>
Passing message without encryption among xymon client and server will<br>
cause concerns in corporate  IT.<br>
I know you did some work at previous branches, can you activate this<br>
message encryption work or put it on roadmap ?<br></blockquote><div><br></div><div>I was taking another crack at this today and found some interesting things.  The xymon command, which delivers messages to the server, can take a URL for a parameter.  Also, lurking in xymon-4.3.5/xymonproxy there is a little program called xymoncgimsg, which takes an HTTP-delivered Xymon message and hands it directly to Xymon.  I went a step further and poked around in the code to see what was being sent, and came up with this:</div>
<div><br></div><div>1) Discover the state of some service, including the color. Assemble the report:</div><div><br></div><div>     MESSAGE="status $MACHINE.$TEST $COLOR `date`</div><div>        some message(s) relating to the test we're reporting"</div>
<div><br></div><div>2) instead of doing: $XYMON $XYMSRV "$MESSAGE"  to deliver, do this:</div><div><br></div><div>     curl -s -S -L --cacert /path/to/secure/xymon-server/cert.pem \</div><div>           -H "Content-Ty[e: application/octet-stream" \<br>
</div><div>           -H "MIME-version: 1.0" \</div><div>           -d "$MESSAGE" \</div><div>           <a href="https://secure-xymon.server.com/xymon-cgi/xymoncgimsg.cgi">https://secure-xymon.server.com/xymon-cgi/xymoncgimsg.cgi</a></div>
<div><br></div><div>Curl validates the server certificate and manages the encrypted connection.  $MESSAGE is shoved down the pipe to the cgi script and directly to xymon.</div><div><br></div><div>Ralph Mitchell</div></div>