lausser / check_hpasm

A plugin (monitoring-plugin, not nagios-plugin, see also http://is.gd/PP1330) which checks the hardware health of HP Proliant Servers. (May also be used for other devices which implement the CPQHLTH mib)
http://labs.consol.de/nagios/check_hpasm/
GNU General Public License v2.0
16 stars 18 forks source link

not drawing in pnp graph #26

Open majed17 opened 3 years ago

majed17 commented 3 years ago

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:

image

4gemenot commented 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++;
}

check_hpasm.php.zip

majed17 commented 3 years ago

thanks, it works, but i moved to nagios graph instead