Hello,
I am struggling with displaying custom graph.
It should display volumegroups on host with VGSIZE, VGFREE and VGPRCT (usage of VG) Number of VG are not constant, it may differ.
So i am sending it as data and i can find rrd on xymon server.
TEST=*VG*
BBVGB=$(sudo /usr/sbin/vgs --units B --nosuffix --noheadings --aligned --o vg_name,vg_size,vg_free)
while read VG VGSIZE VGFREE; do VGPRCT=$(bc <<< "scale=2;100-(${VGFREE}/${VGSIZE}*100)") DATA="${DATA} [*VG2*,${VG}.rrd] DS:vgsize:GAUGE:600:0:U ${VGSIZE} DS:vgfree:GAUGE:600:0:U ${VGFREE} DS:vgprct:GAUGE:600:0:100 ${VGPRCT} " done <<< "${BBVGB}"
It produce [*VG2*,appvg.rrd] DS:vgsize:GAUGE:600:0:U 314572800000 DS:vgfree:GAUGE:600:0:U 69130518528 DS:vgprct:GAUGE:600:0:100 75
[*VG2*,rootvg.rrd] DS:vgsize:GAUGE:600:0:U 2472800000 DS:vgfree:GAUGE:600:0:U 430518528 DS:vgprct:GAUGE:600:0:100 97
Sending it to xymon server with ${XYMON} ${XYMSRV} "data ${MACHINE}.trends ${DATA}"
Data are delivered, i can dump rrd on xymonserver, seems to ok to me, archive is filling up, but i am not able to display it on trends or GRAPH_ *VG*="*VG2*" page.
rrdttol dump *VG2*,appvg.rrd <ds> <name> vgsize </name> <type> GAUGE </type> <minimal_heartbeat> 600 </minimal_heartbeat> <min> 0.0000000000e+00 </min> <max> NaN </max>
<!-- PDP Status -->
<last_ds> 314572800000 </last_ds>
<value> 2.6109542400e+13 </value>
<unknown_sec> 0 </unknown_sec>
</ds>
I set it in xymonserver.cfg to TEST2RRD="....VG2" (is it correct?) and GRAPHS="...VG2"
I tried to define it also in graphs.cfg [*VG2*] FNPATTERN VG2.(.+).rrd TITLE Volume group DEF:vgsize=@RRDFN@:vgsize:AVERAGE DEF:vgfree=@RRDFN@:vgfree:AVERAGE DEF:vgprct=@RRDFN@:vgprct:AVERAGE LINE1.5:p at RRDIDX@#@COLOR@:@RRDPARAM@ GPRINT:vgsize:LAST: \: %5.1lf (cur) GPRINT:vgsize:MAX: \: %5.1lf (max) GPRINT:vgsize:MIN: \: %5.1lf (min) GPRINT:vgsize:AVERAGE: \: %5.1lf (avg)\n GPRINT:vgfree:LAST: \: %5.1lf (cur) GPRINT:vgfree:MAX: \: %5.1lf (max) GPRINT:vgfree:MIN: \: %5.1lf (min) GPRINT:vgfree:AVERAGE: \: %5.1lf (avg)\n GPRINT:vgprct:LAST: \: %5.1lf (cur) GPRINT:vgprct:MAX: \: %5.1lf (max) GPRINT:vgprct:MIN: \: %5.1lf (min) GPRINT:vgprct:AVERAGE: \: %5.1lf (avg)\n
I was able to understand when i was sending ncv only vg:percentage appvg:75 rootvg:98
, and it worked.
But i am stupid for more complex solutions and lost in english. I am sure it is very easy task, but i just do not get it.
Thank you for your help
W.
P.S: I have plan to send VG as status with human formated output and VG2 will be data for graphs.