[Xymon] graph shows incorrect data
Naveen Kumar Venkatesh
naveen20 at gmail.com
Tue Sep 10 15:51:59 CEST 2013
Hi,
I am new to Xymon. I have setup Xymon to monitor my performance servers. I
have written custom scripts to collect some specific data, and added it to
clientlaunch.cfg to run at every 5 second interval
[gc]
ENVFILE $XYMONCLIENTHOME/etc/xymonclient.cfg
CMD $XYMONCLIENTHOME/ext/gc_stats.sh
LOGFILE $XYMONCLIENTHOME/tmp/msg.gc_stats.log
INTERVAL 5
gc_stats.sh looks like this.
======================
pid=`pgrep rdu`
#Fact=1024.0
Fact=0.0009765
gc=`/opt/jdk1.6.0_24/bin/jstat -gc ${pid} |tail -1`
IFS=' '
read -a array <<< "$gc"
EdenCap=${array[4]}
EdenUsed=${array[5]}
OldCap=${array[6]}
OldUsed=${array[7]}
PermCap=${array[8]}
PermUsed=${array[9]}
EdenCap=`echo "$EdenCap * $Fact"|bc`
EdenUsed=`echo "$EdenUsed * $Fact"|bc`
OldCap=`echo "$OldCap * $Fact"|bc`
OldUsed=`echo "$OldUsed * $Fact"|bc`
PermCap=`echo "$PermCap * $Fact"|bc`
PermUsed=`echo "$PermUsed * $Fact"|bc`
COLOR=green
COLUMN=HeapStats
MSG="EdenCapacity: ${EdenCap}
EdenUsed: ${EdenUsed}
OldCapacity: ${OldCap}
OldUsed: ${OldUsed}
PermCapacity: ${PermCap}
PermUsed: ${PermUsed}
"
# Tell Xymon about it
$XYMON $XYMSRV "status $MACHINE.$COLUMN $COLOR `date`
${MSG}
"
exit 0
========================================
On the server side, I have added the following in xymonserver.cfg
-------------------------
TEST2RRD="cpu=la,disk,inode,qtree,memory,$PINGCOLUMN=tcp,http=tcp,dns=tcp,dig=tcp,time=ntpstat,vmstat,iostat,netstat,temperature,apache,bind,sendmail,mailq,nmailq=mailq,socks,bea,iishealth,citrix,bbgen,bbtest,bbproxy,hobbitd,files,procs=processes,ports,clock,lines,ops,stats,cifs,JVM,JMS,HitCache,Session,JDBCConn,ExecQueue,JTA,TblSpace,RollBack,MemReq,InvObj,snapmirr,snaplist,snapshot,if_load=devmon,temp=devmon,paging,mdc,mdchitpct,cics,dsa,getvis,maxuser,nparts,xymongen,xymonnet,xymonproxy,xymond,HeapStats=ncv"
NCV_HeapStats="EdenCapacity:GAUGE,EdenUsed:GAUGE,OldCapacity:GAUGE,OldUsed:GAUGE,PermCapacity:GAUGE,PermUsed:GAUGE"
GRAPHS="la,disk,inode,qtree,files,processes,memory,users,vmstat,iostat,tcp.http,tcp,ncv,netstat,ifstat,mrtg::1,ports,temperature,ntpstat,apache,bind,sendmail,mailq,socks,bea,iishealth,citrix,bbgen,bbtest,bbproxy,hobbitd,clock,lines,ops,stats,cifs,JVM,JMS,HitCache,Session,JDBCConn,ExecQueue,JTA,TblSpace,RollBack,MemReq,InvObj,snapmirr,snaplist,snapshot,devmon::1,if_load::1,temp,paging,mdc,mdchitpct,cics,dsa,getvis,maxuser,nparts,xymongen,xymonnet,xymonproxy,xymond,HeapStats"
----------------------------
I have added the below in graphs.cfg
==============================
[HeapStats]
TITLE HeapStats info
YAXIS MegaBytes
-l 0.000
DEF:EdenUsed=HeapStats.rrd:EdenUsed:AVERAGE
DEF:EdenCapacity=HeapStats.rrd:EdenCapacity:AVERAGE
DEF:OldCapacity=HeapStats.rrd:OldCapacity:AVERAGE
DEF:OldUsed=HeapStats.rrd:OldUsed:AVERAGE
DEF:PermCapacity=HeapStats.rrd:PermCapacity:AVERAGE
DEF:PermUsed=HeapStats.rrd:PermUsed:AVERAGE
LINE1:EdenCapacity#FF0000: EdenCapacity
LINE2:EdenUsed#808080: EdenUsed
LINE3:OldCapacity#00CC00: OldCapacity
LINE4:OldUsed#00CCCC: OldUsed
LINE5:PermCapacity#FFFF00: PermCapacity
LINE6:PermUsed#CFFFF0: PermUsed
COMMENT:\n
GPRINT:EdenCapacity:LAST:EdenCapacity \: %5.1lf (cur)
GPRINT:EdenCapacity:MAX: \: %5.1lf (max)
GPRINT:EdenCapacity:MIN: \: %5.1lf (min)
GPRINT:EdenCapacity:AVERAGE: \: %5.1lf (avg)\n
COMMENT:\n
GPRINT:EdenUsed:LAST:EdenUsed \: %5.1lf (cur)
GPRINT:EdenUsed:MAX: \: %5.1lf (max)
GPRINT:EdenUsed:MIN: \: %5.1lf (min)
GPRINT:EdenUsed:AVERAGE: \: %5.1lf (avg)\n
COMMENT:\n
GPRINT:OldCapacity:LAST:OldCapacity \: %5.1lf (cur)
GPRINT:OldCapacity:MAX: \: %5.1lf (max)
GPRINT:OldCapacity:MIN: \: %5.1lf (min)
GPRINT:OldCapacity:AVERAGE: \: %5.1lf (avg)\n
COMMENT:\n
GPRINT:OldUsed:LAST:OldUsed \: %5.1lf (cur)
GPRINT:OldUsed:MAX: \: %5.1lf (max)
GPRINT:OldUsed:MIN: \: %5.1lf (min)
GPRINT:OldUsed:AVERAGE: \: %5.1lf (avg)\n
COMMENT:\n
GPRINT:PermCapacity:LAST:PermCapacity \: %5.1lf (cur)
GPRINT:PermCapacity:MAX: \: %5.1lf (max)
GPRINT:PermCapacity:MIN: \: %5.1lf (min)
GPRINT:PermCapacity:AVERAGE: \: %5.1lf (avg)\n
COMMENT:\n
GPRINT:PermUsed:LAST:PermUsed \: %5.1lf (cur)
GPRINT:PermUsed:MAX: \: %5.1lf (max)
GPRINT:PermUsed:MIN: \: %5.1lf (min)
GPRINT:PermUsed:AVERAGE: \: %5.1lf (avg)\n
============================
In the HeapStats (column) page, I see the latest values obtained in the
text message like this.
=========
Tue Sep 10 12:15:48 IST 2013
EdenCapacity: 1080.8058240
EdenUsed: 1053.1013472
OldCapacity: 2744.8243200
OldUsed: 91.4092861
PermCapacity: 44.9346240
PermUsed: 44.7480148
============
But, when it comes to graph it is showing stale data always. It is not
reflecting the latest data
[image: xymongraph ncv:HeapStats]
======
Sorry for the long mail. Could some one help me with this? I want all
the data being collected to be persisted in the rrd files.
Any help is very much appreciated.
Thanks,
NV
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20130910/a04db67c/attachment.html>
More information about the Xymon
mailing list