<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix"><tt>SebA,<br>
<br>
You could get around around this problem by writing a simple
script that calls the test and parses the result and splits it
into lines to be sent to Xymon. For example, a basic Perl
example:<br>
<br>
# Begin Script<br>
my $result = `test_that_returns_data`;<br>
<br>
($u, $rc, $asc, $usc) = split(',' $result);<br>
<br>
$msg = "U : $u\n";<br>
$msg .= "RC : $rc\n";<br>
$msg .= "ASC: $asc\n";<br>
$msg .= "USC: $usc";<br>
<br>
`xymon 127.0.0.1 \"status host.mytest green $msg\n\"`; <br>
#End Script<br>
<br>
In other words use the script to call the test (instead of
Xymon) split the results on the comma and then build a new
string with newline characters inserted. Your result reported
to Xymon would be:<br>
<br>
U : 1391595<br>
RC : 3517<br>
ASC: 1628<br>
USC: 2154<br>
<br>
... and easily read by Xymon's NCV.<br>
<br>
Alternatly, you can also look at the section in the Xymon_RRD
man page that discusses "Custom RRD Data Via Scripts". This
would spell out how to do what you like. With that said, I have
never tried it this route as it seems (from the man page) that
it is more taxing than the method I showed above.<br>
</tt>
<pre class="moz-signature" cols="72">Michael Beatty
Sherwin-Williams
IT Analyst/Developer
<a class="moz-txt-link-abbreviated" href="mailto:michael.beatty@sherwin.com">michael.beatty@sherwin.com</a>
216-515-7374
</pre>
On 01/22/2013 05:55 AM, SebA wrote:<br>
</div>
<blockquote
cite="mid:!&!AAAAAAAAAAAuAAAAAAAAAL60wriLM9cRsTVojW0AAAABAFEdQVQs6tMRsLEAoMxarIMAAAABk2cAABAAAABqQFWHKNjVRIe+mnW5s9pJAQAAAAA=@syntec.co.uk"
type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<meta name="GENERATOR" content="MSHTML 9.00.8112.16447">
<div><span class="579393310-22012013"><font face="Arial" size="2">I
was hoping that Xymon's NCV parsing would understand JSON as
the tutorial @ <a moz-do-not-send="true"
href="http://www.xymon.com/xymon/help/howtograph.html">http://www.xymon.com/xymon/help/howtograph.html</a> does
not specify that the NCVs need to be on seperate lines
(although I subsequently found that "man xymond_rrd" does).
It's a shame because a lot of data is presented as JSON
these days. For example, I have this test, which returns
this:</font></span></div>
<div><span class="579393310-22012013">
<pre><a moz-do-not-send="true" href="http://URLremoved/">http://URLremoved/</a> - Testing <a moz-do-not-send="true" href="http://192.168.4.135:8080/tracker/co.do">URL</a> yields:
{ u:1391595, rc:3517, asc:1628, usc:2154}</pre>
</span></div>
<div><font face="Arial" size="2"><span class="579393310-22012013">I
am using SPLITNCV and it just creates a testname,_u.rrd
file.</span></font></div>
<div><font face="Arial" size="2"><span class="579393310-22012013"></span></font> </div>
<div><font face="Arial" size="2"><span class="579393310-22012013">I
doubt it would involve a huge diff to get
/xymond/rrd/do_ncv.c to understand this format. I also
doubt that it is currently within my level of C programming
proficiency though unfortunately.</span></font></div>
<!-- Converted from text/rtf format -->
<p align="left"><span lang="en-gb"><font face="Arial" size="2">Kind
regards,</font></span> </p>
<p><span lang="en-gb"><font face="Arial" size="2"><span
class="579393310-22012013">SebA</span></font></span></p>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Xymon mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Xymon@xymon.com">Xymon@xymon.com</a>
<a class="moz-txt-link-freetext" href="http://lists.xymon.com/mailman/listinfo/xymon">http://lists.xymon.com/mailman/listinfo/xymon</a>
</pre>
</blockquote>
<br>
<br>
</body>
</html>