[rrd-users] How to get calculated values in legend section

Giese, Edgar Edgar.Giese at norka.de
Tue Jan 10 08:56:19 CET 2012


Hi list,

i use nagios to collect data from a printer with smnp. I get the printed pages as gauge (10,15,25,30,80...) and with the pnp I get a graph for the printed pages.

Now I want to display the min. and max. value of the shown graph in the shown period AND the printed pages for that period. I tried to calculate the value between min an max with CDEF, but I can't print in in the legend with GPRINT. Calculation with VDEF is showing the wrong value.

How can I solve this?

My Template looks like this (works):

$opt[1] = "--vertical-label Anzahl -l 0 --title \"Gedruckte Seiten auf $hostname \" ";

$def[1] =  "DEF:var1=$rrdfile:$DS[1]:AVERAGE " ;
$def[1] .= "AREA:var1#c6c6c6:\"Seiten \" " ;
$def[1] .= "LINE:var1#0000FF " ;
$def[1] .= "GPRINT:var1:MIN:\"%6.0lf min.\" " ;
$def[1] .= "GPRINT:var1:MAX:\"%6.0lf max.\" " ;

Changing to this ( wrong "Anzahl")

$opt[1] = "--vertical-label Anzahl -l 0 --title \"Gedruckte Seiten auf $hostname \" ";

$def[1] =  "DEF:var1=$rrdfile:$DS[1]:AVERAGE " ;
$def[1] .=  "DEF:var1min=$rrdfile:$DS[1]:MIN " ;
$def[1] .=  "DEF:var1max=$rrdfile:$DS[1]:MAX " ;
$def[1] .=  "CDEF:var1act=var1max,var1min,- " ;
$def[1] .=  "VDEF:varact=var1act,MAXIMUM " ;
$def[1] .= "AREA:var1#c6c6c6:\"Seiten \" " ;
$def[1] .= "LINE:var1#0000FF " ;
$def[1] .= "GPRINT:var1:MIN:\"%6.0lf min.\" " ;
$def[1] .= "GPRINT:var1:MAX:\"%6.0lf max.\" " ;
$def[1] .= "GPRINT:varact:\"%6.0lf Anzahl\" " ;

Changing to this (error "RRDTool beendet mit Fehlern -> ERROR: Cannot parse CF in 'GPRINT:var1act:%6.0lf Anzahl'")

$opt[1] = "--vertical-label Anzahl -l 0 --title \"Gedruckte Seiten auf $hostname \" ";

$def[1] =  "DEF:var1=$rrdfile:$DS[1]:AVERAGE " ;
$def[1] .=  "DEF:var1min=$rrdfile:$DS[1]:MIN " ;
$def[1] .=  "DEF:var1max=$rrdfile:$DS[1]:MAX " ;
$def[1] .=  "CDEF:var1act=var1max,var1min,- " ;
$def[1] .=  "VDEF:varact=var1act,MAXIMUM " ;
$def[1] .= "AREA:var1#c6c6c6:\"Seiten \" " ;
$def[1] .= "LINE:var1#0000FF " ;
$def[1] .= "GPRINT:var1:MIN:\"%6.0lf min.\" " ;
$def[1] .= "GPRINT:var1:MAX:\"%6.0lf max.\" " ;
$def[1] .= "GPRINT:var1act:\"%6.0lf Anzahl\" " ;


Mit freundlichen Gr??en / With kind regards
i.A. Edgar Giese

NORKA
Norddeutsche Kunststoff- und Elektrogesellschaft St?cker mbH & Co. KG

Lange Stra?e 1 * 27313 D?rverden-H?lsen
Tel.: +49 4239 9300-203 * Fax.: +49 4239 9300-99
E-Mail: Edgar.Giese at norka.de<mailto:Edgar.Giese at norka.de> * Internet: www.norka.de<http://www.norka.de/>


Sitz der Gesellschaft: D?rverden-H?lsen, Amtsgericht Walsrode HRA 121059
pers?nlich haftende Gesellschafterin: NORKA Verwaltungs GmbH, Amtsgericht Walsrode HRB 121601
Gesch?ftsf?hrer: Dr.-Ing. Norbert H?bing, Dipl.-Ing. (FH) Martin C. St?cker, Dipl.-Ing. Detlef Fritsch

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20120110/7513f8ce/attachment.htm 


More information about the rrd-users mailing list