Hugo,
you're quite busy :-)
On 1/27/2006 9:58 PM, Hugo van der Kooij wrote:
Did some more debugging: The section below seems to be having a bit of a
problem:
# If the RRD not exists:
if ( !( -e $file ) ) {
# Adding Graph Value Key's
foreach (@blocks) {
if ( $service =~ /$_->{service_name}/ ) {
# change the default rrdtype if a different is defined
my $rrd_type = "GAUGE";
$rrd_type = $_->{rrd_type} if ( exists( $_->{rrd_type}
) );
# setting the heartbeat#
if (!defined($heartbeat)) {
$heartbeat = $default_heartbeat;
$heartbeat = $_->{heartbeat} if ( exists(
$_->{heartbeat} ));
}
# setting the step
if (!defined($step)) {
$step = $default_step;
$step = $_->{step} if ( exists( $_->{step} ));
}
push @system,
"DS:"
. $_->{graph_value} . ":"
. $rrd_type
. ":". $heartbeat. ":U:U";
}
}
# Adding some default average frames
push @system, "RRA:AVERAGE:0.5:5:$heartbeat";
push @system, "RRA:MAX:0.5:5:$heartbeat";
push @system, "RRA:MIN:0.5:5:$heartbeat";
push @system, "RRA:AVERAGE:0.5:30:$heartbeat";
push @system, "RRA:MAX:0.5:30:$heartbeat";
push @system, "RRA:MIN:0.5:30:$heartbeat";
push @system, "RRA:AVERAGE:0.5:120:$heartbeat";
push @system, "RRA:MAX:0.5:120:$heartbeat";
push @system, "RRA:MIN:0.5:120:$heartbeat";
push @system, "RRA:AVERAGE:0.5:1440:$heartbeat";
push @system, "RRA:MAX:0.5:1440:$heartbeat";
push @system, "RRA:MIN:0.5:1440:$heartbeat";
Which I noticed with the following (DEBUG) line added for debugging
purposes:
if($opt_verbose & $LOG_RRD_STATUS) {
$dummy="";
foreach (@system) {
$dummy.=$_. ' ';
}
print_log("DEBUG: step=$step defaultstep=$default_step
heartbeat=$heartbeat defaultheartbeat=$default_heartbeat");
print_log("RRD: rrdtool create $file --step=$step
$dummy");
}
Both $step and $heartbeat were empty for these cases. And the log is
missing the DS sections all together. I seem to have the fixed the $step
issue a bit the missing DS is a real killer.
I need to do even more debugging here.
Hmm. As far as I can see, the problem seems to be the line
if ( $service =~ /$_->{service_name}/ ) {
if that condition isn't true, $heartbeat, $step and the DS definition
aren't done. Just what we observed. (I at least intermittently.)
Since you seem to work on the code currently: Where do $service and $_
in the above section come from?
Arno
Hugo.
--
IT-Service Lehmann [EMAIL PROTECTED]
Arno Lehmann http://www.its-lehmann.de
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null