From: Matias C. <li...@ma...> - 2007-08-22 17:32:57
|
I'm running some checks and they are working just fine including the template to show the graph as it should be. Now, when I want to make pnp to use a special template for uno of my checks it seems to refuse, showin all the time that the "default template" is being use, even when the perfdata log is showing me that it finds the right template. Let me show you: This is the script Im using, its name is check_local_load and is located in directory /etc/nagios/pnp/check_commands/ : <?php $opt[1] = "--vertical-label Load -l0 --title \"CPU Load for $hostname / $servicedesc\" "; $def[1] = "DEF:var1=$rrdfile:$DS[1]:AVERAGE " ; $def[1] .= "DEF:var2=$rrdfile:$DS[2]:AVERAGE " ; $def[1] .= "DEF:var3=$rrdfile:$DS[3]:AVERAGE " ; $def[1] .= "HRULE:$WARN[1]#FFFF00 "; $def[1] .= "HRULE:$CRIT[1]#FF0000 "; $def[1] .= "AREA:var3#FF0000:\"Load 15\" " ; $def[1] .= "GPRINT:var3:LAST:\"%6.2lf last\" " ; $def[1] .= "GPRINT:var3:AVERAGE:\"%6.2lf avg\" " ; $def[1] .= "GPRINT:var3:MAX:\"%6.2lf max\\n\" " ; $def[1] .= "AREA:var2#EA8F00:\"Load 5 \" " ; $def[1] .= "GPRINT:var2:LAST:\"%6.2lf last\" " ; $def[1] .= "GPRINT:var2:AVERAGE:\"%6.2lf avg\" " ; $def[1] .= "GPRINT:var2:MAX:\"%6.2lf max\\n\" " ; $def[1] .= "AREA:var1#EACC00:\"load 1 \" " ; $def[1] .= "GPRINT:var1:LAST:\"%6.2lf last\" " ; $def[1] .= "GPRINT:var1:AVERAGE:\"%6.2lf avg\" " ; $def[1] .= "GPRINT:var1:MAX:\"%6.2lf max\\n\" "; ?> This is the Perfdata log for one of these checks: 2007-08-21 14:21:30 [25538] found Performance Data for localhost / Current Load ( load1=0.080;5.000;10.000;0; load5=0.060;4.000;6.000;0; load15=0.020;3.000;4.000;0; ) 2007-08-21 14:21:30 [25538] Turn 1 "load1=0.080;5.000;10.000;0;" 2007-08-21 14:21:30 [25538] adjust_template() => /etc/nagios/pnp/check_commands/check_local_load.cfg 2007-08-21 14:21:30 [25538] Adapting Template using ARG 0 2007-08-21 14:21:30 [25538] Adapting Template to check_local_load.php (added ARG0) 2007-08-21 14:21:30 [25538] Adapting Template to check_local_load.php as defined in /etc/nagios/pnp/check_commands/check_local_load.cfg 2007-08-21 14:21:30 [25538] Template is check_local_load.php 2007-08-21 14:21:30 [25538] Turn 2 "load5=0.060;4.000;6.000;0;" 2007-08-21 14:21:30 [25538] adjust_template() => /etc/nagios/pnp/check_commands/check_local_load.cfg 2007-08-21 14:21:30 [25538] Adapting Template using ARG 0 2007-08-21 14:21:30 [25538] Adapting Template to check_local_load.php (added ARG0) 2007-08-21 14:21:30 [25538] Adapting Template to check_local_load.php as defined in /etc/nagios/pnp/check_commands/check_local_load.cfg 2007-08-21 14:21:30 [25538] Template is check_local_load.php 2007-08-21 14:21:30 [25538] Turn 3 "load15=0.020;3.000;4.000;0;" 2007-08-21 14:21:30 [25538] adjust_template() => /etc/nagios/pnp/check_commands/check_local_load.cfg 2007-08-21 14:21:30 [25538] Adapting Template using ARG 0 2007-08-21 14:21:30 [25538] Adapting Template to check_local_load.php (added ARG0) 2007-08-21 14:21:30 [25538] Adapting Template to check_local_load.php as defined in /etc/nagios/pnp/check_commands/check_local_load.cfg 2007-08-21 14:21:30 [25538] Template is check_local_load.php 2007-08-21 14:21:30 [25538] /usr/bin/rrdtool update /usr/share/nagios/perfdata/localhost/Current_Load.rrd 1187698890:0.080:0.060 :0.020 2007-08-21 14:21:30 [25538] rrdtool update returns 0 2007-08-21 14:21:30 [25538] PNP exiting (runtime 0.011899s) ... So the log is not showing any error, but still the graph is made using "custom template", how can be this possible? Any help will bu much apreciated, as I explained on another thread, I don't understand german and most of the documentation I found regarding this matter is in german. Thanks. |