Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not drawing in pnp graph #26

Open
majed17 opened this issue May 4, 2021 · 2 comments
Open

not drawing in pnp graph #26

majed17 opened this issue May 4, 2021 · 2 comments

Comments

@majed17
Copy link

majed17 commented May 4, 2021

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
Copy link

4gemenot commented Sep 5, 2021

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
Copy link
Author

majed17 commented Nov 30, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants