[-]
[+]
|
Changed |
munin.changes
|
|
[-]
[+]
|
Changed |
munin.spec
^
|
|
[-]
[+]
|
Deleted |
munin-2.0.8.tar.bz2/master/t/munin_master_htmlold.t
^
|
@@ -1,22 +0,0 @@
-use warnings;
-use strict;
-use English '-no_match_vars';
-
-use Test::More tests => 4;
-
-use_ok('Munin::Master::HTMLOld');
-
-my $test_path = [ {'path' => "../../index.html" } ];
-
-#munin_get_root
-{
-
- is(Munin::Master::HTMLOld::get_root_path($test_path), "../..");
-
- $test_path = [ {'path' => "../index.html" } ];
-
- is(Munin::Master::HTMLOld::get_root_path($test_path), "..");
-
- is(Munin::Master::HTMLOld::get_root_path(), "");
-
-}
|
[-]
[+]
|
Changed |
munin-2.0.9.tar.bz2/ChangeLog
^
|
@@ -1,5 +1,57 @@
-*- text -*-
+munin-2.0.9, 2012-12-05
+
+-------
+Summary
+-------
+
+Small bugfix-only release.
+
+- Many minor fixes
+
+------------------
+Detailed Changelog
+------------------
+
+Daniel Black:
+ node: allow ipv6 localhost in sample conf
+
+Diego Elio Petteno:
+ common: fix TLS options settings.
+ master: fix config test, add missing configuration options and update defaults.
+ master: fix and rename htmlold test to test HTMLConfig instead.
+ master: remove test for function that has been deleted.
+ master: check for timeout before checking for failure to connect.
+ master: remove one more test that requires a big rewrite to make sense.
+ master: fix tests so that they actually pass for master.
+ node: fix export_service_environment test.
+ node: add a temporary default spooldir to the proxyspooler test.
+ master: make sure to always consider limits, for when always_send is configured.
+ master: fix test when executing from a release tarball.
+
+Magnus Hagander:
+ Fix PostgreSQL plugins to work with development versions
+
+Marc Schutz:
+ New regexes for virus/spam count in amavis plugin.
+
+Sebastian Noack:
+ Fixed broken exit codes in ejabberd plugin.
+ Fixed order of arguments for 'ejabberdctl status-num-host' in ejabberd plugin.
+
+Steve Schnepp:
+ master: remove date manip warning in cgi graph
+ contrib: rename the net::server patch
+ master: connect to AAAA and A address
+
+Stig Sandbeck Mathisen:
+ Remove documentation disclaimer
+
+intrigeri:
+ plugins: do not use the "read w/o variable" bashism.
+
+
munin-2.0.8, 2012-11-08
-------
|
[-]
[+]
|
Changed |
munin-2.0.9.tar.bz2/RELEASE
^
|
@@ -1 +1 @@
-2.0.8
+2.0.9
|
[-]
[+]
|
Changed |
munin-2.0.9.tar.bz2/common/lib/Munin/Common/TLS.pm
^
|
@@ -132,8 +132,9 @@
}
# Tune a few things...
- if (Net::SSLeay::CTX_set_options($ctx, &Net::SSLeay::OP_ALL)) {
- $self->{logger}("[ERROR] Could not set SSL_CTX options");
+ Net::SSLeay::CTX_set_options($ctx, Net::SSLeay::OP_ALL());
+ if (my $errno = Net::SSLeay::ERR_get_error()) {
+ $self->{logger}("[ERROR] Could not set SSL_CTX options: " + Net::SSLeay::ERR_error_string($errno));
return 0;
}
|
[-]
[+]
|
Changed |
munin-2.0.9.tar.bz2/contrib/Net-Server.patch
^
|
(renamed to contrib/Net-Server.patch)
|
[-]
[+]
|
Changed |
munin-2.0.9.tar.bz2/contrib/Net-Server.patch
^
|
(renamed to contrib/Net-Server.patch)
|
[-]
[+]
|
Changed |
munin-2.0.9.tar.bz2/doc/index.rst
^
|
@@ -2,9 +2,6 @@
Welcome to Munin's documentation!
=================================
-Warning: This documentation is being developed. It is incomplete, and
-may even be plain wrong. Feedback is welcome.
-
Contents:
.. toctree::
|
[-]
[+]
|
Changed |
munin-2.0.9.tar.bz2/master/_bin/munin-cgi-graph.in
^
|
@@ -28,6 +28,7 @@
use warnings;
use IO::Handle;
BEGIN {
+ no warnings;
$Date::Manip::Backend = 'DM5';
}
use Date::Manip;
|
[-]
[+]
|
Changed |
munin-2.0.9.tar.bz2/master/lib/Munin/Master/LimitsOld.pm
^
|
@@ -311,11 +311,18 @@
my $fname = munin_get_node_name($field);
my $fpath = munin_get_node_loc($field);
my $onfield = munin_get_node($oldnotes, $fpath);
+ my $oldstate= '';
# Test directly here as get_limits is in truth recursive and
# that fools us when processing multigraphs.
next if (!defined($field->{warning}) and !defined($field->{critical}));
+ # get the old state if there is one, or leave it empty.
+ if ( defined($onfield) or
+ defined($onfield->{"state"}) ) {
+ $oldstate = $onfield->{"state"};
+ }
+
my ($warn, $crit, $unknown_limit) = get_limits($field);
# Skip fields without warning/critical definitions
@@ -384,9 +391,7 @@
: "Value is unknown.";
my $num_unknowns;
- if ( !defined $onfield
- or !defined $onfield->{"state"}
- or $onfield->{"state"} ne "unknown") {
+ if ( $oldstate ne "unknown") {
$hash->{'state_changed'} = 1;
}
else {
@@ -464,12 +469,8 @@
. ") exceeded"
));
- if ( !defined $onfield
- or !defined $onfield->{"state"}
- or $onfield->{"state"} ne "critical") {
-
+ if ( $oldstate ne "critical") {
$hash->{'state_changed'} = 1;
-
}
}
elsif ((defined($warn->[0]) and $value < $warn->[0])
@@ -491,19 +492,15 @@
. ") exceeded"
));
- if ( !defined $onfield
- or !defined $onfield->{"state"}
- or $onfield->{"state"} ne "warning") {
-
+ if ( $oldstate ne "warning") {
$hash->{'state_changed'} = 1;
-
}
}
- elsif (defined $onfield and defined $onfield->{"state"}) {
+ else {
munin_set_var_loc(\%notes, [@$fpath, "state"], "ok");
munin_set_var_loc(\%notes, [@$fpath, "ok"], "OK");
- if ($onfield->{'state'} ne 'ok') {
+ if ($oldstate ne 'ok') {
$hash->{'state_changed'} = 1;
}
}
|
[-]
[+]
|
Changed |
munin-2.0.9.tar.bz2/master/lib/Munin/Master/Node.pm
^
|
@@ -86,6 +86,7 @@
PeerPort => $self->{port} || 4949,
LocalAddr => $config->{local_address},
Proto => 'tcp',
+ MultiHomed => 1,
Timeout => $config->{timeout}
);
if (! $self->{reader} ) {
|
[-]
[+]
|
Changed |
munin-2.0.9.tar.bz2/master/lib/Munin/Master/ProcessManager.pm
^
|
@@ -253,14 +253,14 @@
$res = $worker->do_work();
return 1;
});
- if (!defined($res)) {
- ERROR "[ERROR] $worker failed to connect to node";
- $retval = $E_CONNECT;
- } elsif ($timed_out) {
+ if ($timed_out) {
ERROR "[ERROR] $worker timed out";
$res = undef;
$retval = $E_TIMED_OUT;
- }
+ } elsif (!defined($res)) {
+ ERROR "[ERROR] $worker failed to connect to node";
+ $retval = $E_CONNECT;
+ }
};
if ($EVAL_ERROR) {
ERROR "[ERROR] $worker died with '$EVAL_ERROR'";
|
[-]
[+]
|
Changed |
munin-2.0.9.tar.bz2/master/t/munin_master_config.t
^
|
@@ -49,7 +49,7 @@
htmldir => '/opt/munin/sandbox/www',
local_address => 0,
logdir => '/opt/munin/sandbox/var/log/munin',
- max_processes => 2**53,
+ max_processes => 16,
rundir => '/opt/munin/sandbox/var/run/munin',
timeout => 180,
tls => 'disabled',
@@ -59,6 +59,9 @@
tls_verify_certificate => 1,
tls_verify_depth => '5',
tmpldir => '/opt/munin/sandbox/etc/opt/munin/templates',
+ staticdir => '/opt/munin/sandbox/etc/opt/munin/static',
+ rrdcached_socket => '/var/run/rrdcached.sock',
+ cgitmpdir => '/opt/munin/sandbox/var/cache/munin-cgi',
},
};
@@ -88,6 +91,7 @@
# Where to look for the HTML templates
tmpldir /opt/munin/sandbox/etc/opt/munin/templates
+staticdir /opt/munin/sandbox/etc/opt/munin/static
# Make graphs show values per minute instead of per second
#graph_period minute
@@ -97,6 +101,7 @@
# documentation.
#
#graph_strategy cgi
+cgitmpdir /opt/munin/sandbox/var/cache/munin-cgi
# Drop somejuser@fnord.comm and anotheruser@blibb.comm an email everytime
# something changes (OK -> WARNING, CRITICAL -> OK, etc)
@@ -114,6 +119,8 @@
tls_verify_certificate yes
tls_verify_depth 5
+rrdcached_socket /var/run/rrdcached.sock
+
# a simple host tree
[marvin]
address 127.0.0.1
|
[-]
[+]
|
Added |
munin-2.0.9.tar.bz2/master/t/munin_master_htmlconfig.t
^
|
@@ -0,0 +1,22 @@
+use warnings;
+use strict;
+use English '-no_match_vars';
+
+use Test::More tests => 4;
+
+use_ok('Munin::Master::HTMLConfig');
+
+my $test_path = [ {'path' => "../../index.html" } ];
+
+#munin_get_root
+{
+
+ is(Munin::Master::HTMLConfig::get_root_path($test_path), "../..");
+
+ $test_path = [ {'path' => "../index.html" } ];
+
+ is(Munin::Master::HTMLConfig::get_root_path($test_path), "..");
+
+ is(Munin::Master::HTMLConfig::get_root_path(), "");
+
+}
|
[-]
[+]
|
Changed |
munin-2.0.9.tar.bz2/master/t/munin_master_node.t
^
|
@@ -3,7 +3,7 @@
use strict;
use Munin::Master::Config;
-use Test::More tests => 14;
+use Test::More tests => 15;
use Test::MockModule;
use Test::MockObject::Extends;
use Test::Exception;
@@ -22,6 +22,10 @@
my $node_mock = Test::MockObject::Extends->new($node);
$node_mock->mock('_node_write_single', sub {});
+ $node_mock->mock('_node_read_fast', sub {
+ my ($self) = @_;
+ return $self->_node_read();
+ });
return $node_mock;
}
@@ -39,7 +43,7 @@
$node->mock('_node_read_single', sub {
return '# munin node at foo.example.com'
});
- my $inet = Test::MockModule->new('IO::Socket::INET');
+ my $inet = Test::MockModule->new('IO::Socket::INET6');
$inet->mock(new => sub { return {} });
$node->_do_connect();
@@ -62,7 +66,7 @@
{
my $node = setup();
$node->mock('_node_read_single', sub {
- return ('cap multigraph');
+ return 'cap multigraph';
});
my @res = $node->negotiate_capabilities();
@@ -71,7 +75,7 @@
{
my $node = setup();
$node->mock('_node_read_single', sub {
- return ('# Unknown command. Try list, nodes, config, fetch, version or quit');
+ return '# Unknown command. Try list, nodes, config, fetch, version or quit';
});
my @res = $node->negotiate_capabilities();
@@ -79,21 +83,16 @@
}
-=begin comment
-
-This fails. Frankly it should result in "multigraph".
{
my $node = setup();
- $node->mock('_node_read_single', sub {
- return ('cap bar baz foo');
- });
+ $node->mock('_node_read_single', sub {
+ my @array = ('cap bar baz foo');
+ return \@array;
+ });
my @res = $node->negotiate_capabilities();
- is_deeply(\@res, ['baz'], 'Capabilities - none');
+ is_deeply(\@res, ['NA'], 'Capabilities - none');
}
-=end comment
-
-=cut
### list_plugins
@@ -112,22 +111,26 @@
### fetch_service_config
{
my $node = setup();
- $node->mock('_node_read', sub { return ('# timeout: bla bla bla') });
+ $node->mock('_node_read', sub {
+ my @array = ('# timeout: bla bla bla');
+ return \@array;
+ });
throws_ok { $node->fetch_service_config('foo') }
qr/Timeout error on node/,
'Fetch service config - Timeout throws exception';
}
{
my $node = setup();
- $node->mock('_node_read', sub {
- return (
- '',
- '# bla bla bla',
- 'foo bar',
- 'zap gabonk',
- 'baz.bar foo',
- );
- });
+ $node->mock('_node_read', sub {
+ my @array = (
+ '',
+ '# bla bla bla',
+ 'foo bar',
+ 'zap gabonk',
+ 'baz.bar foo',
+ );
+ return \@array;
+ });
#die Dumper { $node->fetch_service_config('fun') };
@@ -155,15 +158,16 @@
{
my $node = setup();
$node->mock('_node_read', sub {
- return (
- '',
- '# bla bla bla',
- 'foo bar',
- 'zap gabonk',
- 'baz.label foo',
- 'zip.label bar',
- );
- });
+ my @array = (
+ '',
+ '# bla bla bla',
+ 'foo bar',
+ 'zap gabonk',
+ 'baz.label foo',
+ 'zip.label bar',
+ );
+ return \@array;
+ });
my %res = $node->fetch_service_config('fun');
is_deeply(\%res, {
@@ -188,16 +192,17 @@
{
my $node = setup();
$node->mock('_node_read', sub {
- return (
- '',
- '# bla bla bla',
- 'foo bar',
- 'zap gabonk',
- 'baz.label foo',
- 'zip.label bar',
- 'graph_order zip baz',
- );
- });
+ my @array = (
+ '',
+ '# bla bla bla',
+ 'foo bar',
+ 'zap gabonk',
+ 'baz.label foo',
+ 'zip.label bar',
+ 'graph_order zip baz',
+ );
+ return \@array;
+ });
my %res = $node->fetch_service_config('fun');
is_deeply(\%res, {
global => {
@@ -227,7 +232,10 @@
### fetch_service_data
{
my $node = setup();
- $node->mock('_node_read', sub { return ('# timeout: bla bla bla') });
+ $node->mock('_node_read', sub {
+ my @array = ('# timeout: bla bla bla');
+ return \@array;
+ });
throws_ok { $node->fetch_service_data('foo') }
qr/Timeout in fetch from 'foo'/,
@@ -236,14 +244,15 @@
{
my $node = setup();
$node->mock('_node_read', sub {
- return (
- '',
- '# bla bla bla',
- 'fun.value bar',
- 'zap.value gabonk',
- 'baz.value foo',
- );
- });
+ my @array = (
+ '',
+ '# bla bla bla',
+ 'fun.value bar',
+ 'zap.value gabonk',
+ 'baz.value foo',
+ );
+ return \@array;
+ });
my $time = time; # this will work, except when the clock ticks at the wrong time
my %res = $node->fetch_service_data('foo');
|
[-]
[+]
|
Changed |
munin-2.0.9.tar.bz2/master/t/munin_master_plugin_config.t
^
|
@@ -20,7 +20,7 @@
# print "Input: ",@input,"\n";
-my %answer = $node->parse_service_config("Test",@input);
+my %answer = $node->parse_service_config("Test", \@input);
=comment
|
[-]
[+]
|
Changed |
munin-2.0.9.tar.bz2/master/t/munin_master_plugin_fetch.t
^
|
@@ -21,7 +21,7 @@
BEGIN { *CORE::GLOBAL::time = sub { 1234567890 }; }
my $time = time;
-my %answer = $node->parse_service_data("cpu", @input);
+my %answer = $node->parse_service_data("cpu", \@input);
=comment
|
[-]
[+]
|
Changed |
munin-2.0.9.tar.bz2/master/t/munin_master_plugin_multigraph_config.t
^
|
@@ -25,7 +25,7 @@
# print "Input: ",@input,"\n";
-my %answer = $node->parse_service_config("multigraph_tester",@input);
+my %answer = $node->parse_service_config("multigraph_tester", \@input);
# Output captured from Data::Dumper
my $fasit = {
|
[-]
[+]
|
Changed |
munin-2.0.9.tar.bz2/master/t/munin_master_plugin_multigraph_fetch.t
^
|
@@ -25,7 +25,7 @@
BEGIN { *CORE::GLOBAL::time = sub { 1234567890 }; }
my $time = time;
-my %answer = $node->parse_service_data("multigraph_tester", @input);
+my %answer = $node->parse_service_data("multigraph_tester", \@input);
# Output captured from Data::Dumper
|
[-]
[+]
|
Changed |
munin-2.0.9.tar.bz2/master/t/munin_master_processmanager.t
^
|
@@ -3,15 +3,18 @@
use Test::More tests => 17;
use Time::HiRes qw(sleep);
+use File::Temp qw( tempdir );
use_ok('Munin::Master::ProcessManager');
+use Munin::Master::Config;
+my $config = Munin::Master::Config->instance()->{config};
+$config->{rundir} = tempdir(CLEANUP => 1);
+
### Uncomment to see log messages
#
#use Munin::Master::Logger;
#logger_debug();
-#use Munin::Master::Config;
-#my $config = Munin::Master::Config->instance();
#$config->{debug} = 1;
|
[-]
[+]
|
Changed |
munin-2.0.9.tar.bz2/master/t/munin_master_update.t
^
|
@@ -3,10 +3,13 @@
use English qw(-no_match_vars);
use Test::MockModule;
-use Test::More tests => 5;
+use Test::More tests => 2;
+use File::Temp qw( tempdir );
use_ok('Munin::Master::Update');
+my $config = Munin::Master::Config->instance()->{config};
+$config->{dbdir} = tempdir(CLEANUP => 1);
# Make 'keys' return the keys in sorted order.
package Munin::Master::Update;
@@ -28,8 +31,8 @@
}
#
-my $config = Test::MockModule->new('Munin::Master::Config');
-$config->mock(get_groups_and_hosts => sub { return () });
+my $mockconfig = Test::MockModule->new('Munin::Master::Config');
+$mockconfig->mock(get_groups_and_hosts => sub { return () });
#
@@ -37,136 +40,44 @@
my $update = Munin::Master::Update->new();
$update->{service_configs} = {
- 'g1;host1' => {
- service1 => {
- global => [[qw(graph_title service1)],],
- data_source => {
- data_source1 => {max => 'U', min => 'U'},
- data_source2 => {max => 'U', min => 'U'},
- },
- },
- },
- 'g1;host2' => {
- service1 => {
- global => [[qw(graph_title service1)],],
- data_source => {
- data_source1 => {max => 'U', min => 'U'},
- },
- },
- },
+ 'g1;host1' => {
+ global => {
+ service1 => [['graph_title', 'service1']],
+ },
+ data_source => {
+ service1 => {
+ data_source1 => {max => 'U', min => 'U'},
+ data_source2 => {max => 'U', min => 'U'},
+ },
+ },
+ },
+ 'g1;host2' => {
+ global => {
+ service1 => [['graph_title', 'service1']],
+ },
+ data_source => {
+ service1 => {
+ data_source1 => {max => 'U', min => 'U'},
+ },
+ },
+ },
};
my $result = "";
open my $fh, '>', \$result or die $OS_ERROR;
$update->_write_new_service_configs($fh);
- my $expected = remove_indentation(q{
- version svn
- g1;host1;service1;graph_title service1
- g1;host1;service1;data_source1;max U
- g1;host1;service1;data_source1;min U
- g1;host1;service1;data_source2;max U
- g1;host1;service1;data_source2;min U
- g1;host2;service1;graph_title service1
- g1;host2;service1;data_source1;max U
- g1;host2;service1;data_source1;min U
+ my $expected = "version $Munin::Common::Defaults::MUNIN_VERSION\n" .
+ remove_indentation(q{
+ g1;host1:service1.graph_title service1
+ g1;host1:service1.data_source1.max U
+ g1;host1:service1.data_source1.min U
+ g1;host1:service1.data_source2.max U
+ g1;host1:service1.data_source2.min U
+ g1;host2:service1.graph_title service1
+ g1;host2:service1.data_source1.max U
+ g1;host2:service1.data_source1.min U
});
is($result, $expected, 'Write new service config');
}
-
-
-{
- my $update = Munin::Master::Update->new();
-
- $update->{service_configs} = {
- 'g1;host1' => {
- service1 => {
- global => [[qw(graph_title service1)],],
- data_source => {
- data_source1 => {max => 'U', min => 'U'},
- data_source2 => {max => 'U', min => 'U'},
- },
- },
- },
- };
-
- $update->{failed_workers} = [qw(g1;host2)];
-
- $update->{old_service_configs} = {
- 'g1;host2' => {
- service1 => {
- global => [[qw(graph_title service1)],],
- data_source => {
- data_source1 => {max => '2', min => '0'},
- data_source2 => {max => '2', min => '0'},
- },
- },
- },
- };
-
- my $result = "";
- open my $fh, '>', \$result or die $OS_ERROR;
- $update->_write_new_service_configs($fh);
-
- my $expected = remove_indentation(q{
- version svn
- g1;host1;service1;graph_title service1
- g1;host1;service1;data_source1;max U
- g1;host1;service1;data_source1;min U
- g1;host1;service1;data_source2;max U
- g1;host1;service1;data_source2;min U
- g1;host2;service1;graph_title service1
- g1;host2;service1;data_source1;max 2
- g1;host2;service1;data_source1;min 0
- g1;host2;service1;data_source2;max 2
- g1;host2;service1;data_source2;min 0
- });
-
- is($result, $expected, 'Write new service config - failed worker');
-}
-
-
-{
- my $update = Munin::Master::Update->new();
-
- $update->{service_configs} = {};
- $update->{old_service_configs} = {};
-
- my $sconf = remove_indentation(q{
- version svn
- g1;host1;service1;graph_title service1
- g1;host1;service1;data_source1;max U
- g1;host1;service1;data_source1;min U
- g1;host1;service1;data_source2;max U
- g1;host1;service1;data_source2;min U
- g1;host2;service1;graph_title service1
- g1;host2;service1;data_source1;max 2
- g1;host2;service1;data_source1;min 0
- });
-
- open my $fh, '<', \$sconf or die $OS_ERROR;
- my %service_configs = $update->_parse_service_config_dump($fh);
-
- is($update->{old_version}, 'svn', 'Parse old service config - version');
-
- is_deeply(\%service_configs, {
- 'g1;host1' => {
- service1 => {
- global => [[qw(graph_title service1)],],
- data_source => {
- data_source1 => {max => 'U', min => 'U'},
- data_source2 => {max => 'U', min => 'U'},
- },
- },
- },
- 'g1;host2' => {
- service1 => {
- global => [[qw(graph_title service1)],],
- data_source => {
- data_source1 => {max => '2', min => '0'},
- },
- },
- },
- }, 'Parse old service config');
-}
|
[-]
[+]
|
Changed |
munin-2.0.9.tar.bz2/node/munin-node.conf.in
^
|
@@ -33,6 +33,7 @@
# may repeat the allow line as many times as you'd like
allow ^127\.0\.0\.1$
+allow ^::1$
# If you have installed the Net::CIDR perl module, you can use one or more
# cidr_allow and cidr_deny address/mask patterns. A connecting client must
|
[-]
[+]
|
Changed |
munin-2.0.9.tar.bz2/node/t/munin_node_proxyspooler.t
^
|
@@ -10,9 +10,11 @@
use POSIX ();
use Data::Dumper;
use Time::HiRes qw( tv_interval gettimeofday ualarm );
+use File::Temp qw( tempdir );
use Munin::Node::ProxySpooler;
+$Munin::Common::Defaults::MUNIN_SPOOLDIR = tempdir(CLEANUP => 1);
# the hostname and port of a node to test against.
my ($host, $port) = @ENV{qw( MUNIN_HOST MUNIN_PORT )};
|
[-]
[+]
|
Changed |
munin-2.0.9.tar.bz2/node/t/munin_node_service.t
^
|
@@ -155,8 +155,10 @@
### export_service_environment
{
- Munin::Node::Service->export_service_environment('test');
- is($ENV{test_environment_variable}, 'fnord', 'Service-specific environment is exported');
+ my $services = Munin::Node::Service->new(defuser => $UID);
+
+ $services->export_service_environment('test');
+ is($ENV{test_environment_variable}, 'fnord', 'Service-specific environment is exported');
}
|
[-]
[+]
|
Changed |
munin-2.0.9.tar.bz2/plugins/lib/Munin/Plugin/Pgsql.pm
^
|
@@ -478,7 +478,7 @@
my $r = $self->runquery("SELECT version()");
my $v = $r->[0]->[0];
die "Unable to detect PostgreSQL version\n"
- unless ($v =~ /^PostgreSQL (\d+)\.(\d+)\.(\d+) on/);
+ unless ($v =~ /^PostgreSQL (\d+)\.(\d+)(\.\d+|devel) on/);
$self->{detected_version} = "$1.$2";
}
|
[-]
[+]
|
Changed |
munin-2.0.9.tar.bz2/plugins/node.d.linux/selinux_avcstat.in
^
|
@@ -85,7 +85,7 @@
fi
if [ -r $AVCSTATS ]; then
- { read
+ { read HEADER
while read lookups hits misses allocations reclaims frees; do
LOOKUPS=$(($LOOKUPS + $lookups))
HITS=$(($HITS + $hits))
|
[-]
[+]
|
Changed |
munin-2.0.9.tar.bz2/plugins/node.d/amavis.in
^
|
@@ -133,10 +133,10 @@
else
$LOGTAIL ${AMAVIS_LOG} ${STATEFILE} | grep 'amavis\[.*\]:' > ${TEMP_FILE}
fi
- total=$(grep -c 'Passed' ${TEMP_FILE})
- virus=$(grep -c 'INFECTED' ${TEMP_FILE})
- spamm=$(grep -c 'Passed.*Hits: 1[0-9][.]' ${TEMP_FILE})
- spams=$(grep -c 'Passed.*Hits: [2-9][0-9][0-9]*[.]' ${TEMP_FILE})
+ total=$(grep -c 'Hits:' ${TEMP_FILE})
+ virus=$(grep -c 'INFECTED.*Hits:' ${TEMP_FILE})
+ spamm=$(grep -c 'SPAMMY.*Hits:' ${TEMP_FILE})
+ spams=$(grep -c 'SPAM .*Hits:' ${TEMP_FILE})
/bin/rm -f $TEMP_FILE
fi
|
[-]
[+]
|
Changed |
munin-2.0.9.tar.bz2/plugins/node.d/ejabberd_.in
^
|
@@ -133,7 +133,7 @@
fi
if [ -z "$configfile" ]; then
echo "Unable to find ejabberd.cfg. Exiting." >&2
- exit -1
+ exit 1
fi
# you have to have all of vhosts defined on one line in $EJCFG or in plugins-conf.d/munin-node config file
vhosts=$(awk '/^\s*{hosts/ {gsub( /\{\s?hosts\s?,|[\",\[\]]|\}\s?.|localhost/ ,""); print;}' $EJCFG);
@@ -147,7 +147,7 @@
if [ -z "$vhosts" ]; then
echo "No vhosts to sample." >&2
echo "Please set env.vhosts in plugins-conf.d/munin-node." >&2
- exit -1
+ exit 1
fi
MODE=`basename $0 | sed 's/^ejabberd_//g'`
@@ -157,7 +157,7 @@
-o "$MODE" = "memory" -o "$MODE" = "threads" \
-o "$MODE" = "usersindays" -o "$MODE" = "uptime" ]; then
echo "ERROR: Unknown mode \"$MODE\". Exiting." >&2
- exit -1
+ exit 1
fi
if [ "$1" = "config" ]; then
@@ -267,7 +267,7 @@
for host in $vhosts; do
formathost=$(echo $host | tr '.' '_' | tr '-' '_')
for status in $statuses; do
- num=$($EJCTL status-num-host $status $host)
+ num=$($EJCTL status-num-host $host $status)
if [ "$?" != 0 ]; then
num="U"
fi
|