[rrd-users] CDEF: comparing Strings

Andre Luis andre.luis at paxtecnologia.com.br
Tue Nov 8 13:43:28 CET 2011


how do I do that? ..
it's a xml script..
the part where the status is taken is this one:
<StatusServer>
<name>StatusServer</name>
<method>get</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.140.625.360.1.60</oid>
</StatusServer>

2011/11/8 Simon Hobson <linux at thehobsons.co.uk>

> Andre Luis wrote:
> >well, I'm doing a cacti graph to show the weblogic server status..
> >I take the status with a snmp get and my ideas was to do the following..
> >1) get the Status..
> >2) compare the status with the "Running" string
> >3) if the strings match, the variable status_value would receive the
> >value 1, else it would be 0
> >4) create the graph with the status_value variable ..so if the
> >server is running, my graphs would be in 1 .. else it would be in 0
> >..
> >
> >do you have any idea of how could I do that?
>
> Simple, in your script, translate from whatever you get back via SNMP
> to a numeric value. Eg, "good" = 1, "failed" = 0. Store that number
> (use gauge datatype) in RRD. Then what you get out from RRD will be a
> measure of "goodness" over the consolidation/normalisation period
> queried. Eg, if when you consolidate, half the samples were 1, and
> half were 0, then you'd get 0.5 returned.
>
> --
> Simon Hobson
>
> Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
> author Gladys Hobson. Novels - poetry - short stories - ideal as
> Christmas stocking fillers. Some available as e-books.
>
> _______________________________________________
> rrd-users mailing list
> rrd-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
>



-- 
Att,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20111108/bd1d5987/attachment.htm 


More information about the rrd-users mailing list