From: Matthew E. <mat...@us...> - 2007-06-18 22:13:23
|
Matthew Epp wrote: > Tom Georgoulias wrote: >> NCV works by grabbing the NCV stuff (with : or =, I believe) separated >> by new lines. Ignore the "=====" lines in the previous message, those >> were added for posting to the mailing list and aren't present in my >> devmon template. If those are included, I would imagine that NCV would >> get confused because of the "=". > > Well, I think I found out the trick finally. It seems that if I put the > data lines before any other text, AND make sure that none of the other > output contains any colons, then Hobbit picks it up: > > My message file looks like: > cpu : {CPUTotal5Min} > > {CPUTotal5Min.color} {CPUTotal5Min.msg} > > > And the output looks like: > cpu : 2 > > &green CPU utilization is nominal > > > If I put the data after the status, it stops updating the rrd file. I > had to remove the lines that normally report uptime since they contained > colons for the date. Not sure if there's any way to escape those, but I > can live without that info being displayed. > > I don't suppose you know what DS value I'd have to send to Hobbit for > the memory graphs? I've tried using realmempct, real, memory.real, but I > guess I'll have to ask over in the Hobbit list to see if it's possible. D'oh, the answer was right in front of me. I forgot that the old Big Brother had a bb-memory.sh script that it used to generate that data, so all I had to do was replicate it, since Hobbit has that nice backwards compatibility built into it for the old clients. Just make your devmon messages file look like: Memory Used Total Percentage {percMemUsed.color} Physical {megMemUsed}M {megMemTotal}M {percMemUsed}% And a transforms file like: MemTotal : MATH : {MemUsed} + {MemAvail} xpercMemUsed : MATH : ({MemUsed} / {MemTotal}) x 100 percMemUsed : REGSUB : {xpercMemUsed} /(.*)\..*/$1/ megMemUsed : MATH : {MemUsed} / 1024000 megMemTotal : MATH : {MemTotal} / 1024000 |