Skip to content

Commit

Permalink
Imported Upstream version 2.0.24
Browse files Browse the repository at this point in the history
  • Loading branch information
ssm committed Oct 26, 2014
2 parents 5dd1448 + 1e904d4 commit 11f73ba
Show file tree
Hide file tree
Showing 30 changed files with 257 additions and 125 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ before_install:
- "cpanm --notest Test::MockModule"
- "cpanm --notest Test::MockObject::Extends"
- "cpanm --notest Time::HiRes"
- sh contrib/install_rrd.sh
notifications:
email: false
irc:
Expand Down
98 changes: 98 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,103 @@
-*- text -*-

munin-2.0.24, 2014-10-26

-------
Summary
-------

Bugfix release. It reopens D:675318, as it wasn't really fixed anyway.

Closes: D:696981
Reopens: D:675318

------------------
Detailed Changelog
------------------

Steve Schnepp (3):
m/update: fix "not a reference at /../Utils.pm"
Revert "p/postfix_mail: fix incorrect delivered message count"
p/postfix_mailstats: proper fix, but partial


munin-2.0.23, 2014-10-17

-------
Summary
-------

Bugfix release. It enable the use of Perl 5.20, which broke CGI.
( commit 9fabbe7 was forgotten in the previous release )

Closes: D:762796

------------------
Detailed Changelog
------------------

Steve Schnepp (1):
cgi/html: fix CGI for perl 5.20


munin-2.0.22, 2014-10-15

-------
Summary
-------

Bugfix release. It enable the use of Perl 5.20, which broke CGI.

Closes: #1224, D:675318, D:711465, D:750954, D:751190, D:753506, D:761841, D:762904

------------------
Detailed Changelog
------------------

Chen-Yu Tsai (1):
cgi/graph: Set RRDCACHED_ADDRESS during each request

Daniel Black (1):
Corrects the truncating of negative values in the diskstats plugin

Gerald Turner (2):
dhcpd3 plugin should support multiple ranges in a single subnet
lower-case the dictionary keys in ipmi_sensor_

Joerg Jaspert (1):
make proc plugin more careful in /proc/

Klaus S. Madsen (1):
prevent diskstats plugin from reporting negative latency

Rob Shortt (1):
node: munin plugin config ignores leading *

Steve Schnepp (15):
master: add "use_default_node"
travis: adding preliminary test for rrd
travis: be root for rrd install
travis: fix rrd tar extract
travis: customized rrd build
travis: be root to install rrdtools.
travis: install the Perl deps in the Perl dir
travis: add some whitespace
travis: optimize for compile times
node: Only spoolfetch send 5 samples per service
asyncd: Use SyncDictFile for plugin_rates
asyncd: just use the SpoolWriter META-DATA
p/postfix_mail: fix incorrect delivered message count
p/http_loadtime: fix escaping of user agent

Stig Sandbeck Mathisen (3):
Remove linux-specific plugin files_ (ticket:1661)
Detect more postgresql versions.
Fix POD errors

tbear2500 (1):
Generate correct rrd filename


munin-2.0.21, 2014-04-22

-------
Expand Down
2 changes: 1 addition & 1 deletion RELEASE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.21
2.0.24
1 change: 1 addition & 0 deletions common/lib/Munin/Common/Config.pm
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ my %legal = map { $_ => 1 } qw(
update_rate
use_default_name
use_node_name
use_default_node
version
warn
warning
Expand Down
37 changes: 37 additions & 0 deletions contrib/install_rrd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#! /bin/sh

# Be pedantic
set -x
set -e

# We want to optimize for *compile time*
export CFLAGS="-O0 -pipe"

# install deps
sudo apt-get install libpango1.0-dev libxml2-dev

# Download a fixed version
wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.8.tar.gz
tar -xzvf rrdtool-1.4.8.tar.gz
cd rrdtool-1.4.8

./configure \
--disable-dependency-tracking \
--disable-rrdcgi \
--disable-mmap \
--disable-pthread \
--enable-perl \
--enable-perl-site-install \
--disable-ruby \
--disable-lua \
--disable-tcl \
--disable-python \
--disable-libdbi \
--disable-libwrap \
# Leave at the end

make
sudo make install

# Test the install
perl -MRRDs -e ''
4 changes: 4 additions & 0 deletions master/_bin/munin-cgi-graph.in
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ while (new CGI::Fast) {
next;
}

# Environment variables are cleared each request
# so we must set RRDCACHED_ADDRESS each time
$ENV{RRDCACHED_ADDRESS} = $config->{rrdcached_socket} if $config->{rrdcached_socket};

my $filename = get_picture_filename ($config, $dom, $host, $serv, $scale, $ENV{QUERY_STRING});

my $time = time;
Expand Down
7 changes: 7 additions & 0 deletions master/_bin/munin-cgi-html.in
Original file line number Diff line number Diff line change
Expand Up @@ -165,3 +165,10 @@ sub get_node_service {
}
return undef;
}

# CGI in perl 5.20 is now seriously broken as it doesn't import into the namespace.
# So we have to delegate explicitely. It's easier than prefixing with CGI:: each use.
sub header { return CGI::header(@_); }
sub path_info { return CGI::path_info(@_); }
sub url { return CGI::url(@_); }
sub script_name { return CGI::script_name(@_); }
1 change: 1 addition & 0 deletions master/lib/Munin/Master/Config.pm
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ my %booleans = map {$_ => 1} qw(
tls_verify_certificate
update
use_node_name
use_default_node
);


Expand Down
2 changes: 2 additions & 0 deletions master/lib/Munin/Master/GraphOld.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ package Munin::Master::GraphOld;

# -*- cperl -*-

=encoding utf-8
=begin comment
This is Munin::Master::GraphOld, a package shell to make munin-graph
Expand Down
2 changes: 2 additions & 0 deletions master/lib/Munin/Master/HTMLOld.pm
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package Munin::Master::HTMLOld;

=encoding utf-8
=begin comment
-*- perl -*-
Expand Down
2 changes: 2 additions & 0 deletions master/lib/Munin/Master/Logger.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ package Munin::Master::Logger;

# $Id$

=encoding utf-8
=head1 NAME
Munin::Master::Logger - Munin master's old logging routines
Expand Down
13 changes: 10 additions & 3 deletions master/lib/Munin/Master/Node.pm
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ sub _do_connect {
}
};

INFO "node $self->{host} advertised itself as $self->{node_name} instead." if $self->{node_name} && $self->{node_name} ne $self->{host};

return 1;
}

Expand Down Expand Up @@ -237,15 +239,20 @@ sub list_plugins {
? $self->{node_name}
: $self->{host};

if (not $host) {
my $use_default_node = defined($self->{configref}{use_default_node})
? $self->{configref}{use_default_node}
: $config->{use_default_node};

if (! $use_default_node && ! $host) {
die "[ERROR] Couldn't find out which host to list on $host.\n";
}

$self->_node_write_single("list $host\n");
my $list_host = $use_default_node ? "" : $host;
$self->_node_write_single("list $list_host\n");
my $list = $self->_node_read_single();

if (not $list) {
WARN "[WARNING] Config node $self->{host} listed no services for $host. Please see http://munin-monitoring.org/wiki/FAQ_no_graphs for further information.";
WARN "[WARNING] Config node $self->{host} listed no services for $host, (advertised as $self->{node_name}). Please see http://munin-monitoring.org/wiki/FAQ_no_graphs for further information.";
}

return split / /, $list;
Expand Down
6 changes: 5 additions & 1 deletion master/lib/Munin/Master/Utils.pm
Original file line number Diff line number Diff line change
Expand Up @@ -856,6 +856,10 @@ sub munin_read_storable {

sub munin_write_storable {
my ($storable_filename, $data) = @_;
DEBUG "[DEBUG] about to write '$storable_filename'";

# We don't need to write anything if there is nothing to write.
return unless defined $data;

my $storable_filename_tmp = $storable_filename . ".tmp.$$";

Expand Down Expand Up @@ -1161,7 +1165,7 @@ sub munin_get_keypath {
}

if ($asfile) {
return join('/',@group).'-'.join('-',@service);
return (shift @group).'/'.join('/',@group).'-'.join('-',@service);
} else {
return join(';',@group).':'.join('.',@service);
}
Expand Down
36 changes: 2 additions & 34 deletions node/_bin/munin-asyncd.in
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ $0 = "munin-asyncd [$metahostname] [idle]";

my $process_name = "main";

my $plugin_rate_filename = "$SPOOLDIR/plugin_rates";

my @plugins;
{
print STDERR "[$$][$process_name] Reading config from $host\n" if $verbose;
Expand Down Expand Up @@ -149,7 +147,7 @@ MAIN: while($keepgoing) {
my $sock;
PLUGIN: foreach my $plugin (@plugins) {
# See if this plugin should be updated
my $plugin_rate = get_hash($plugin, $plugin_rate_filename) || 300;
my $plugin_rate = $spoolwriter->get_metadata("plugin_rates/$plugin") || 300;
if ($when < ($last_updated{$plugin} || 0) + $plugin_rate) {
# not yet, next plugin
next;
Expand Down Expand Up @@ -244,7 +242,7 @@ sub fetch_data
# XXX - Doesn't take into account a per field update_rate

# This has to be sent back to the master
set_hash($plugin, $1, $plugin_rate_filename);
$spoolwriter->set_metadata("plugin_rates/$plugin", $1);
}
}

Expand All @@ -269,36 +267,6 @@ sub fetch_data
$spoolwriter->write($when, $plugin, $output_rows);
}

sub get_hash
{
my ($key, $filename) = @_;
my %hash;

use Fcntl; # For O_RDWR, O_CREAT, etc.
use DB_File;
tie (%hash, 'DB_File', $filename, O_RDWR|O_CREAT, 0666)
or die "$!";
my $value = $hash{$key};
untie(%hash);

return $value;
}

sub set_hash
{
my ($key, $value, $filename) = @_;
my %hash;

use Fcntl; # For O_RDWR, O_CREAT, etc.
use DB_File;
tie (%hash, 'DB_File', $filename, O_RDWR|O_CREAT, 0666)
or die "$!";
$hash{$key} = $value;
untie(%hash);
}



__END__
=head1 NAME
Expand Down
13 changes: 10 additions & 3 deletions node/lib/Munin/Node/Config.pm
Original file line number Diff line number Diff line change
Expand Up @@ -290,14 +290,19 @@ sub _parse_plugin_line {

sub apply_wildcards {
my ($self, @services) = @_;
my $ws;

# Need to sort the keys in descending order so that more specific
# wildcards take precedence.
for my $wildservice (grep { /\*$/ } reverse sort keys %{$self->{sconf}}) {
my $ws = substr $wildservice, 0, -1;
for my $wildservice (grep { /\*$/ || /^\*/ } reverse sort keys %{$self->{sconf}}) {
if ($wildservice =~ /\*$/) {
$ws = substr $wildservice, 0, -1;
} else {
$ws = substr $wildservice, 1;
}

for my $service (@services) {
next unless $service =~ /^$ws/;
next unless $service =~ /^$ws/ || $service =~ /$ws$/;
$self->_apply_wildcard_to_service($self->{sconf}{$wildservice},
$service);
}
Expand Down Expand Up @@ -410,5 +415,7 @@ to matching plugins.
See L<http://munin-monitoring.org/wiki/Priority_and_inheritance>
=back
=cut
# vim: sw=4 : ts=4 : et
2 changes: 2 additions & 0 deletions node/lib/Munin/Node/Configure/History.pm
Original file line number Diff line number Diff line change
Expand Up @@ -140,5 +140,7 @@ Takes a Munin::Node::Configure::Plugin object. Returns false unless the
plugin should be ignored, true otherwise (ie. if 'newer' wasn't set, the plugin
is user-contributed, etc).
=back
=cut
# vim: sw=4 : ts=4 : expandtab
1 change: 1 addition & 0 deletions node/lib/Munin/Node/OS.pm
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ See documentation for set_effective_user_id()
Set umask so that files created by plugins are group writable
Only call right before exec-ing a plugin.
=back
=cut
# vim: ts=4 : sw=4 : et
2 changes: 2 additions & 0 deletions node/lib/Munin/Node/Server.pm
Original file line number Diff line number Diff line change
Expand Up @@ -443,5 +443,7 @@ Logs the source of rejected connections.
Processes the request.
=back
=cut
vim: ts=4 : et : sw=4
Loading

0 comments on commit 11f73ba

Please sign in to comment.