[xymon] rrd change
Vernon Everett
everett.vernon at gmail.com
Thu Jan 6 12:57:43 CET 2011
Then the answer is simple.
This applies to the memory test, which is a Xymon default or built-in test.
So it gets special treatment.
Change the name of your test, call it mem, or memory2 or anything else not
already used, and treat it as a custom test.
You need to add it the GRAPHS= TEST2RRD= and add an NCV_Testname in the
hobbitserver.cfg and it should work.
Just remember to create a corresponding entry in the hobbitgraph.cfg script,
and changes to hobbitserver.cfg need a restart of the server.
It should just work.
Cheers
Vernon
On Thu, Jan 6, 2011 at 7:38 PM, Claessens Jurgen <Jurgen.Claessens at cegeka.be
> wrote:
> Hello,
>
>
>
> Thanks all for helping so far, but i have found the culprit and I fear it
> can’t be solved unless they adjust the rrd program itself. Hard coded in rrd
> the line below is found so I think it’s impossible to go above 100% If any
> know a way please let me know.
>
>
>
> if ((actval >= 0) && (actval <= 100)) {
>
> sprintf(rrdfn, "memory.actual.rrd");
>
> sprintf(rrdvalues, "%d:%d", (int)tstamp, actval);
>
> create_and_update_rrd(hostname, rrdfn,
> memory_params, memory_tpl);
>
> }
>
>
>
>
>
> *From:* Claessens Jurgen [mailto:Jurgen.Claessens at cegeka.be]
> *Sent:* donderdag 6 januari 2011 11:38
> *To:* xymon at xymon.com
> *Subject:* RE: [xymon] rrd change
>
>
>
> Hello,
>
>
>
> The script send over an html file to the server. So the data in that end
> stays the same. The Text(X_Status) is just color coding.
>
> Below you can see the HTML being generated. I checked the rrd file and as
> far as I can tell there’s no max limit set.
>
>
>
>
>
> <!-- Round Robin Database Dump --><rrd> <version> 0003 </version>
>
> <step> 300 </step> <!-- Seconds -->
>
> <lastupdate> 1294279930 </lastupdate> <!-- 2011-01-06
> 03:12:10 CET -->
>
>
>
> <ds>
>
> <name> realmempct </name>
>
> <type> GAUGE </type>
>
> <minimal_heartbeat> 600 </minimal_heartbeat>
>
> <min> 0.0000000000e+00 </min>
>
> <max> NaN </max>
>
>
>
> <!-- PDP Status -->
>
> <last_ds> UNKN </last_ds>
>
> <value> NaN </value>
>
> <unknown_sec> 130 </unknown_sec>
>
> </ds>
>
>
>
> *Script output*
>
> objFile.WriteLine(Text(Global_Status))
>
> objFile.WriteLine("<h3>" & Now & " - Memory " & Text(Global_Status) &
> "</h3>")
>
> objFile.WriteLine("<table border=0>")
>
> objFile.WriteLine("<tr align=right><td align=""left""
> width=100>Memory</td><td width=100>Used</td><td width=100>Total</td><td
> width=100>Percentage</td><td width=40> </td></tr>")
>
> objFile.WriteLine("<tr align=right><td align=""left""
> style=""color:red"">&" & Text(Phys_Status) & " Physical</td><td>" &
> Round(Phys_Used) & "M</td><td>" & Round(Phys_Total) & "M</td><td>" &
> Round(Phys_Pct) & "%</td><td width=40> </td></tr>")
>
> objFile.WriteLine("<tr align=right><td align=""left""
> style=""color:blue"">&" & Text(Virt_Status) & " Virtual</td><td>" &
> Round(Virt_Used) & "M</td><td>" & Round(Virt_Total) & "M</td><td>" &
> Round(Virt_Pct) & "%</td><td width=40> </td></tr>")
>
> objFile.WriteLine("<tr align=right><td align=""left""
> style=""color:green"">&" & Text(Page_Status) & " Swap
>  </td><td>" & Round(Page_Used) & "M</td><td>" &
> Round(Page_Total) & "M</td><td>" & Round(Page_Pct) & "%</td><td
> width=40> </td></tr>")
>
> objFile.WriteLine("</table>")
>
> objFile.Close
>
>
>
> Regards
>
>
>
> *From:* Vernon Everett [mailto:everett.vernon at gmail.com]
> *Sent:* donderdag 6 januari 2011 10:38
> *To:* xymon at xymon.com
> *Subject:* Re: [xymon] rrd change
>
>
>
> Hmmm. That's interesting.
>
> So, nothing is getting to the rrd file for the rrd graphing module to read.
>
> Have you checked that the values are being sent through correctly?
> By this, I mean, when it exceeds 100%, is your script still sending data
> correctly?
> Do you have some code somewhere in your script that sends non-numeric
> output at 100 or over?
> Think in terms of what changes at 100 or above? You have moved from 2
> characters to 3.
> Also, has the input to your script changes in some subtle way at 100%,
> which will change the output.
> Remember, for NCV to work, the output has to be
> fieldname : value
> on a line on their own.
> Any garbage will break it. Check especially for non-printable characters
> and control codes.
> Dump your output to a file, and use cat -v
>
> Cheers
> Vernon
>
> On Thu, Jan 6, 2011 at 4:53 PM, Claessens Jurgen <
> Jurgen.Claessens at cegeka.be> wrote:
>
> Hello,
>
>
>
> Thank you for the quick response. I checked the rrd data and it seems that
> no data is being written to the file when it exceeds 100%. Any idea where
> the problem could be located and how to fix it?
>
> As I said below 100% it writes fine, so I’m guessing that it’s not the
> format that is sent to Xymon, but how rrd reads it?
>
>
>
> Regards
>
>
>
> *From:* Vernon Everett [mailto:everett.vernon at gmail.com]
> *Sent:* donderdag 6 januari 2011 9:15
> *To:* xymon at xymon.com
> *Subject:* Re: [xymon] rrd change
>
>
>
> First check the values in the rrd file.
> Make sure they are being written to the data file.
>
> Next, check hobbitgraphs.cfg
> Your graph definition probably has
> -l 0
> -u 100
> Lower bound 0
> Upper bound 100
>
> Remove the -u 100, and the graph will automatically rescale itselft to the
> new data values.
>
> Regards
> Vernon
>
> On Thu, Jan 6, 2011 at 2:45 PM, Claessens Jurgen <
> Jurgen.Claessens at cegeka.be> wrote:
>
> Hello,
>
> I have an issue with a custom memory script I wrote. The script delivers
> everything fine and also the data is processed correctly in Xymon, but when
> the data goes above 100%, which it can, no more graphs are created. When it
> drops graphs are ok again. Does anyone know where/how exactly I need to
> modify the rrd so it accepts above 100% to create the graphs.
>
> Thx in advance
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20110106/afac7c09/attachment.html>
More information about the Xymon
mailing list