On 27/04/07, jason <[EMAIL PROTECTED]> wrote:
I'm trying to do something fairly simple, just get two DataPoints off of
one command, and I think my google-fu is lacking.  I'm running the following

/usr/bin/free -o |grep Mem | awk {'print "Memory|Free="$$3" ;Used="$$4'}

which is dumping out Free=10 ;Used=20
or something like that.   I have DataPoints setup for Free and Used, but
only Free is getting populated. I know I'm doing something stupid here
and I'm sure it exists in google/wiki somewhere, but I haven't been able
to turn it up.   Can someone give me the syntax for separating out
multiple datapoint values?


I tripped over something similar, zenoss uses two regexs to read the
data, either a Nagios format one or a Cacti format one.  If the string
contains a "=" then the Nagios one is used else the Cati one.

The format for a Nagios data string is basically "name=value name2 =
value2", i.e. space separated values with no spaces around the "=".

The format for a Cacti string is basically "name:value name2:value2",
i.e. space separated values with no spaces around the ":".

There do appear to be other variations allowed, but I think these will do.

--
Regards,

Graham Bloice
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users

Reply via email to