[-]
[+]
|
Changed |
munin.changes
|
|
[-]
[+]
|
Changed |
munin.spec
^
|
|
[-]
[+]
|
Changed |
munin-2.0.14.tar.bz2/ChangeLog
^
|
@@ -1,5 +1,28 @@
-*- text -*-
+munin-2.0.14, 2013-05-10
+
+-------
+Summary
+-------
+
+Bugfix release.
+
+- Fixes for plugin.pm state handling
+- Fix the limits for ABSOLUTE
+
+------------------
+Detailed Changelog
+------------------
+
+Kenyon Ralph:
+ plugins/node.d/apc_nis: improve maximum limits
+
+Steve Schnepp:
+ master: fix limits computation for ABSOLUTE
+ Revert "plugins/Plugin.pm: fix bad state file handling"
+
+
munin-2.0.13, 2013-04-26
-------
|
[-]
[+]
|
Changed |
munin-2.0.14.tar.bz2/RELEASE
^
|
@@ -1 +1 @@
-2.0.13
+2.0.14
|
[-]
[+]
|
Changed |
munin-2.0.14.tar.bz2/master/lib/Munin/Master/LimitsOld.pm
^
|
@@ -351,7 +351,7 @@
my ($previous_updated_timestamp, $previous_updated_value) = @{ $state->{value}{"$rrd_filename:42"}{previous} || [ ] };
my $heartbeat = 600; # XXX - $heartbeat is a fixed 10 min (2 runs of 5 min).
- if (! $field->{type} || $field->{type} eq "GAUGE" || $field->{type} eq "ABSOLUTE") {
+ if (! $field->{type} || $field->{type} eq "GAUGE") {
$value = $current_updated_value;
} elsif (! defined $current_updated_value || ! defined $previous_updated_value || $current_updated_timestamp == $previous_updated_timestamp) {
# No derive computing possible. Report unknown.
@@ -365,10 +365,19 @@
} elsif ($field->{type} eq "COUNTER" && $current_updated_value < $previous_updated_value) {
# COUNTER never decrease. Report unknown.
$value = "U";
- } elsif ($current_updated_value eq "U" || $previous_updated_value eq "U" ) {
- # One of the values is unknown. Report unknown.
+ } elsif ($current_updated_value eq "U") {
+ # The current value is unknown. Report unknown.
+ $value = "U";
+ } elsif ($field->{type} eq "ABSOLUTE") {
+ # The previous value is unimportant, as if ABSOLUTE, the counter is reset anytime the value is read
+ $value = $current_updated_value / ($current_updated_timestamp - $previous_updated_timestamp);
+ } elsif ($previous_updated_value eq "U") {
+ # The previous value is unknown.
+ # Report unknown, as we are not ABSOLUTE
$value = "U";
} else {
+ # Everything is ok for DERIVE/COUNTER
+ # compute the value per timeunit
$value = ($current_updated_value - $previous_updated_value) / ($current_updated_timestamp - $previous_updated_timestamp);
}
}
|
[-]
[+]
|
Changed |
munin-2.0.14.tar.bz2/plugins/lib/Munin/Plugin.pm
^
|
@@ -302,29 +302,20 @@
=cut
sub restore_state {
- my @state;
+ # Read a state vector from a plugin appropriate state file
+ local $/;
- # Protects _restore_state_raw() with an eval()
- eval { @state = return _restore_state_raw(); };
- if ($@) { @state = (); }
+ open my $STATE, '<', $statefile or return;
- return @state;
-}
+ my @state = split(/\n/, <$STATE>);
-sub _restore_state_raw {
- open my $STATE, '<', $statefile or return;
+ my $filemagic = shift(@state);
- # Test the 1rst line
- my $filemagic = <$STATE>;
- if ($filemagic ne "%MUNIN-STATE1.0\n") {
+ if ($filemagic ne '%MUNIN-STATE1.0') {
warn "$me: Statefile $statefile has unrecognized magic number: '$filemagic'\n";
return;
}
- # Slurp the rest
- local $/;
-
- my @state = split(/\n/, <$STATE>);
return _decode_state(@state);
}
|
[-]
[+]
|
Changed |
munin-2.0.14.tar.bz2/plugins/node.d/apc_nis.in
^
|
@@ -78,21 +78,18 @@
print "battery_volt.max 300\n";
print "battery_charge.label batt charge (%)\n";
print "battery_charge.type GAUGE\n";
- print "battery_charge.max 200\n";
+ print "battery_charge.max 100\n";
print "line_volt.label line (V)\n";
print "line_volt.type GAUGE\n";
print "line_volt.max 300\n";
print "line_volt.warning ${line_volt_min}:${line_volt_max}\n";
print "load.label ups load (%)\n";
print "load.type GAUGE\n";
- print "load.max 200\n";
print "time_left.label time left (min)\n";
print "time_left.type GAUGE\n";
- print "time_left.max 200\n";
if ($has_temperature) {
print "temperature.label internal temperature (°C)\n";
print "temperature.type GAUGE\n";
- print "temperature.max 100\n";
}
exit 0;
}
|
[-]
[+]
|
Changed |
munin-2.0.14.tar.bz2/plugins/plugins.history.in
^
|
@@ -358,3 +358,4 @@
[2.0.11.1]
[2.0.12]
[2.0.13]
+[2.0.14]
|