<meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; color: rgb(34, 34, 34); ">well, I&#39;m doing a cacti graph to show the weblogic server status..<div>
I take the status with a snmp get and my ideas was to do the following..</div><div>1) get the Status..</div><div>2) compare the status with the &quot;Running&quot; string</div><div>3) if the strings match, the variable status_value would receive the value 1, else it would be 0</div>
<div>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 ..</div><div><br></div><div>do you have any idea of how could I do that?</div></span><br>
<div class="gmail_quote">2011/11/7 Simon Hobson <span dir="ltr">&lt;<a href="mailto:linux@thehobsons.co.uk">linux@thehobsons.co.uk</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">Andre Luis wrote:<br>
&gt;hello, I&#39;m new into cacti and I would like to know it there&#39;s a way<br>
&gt;to compare strings with CDEF ...<br>
&gt;<br>
&gt;I did some tests using numbers and it worked, but when I try with<br>
&gt;strings, it gives an error..&quot;ERROR: invalid rpn expression in:&quot;<br>
<br>
</div>That&#39;s because these functions only work, and only makes sense with,<br>
numbers. You cannot store strings in RRD databases, so there aren&#39;t<br>
tools to work with them.<br>
<br>
If you need to do conditionals based on strings from &quot;the outside&quot;,<br>
then you may need to dynamically build your graph/query definitions.<br>
Eg, in Bash :<br>
<br>
(<br>
   echo &quot;&lt;some stuff&gt;&quot;<br>
<br>
   if [ &quot;$a&quot; = &quot;test&quot; ]<br>
   then<br>
     echo &quot;&lt;some more stuff&gt;&quot;<br>
   else<br>
     echo &quot;&lt;some other stuff&gt;&quot;<br>
   fi<br>
   echo &quot;&lt;finishing stuff&gt;&quot;<br>
) | rrdcgi .....<br>
<br>
I have some cgi scripts building many dynamic graphs, all written in Bash.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Simon Hobson<br>
<br>
Visit <a href="http://www.magpiesnestpublishing.co.uk/" target="_blank">http://www.magpiesnestpublishing.co.uk/</a> for books by acclaimed<br>
author Gladys Hobson. Novels - poetry - short stories - ideal as<br>
Christmas stocking fillers. Some available as e-books.<br>
<br>
_______________________________________________<br>
rrd-users mailing list<br>
<a href="mailto:rrd-users@lists.oetiker.ch">rrd-users@lists.oetiker.ch</a><br>
<a href="https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users" target="_blank">https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>Att,<div><br></div><div><font face="arial, sans-serif"><span style="line-height:15px"><img src="http://209.20.66.234/ip/assinaturas/assinatura_mail_pax_andre_luis.jpg"><br>
</span></font></div><br>