Open majed17 opened 3 years ago
Hi Majed,
You reach the maximum data of the array (colors).
try to separate the memory,ioBoard,CPU and system.
if(preg_match('/_ioBoard/',$NAME[$KEY])){
$ds_name[3] = "ioBoard Temperature";
$opt[3] = "--slope-mode --vertical-label \"Grad Celsius\" --title \"HPASM ioBoard Temperature\" ";
if(!isset($def[3])){
$def[3] = "";
}
$def[3] .= "DEF:var$KEY=$RRDFILE[$KEY]:$DS[$KEY]:AVERAGE " ;
$def[3] .= "LINE:var$KEY#".$colors[$col_r].":\"$NAME[$KEY]\\t\" " ;
$def[3] .= "GPRINT:var$KEY:LAST:\"%6.0lf $UNIT[$KEY] LAST \" ";
$def[3] .= "GPRINT:var$KEY:MAX:\"%6.0lf $UNIT[$KEY] MAX \" ";
$def[3] .= "GPRINT:var$KEY:AVERAGE:\"%6.2lf $UNIT[$KEY] AVERAGE \\n\" ";
$col_r++;
}
if(preg_match('/_system/',$NAME[$KEY])){
$ds_name[4] = "System Temperature";
$opt[4] = "--slope-mode --vertical-label \"Grad Celsius\" --title \"HPASM System Temperature\" ";
if(!isset($def[4])){
$def[4] = "";
}
$def[4] .= "DEF:var$KEY=$RRDFILE[$KEY]:$DS[$KEY]:AVERAGE " ;
$def[4] .= "LINE:var$KEY#".$colors[$col_s].":\"$NAME[$KEY]\\t\" " ;
$def[4] .= "GPRINT:var$KEY:LAST:\"%6.0lf $UNIT[$KEY] LAST \" ";
$def[4] .= "GPRINT:var$KEY:MAX:\"%6.0lf $UNIT[$KEY] MAX \" ";
$def[4] .= "GPRINT:var$KEY:AVERAGE:\"%6.2lf $UNIT[$KEY] AVERAGE \\n\" ";
$col_s++;
}
thanks, it works, but i moved to nagios graph instead
version 4.8.0.2 compiled like: ./configure --prefix=/usr/.... --with-nagios-user=nagios --with-nagios-group=nagios --with-noinst-level=ok --with-degrees=celsius --with-perfdata --with-hpacucli
command definition includes: --perfdata=short
error displaying: