NCV RRD weirdness
list Jeff Stuart
OK, so I've finally delved into the murky waters (ok so I had to make
that sound scary and all fearsome and what not LOL) of writing my own
Hobbit server extension script. And as part of the script, it collects
data. I want to graph that data on hobbit. So I set up the NCV
stuff... problem is that it doesn't create the RRD file correctly.
Here's the relevant entries from hobbitserver.cfg:
TEST2RRD="cpu=la,disk,inode,qtree,memory,$PINGCOLUMN=tcp,http=tcp,dns=tcp,dig=tcp,time=ntpstat,vmstat,iostat,netstat,temperat
ure,apache,bind,sendmail,mailq,nmailq=mailq,socks,bea,iishealth,citrix,bbgen,bbtest,bbproxy,hobbitd,qstat=ncv"
# This defines which RRD files to include on the "trends" column webpage,
# and the order in which they appear.
GRAPHS="la,disk,inode,qtree,memory,users,vmstat,iostat,tcp.http,tcp,netstat,mrtg::1,temperature,ntpstat,apache,bind,sendmail,
mailq,socks,bea,iishealth,citrix,bbgen,bbtest,bbproxy,hobbitd,qstat"
#
# Ok these columns are from qstat and are used to graph (I HOPE!) the
columns via rrd.
#
NCV_qstat="avgping:GAUGE,curplayers:GAUGE"
And that status message that gets sent is this:
qstat status for host 123.123.123.123
curplayers : 0
avgping : 0
IE my ext script does this:
$BB $BBDISP "status $MACHINE.$COLUMN $COLOR `date`
${MSG}
curplayers : $cur_players
avgping : $avg_ping"
Where $MSG can be changed depending on circumstances.
However, when I dump the RRD file, I get this info:
<!-- Round Robin Database Dump -->
<rrd>
<version> 0001 </version>
<step> 300 </step> <!-- Seconds -->
<lastupdate> 1133107889 </lastupdate> <!-- 2005-11-27 10:11:29
CST -->
<ds>
<name> qstatstatusforhost6 </name>
<type> DERIVE </type>
<minimal_heartbeat> 600 </minimal_heartbeat>
<min> 0.0000000000e+00 </min>
<max> NaN </max>
<!-- PDP Status -->
<last_ds> 0 </last_ds>
<value> 0.0000000000e+00 </value>
<unknown_sec> 0 </unknown_sec>
</ds>
Any thoughts as to what I'm doing wrong? This is on hobbit 4.1.2p1.
(1038:38)$ rpm -q -a | grep hobbit
hobbit-client-4.1.2p1-1.fc3.re
hobbit-4.1.2p1-1.fc3.re
--
Jeff Stuart
Network Admin
MyInternetServices.com
1-800-300-HOST
--
list Jeff Stuart
▸
Jeff Stuart wrote:
OK, so I've finally delved into the murky waters (ok so I had to make
that sound scary and all fearsome and what not LOL) of writing my own
Hobbit server extension script. And as part of the script, it collects
data. I want to graph that data on hobbit. So I set up the NCV
stuff... problem is that it doesn't create the RRD file correctly.
Here's the relevant entries from hobbitserver.cfg:
TEST2RRD="cpu=la,disk,inode,qtree,memory,$PINGCOLUMN=tcp,http=tcp,dns=tcp,dig=tcp,time=ntpstat,vmstat,iostat,netstat,temperat
ure,apache,bind,sendmail,mailq,nmailq=mailq,socks,bea,iishealth,citrix,bbgen,bbtest,bbproxy,hobbitd,qstat=ncv"
# This defines which RRD files to include on the "trends" column webpage,
# and the order in which they appear.
GRAPHS="la,disk,inode,qtree,memory,users,vmstat,iostat,tcp.http,tcp,netstat,mrtg::1,temperature,ntpstat,apache,bind,sendmail,
mailq,socks,bea,iishealth,citrix,bbgen,bbtest,bbproxy,hobbitd,qstat"
#
# Ok these columns are from qstat and are used to graph (I HOPE!) the
columns via rrd.
#
NCV_qstat="avgping:GAUGE,curplayers:GAUGE"
And that status message that gets sent is this:
qstat status for host 123.123.123.123
curplayers : 0
avgping : 0
IE my ext script does this:
$BB $BBDISP "status $MACHINE.$COLUMN $COLOR `date`
${MSG}
curplayers : $cur_players
avgping : $avg_ping"
Where $MSG can be changed depending on circumstances.
However, when I dump the RRD file, I get this info:
<!-- Round Robin Database Dump -->
<rrd>
<version> 0001 </version>
<step> 300 </step> <!-- Seconds -->
<lastupdate> 1133107889 </lastupdate> <!-- 2005-11-27 10:11:29
CST -->
<ds>
<name> qstatstatusforhost6 </name>
<type> DERIVE </type>
<minimal_heartbeat> 600 </minimal_heartbeat>
<min> 0.0000000000e+00 </min>
<max> NaN </max>
<!-- PDP Status -->
<last_ds> 0 </last_ds>
<value> 0.0000000000e+00 </value>
<unknown_sec> 0 </unknown_sec>
</ds>
Any thoughts as to what I'm doing wrong? This is on hobbit 4.1.2p1.
(1038:38)$ rpm -q -a | grep hobbit
hobbit-client-4.1.2p1-1.fc3.re
hobbit-4.1.2p1-1.fc3.re
Ok... well it seems that I wasn't allowed to have my message as the first line of the status report. Once I removed that, it collected the first data point. IE curplayers. But it's not collecting avgping. Is this correct? Or should I send each of these data points as a data message instead of in status? -- Jeff Stuart Network Admin MyInternetServices.com 1-800-300-HOST --
list Jeff Stuart
Jeff Stuart wrote:
AH HAH... my problem is solved!!!
Seems that I had to have an extra carriage return (or make the value(s)
show up first in my status) for it to find TWO data points!
Now I get this in my rrd file:
<version> 0001 </version>
<step> 300 </step> <!-- Seconds -->
<lastupdate> 1133148517 </lastupdate> <!-- 2005-11-27 21:28:37
CST -->
<ds>
<name> curplayers </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> 1.0000000000e+02 </value>
<unknown_sec> 207 </unknown_sec>
</ds>
<ds>
<name> avgping </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> 4.2000000000e+02 </value>
<unknown_sec> 207 </unknown_sec>
</ds>
Which is EXACTLY what I wanted!!!! :) Might want to stress that Henrik.
:) I had to do this in my ext script:
$BB $BBDISP "status $MACHINE.$COLUMN $COLOR `date`
curplayers : $cur_players
avgping : $avg_ping
${MSG}"
Now if I hadn't sent ${MSG} it would have to look like this:
$BB $BBDISP "status $MACHINE.$COLUMN $COLOR `date`
curplayers : $cur_players
avgping : $avg_ping
"
Now my next question.. LOL I'd like to have two SEPARATE graphs for
this stuff... I tried this:
[qstat]
TITLE Current Number of Players
YAXIS # of Players
DEF:curplayers=qstat.rrd:curplayers:AVERAGE
LINE2:curplayers#00CCCC:Current Players
COMMENT:\n
GPRINT:curplayers:LAST: \: %5.1lf (cur)
GPRINT:curplayers:MAX: \: %5.1lf (max)
GPRINT:curplayers:MIN: \: %5.1lf (min)
GPRINT:curplayers:AVERAGE: \: %5.1lf (avg)\n
[qstat1]
TITLE Average Ping
YAXIS ms
DEF:avgping=qstat.rrd:avgping:AVERAGE
LINE2:avgping#00CCCC:Average Ping
COMMENT:\n
GPRINT:avgping:LAST: \: %5.1lf (cur)
GPRINT:avgping:MAX: \: %5.1lf (max)
GPRINT:avgping:MIN: \: %5.1lf (min)
GPRINT:avgping:AVERAGE: \: %5.1lf (avg)\n
And that didn't work. Now if I moved the qstat1 stuff (minus title and
yaxis) up into qstat.. I got one graph with two lines... I GUESS that's
ok but.. ;)
--
Jeff Stuart
Network Admin
MyInternetServices.com
1-800-300-HOST
--
list Jeff Stuart
And as a followup. Is there any way I can add some graphs from other hosts? IE a number of our game servers are on the same physical machine. IE something like: 123.123.123.123 <--- Main IP 123.123.123.124 123.123.123.125 123.123.123.126 For the game servers on say .124 and .126 I'd also like the CPU/Mem graphs on the trends page also. Is this possible? -- Jeff Stuart Network Admin MyInternetServices.com 1-800-300-HOST --