[Xymon] Changing graph color

Roland Soderstrom Rolands at logicaltech.com.au
Thu Nov 22 00:34:20 CET 2012


I'm trying to change color on a graph depending on its value. (xymon 4.3.10)
It is for a cluster resource and I have a custom script that reports Resource state, using NCV on the server end.
orasrv : 4 for resource is up
orasrv : 3 for resource has failed over
orasrv : 2 for resource is down for maintenance
orasrv : 1 for resource is down

All is setup and working fine, graphs etc, but the graph is all blue regardless of value.
I would like to get a graph (AREA) with colors depending on its value
4=green
3=yellow
2=blue
1=red

[orasrv]
        TITLE ORACLE SERVER RESOURCE STATUS
        YAXIS UP-DOWN
        -u 3
        -l 0
        DEF:orasrv at RRDIDX@=orasrv.rrd:orasrv:AVERAGE
        AREA:orasrv at RRDIDX@#@COLOR@:@RRDPARAM@
        COMMENT:\n
        GPRINT:orasrv at RRDIDX@:LAST:ORA \: %5.1lf%s (cur)
        GPRINT:orasrv at RRDIDX@:MAX: \: %5.1lf%s (max)
        GPRINT:orasrv at RRDIDX@:MIN: \: %5.1lf%s (min)
        GPRINT:orasrv at RRDIDX@:AVERAGE: \: %5.1lf%s (avg)\n

I've tried to find a solution for this for a couple of days and can't find any references for a solution.
Is this possible?

- Roland



More information about the Xymon mailing list