[Xymon] Multiple graph from one SERVICE
Joel Carnat
joel at carnat.net
Fri Jun 8 10:13:26 CEST 2012
Hello,
I'm writing custom scripts and, so far, I could create graphs from single RRD and from multiple RRD (like "la").
I'm working on some SNMP-based network interface graphing.
On one of my multiple-NIC server, the script generates RRD files this way:
/usr/local/www/xymon/server/bin/bb 127.0.0.1 'data esxi.trends
[snmp_net.vmnic0.rrd]
DS:ibit:DERIVE:600:0:U 2130119859
DS:ierr:DERIVE:600:0:U 0
DS:obit:DERIVE:600:0:U 6920041
DS:oerr:DERIVE:600:0:U 0
'
/usr/local/www/xymon/server/bin/bb 127.0.0.1 'data esxi.trends
[snmp_net.vmnic1.rrd]
DS:ibit:DERIVE:600:0:U 589307058
DS:ierr:DERIVE:600:0:U 0
DS:obit:DERIVE:600:0:U 0
DS:oerr:DERIVE:600:0:U 0
'
The RRD files are properly created
/usr/local/www/xymon/data/rrd/esxi/snmp_net.vmnic0.rrd
/usr/local/www/xymon/data/rrd/esxi/snmp_net.vmnic1.rrd
Then, my graph section goes like this:
[snmp_net]
FNPATTERN ^snmp_net.(.+).rrd
<snip>
DEF:ibit at RRDIDX@=@RRDFN@:ibit:AVERAGE
DEF:ierr at RRDIDX@=@RRDFN@:ierr:AVERAGE
DEF:obit at RRDIDX@=@RRDFN@:obit:AVERAGE
DEF:oerr at RRDIDX@=@RRDFN@:oerr:AVERAGE
CDEF:nobit at RRDIDX@=obit at RRDIDX@,-1,*
AREA:ibit at RRDIDX@#@COLOR at 22:@RRDPARAM@ download
GPRINT:ibit at RRDIDX@:LAST:%6.2lf%s
GPRINT:ibit at RRDIDX@:MIN:%6.2lf%S
GPRINT:ibit at RRDIDX@:AVERAGE:%6.2lf%S
GPRINT:ibit at RRDIDX@:MAX:%6.2lf%S\j
AREA:obit at RRDIDX@#@COLOR at 22:@RRDPARAM@ upload
GPRINT:obit at RRDIDX@:LAST:%6.2lf%s
<snip>
This creates a single PNG with both NIC metrics.
What I would like to do is rather create a single PNG for each of my NICs. Something like snmp_net.vmnic0.png, snmp_net.vmnic1.png...
Is there a way to do that ?
Thanks,
Jo
More information about the Xymon
mailing list