# 2008-05-01 Herbert Straub # pnp4nagios ignoring datatype configuration changes # See # http://www.linuxhacker.at/bugs/all/pnp4nagios-ignores-counter-datatype # --- process_perfdata.pl.ORIG 2008-05-01 16:53:36.000000000 +0200 +++ process_perfdata.pl 2008-05-01 17:28:13.000000000 +0200 @@ -645,9 +645,9 @@ data2rrd(@perfs) if ( $#perfs >= 0 ); # Process when a new block starts. @perfs=() ; # Clear the perfs array. } + $p{dstype} = find_dstype($p{uom}); ($p{template}, $p{dstype} ) = adjust_template($multi[1],$p{uom}); $p{multi} = $is_multi; - $p{dstype} = find_dstype($p{uom}); $p{label} = cleanup($multi[2]); # store the original label from check_multi header $p{hostname} = cleanup($HOSTNAME); push @perfs, { %p }; @@ -678,12 +678,12 @@ @perfs=() ; last; } + $p{dstype} = find_dstype($p{uom}); if($count eq 0 ){ ( $p{template}, $p{dstype} ) = adjust_template($CHECK_COMMAND, $p{uom}); } $p{multi} = $is_multi; - $p{dstype} = find_dstype($p{uom}); $p{hostname} = cleanup($HOSTNAME); $p{servicedesc} = cleanup($SERVICEDESC); $p{label} = cleanup($p{label});