Hello community, here is the log from the commit of package munin for openSUSE:Factory checked in at 2017-03-12 19:59:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/munin (Old) and /work/SRC/openSUSE:Factory/.munin.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "munin" Sun Mar 12 19:59:22 2017 rev:9 rq:461943 version:2.0.32 Changes: -------- --- /work/SRC/openSUSE:Factory/munin/munin.changes 2017-02-19 01:00:30.424006359 +0100 +++ /work/SRC/openSUSE:Factory/.munin.new/munin.changes 2017-03-12 19:59:27.872262902 +0100 @@ -1,0 +2,23 @@ +Thu Mar 2 13:45:33 UTC 2017 - aj@ajaissle.de + +- fix source url +- update to 2.0.32 +- remove CVE-2017-6188-fix-parameter-injection.patch (applied upstream) + +------------------------------------------------------------------- +Thu Feb 23 12:33:21 UTC 2017 - wr@rosenauer.org + +- fix CVE-2017-6188: munin-cgi-graph local file write vulnerability + (boo#1026539, CVE-2017-6188-fix-parameter-injection.patch) + +------------------------------------------------------------------- +Sun Feb 19 16:08:24 UTC 2017 - wr@rosenauer.org + +- update to version 2.0.30 + Bugfix releases (closes the following issues since 2.0.25) + 2.0.26: Closes: D:761190, GH:426 + 2.0.27: Closes: D:767032, D:768553, D:825136, D:834194, GH:690, GH:714 + 2.0.29: Closes: D:847649, D:849383 + 2.0.30: Closes: GH:745, GH:771, GH:783 + +------------------------------------------------------------------- Old: ---- munin-2.0.25.tar.gz New: ---- munin-2.0.32.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ munin.spec ++++++ --- /var/tmp/diff_new_pack.y0NpUH/_old 2017-03-12 19:59:29.807989002 +0100 +++ /var/tmp/diff_new_pack.y0NpUH/_new 2017-03-12 19:59:29.811988437 +0100 @@ -1,7 +1,7 @@ # # spec file for package munin # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,13 +24,13 @@ %define active_by_default 0 Name: munin -Version: 2.0.25 +Version: 2.0.32 Release: 0 Summary: Network-wide graphing framework (grapher/gatherer) License: GPL-2.0 Group: System/Monitoring Url: http://munin-monitoring.org/ -Source0: http://heanet.dl.sourceforge.net/sourceforge/%{name}/%{name}-%{version}.tar.gz +Source0: http://downloads.munin-monitoring.org/%{name}/stable/%{version}/%{name}-%{version}.tar.gz Source1: Makefile.config Source2: munin-node.rc Source3: munin.cron.d @@ -100,10 +100,10 @@ %package node Summary: Network-wide graphing framework (node) -Group: System/Monitoring # some scripts need logtail which is part of package logdigest in openSUSE # problem with logdigest is that it installs a cronjob for itself which # might be unwanted +Group: System/Monitoring Recommends: logdigest Requires: perl-HTML-Template Requires: perl-Log-Log4perl ++++++ munin-2.0.25.tar.gz -> munin-2.0.32.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.25/ChangeLog new/munin-2.0.32/ChangeLog --- old/munin-2.0.25/ChangeLog 2014-11-24 22:46:24.000000000 +0100 +++ new/munin-2.0.32/ChangeLog 2017-03-01 20:43:49.000000000 +0100 @@ -1,5 +1,216 @@ -*- text -*- +munin-2.0.32, 2017-03-01 + +------- +Summary +------- + +Bugfix release. + +Closes: #802, DH:856455 + +------------------ +Detailed Changelog +------------------ + +Steve Schnepp (1): + cgi: handle the empty string in CGI arguments + + +munin-2.0.31, 2017-02-25 + +------- +Summary +------- + +Bugfix release. + +Closes: GH:607 + +------------------ +Detailed Changelog +------------------ + +Kenyon Ralph (1): + ntp_kernel plugins: convert ntpq output to seconds + + +munin-2.0.30.1, 2017-02-25 + +------- +Summary +------- + +Security release. + +Closes: GH:721, D:855705, CVE-2017-6188 + +------------------ +Detailed Changelog +------------------ + +Steve Schnepp (1): + Fix wrong parameter expansion in CGI + + +munin-2.0.30, 2017-01-18 + +------- +Summary +------- + +Bugfix release. + +Closes: GH:745, GH:771, GH:783 + +------------------ +Detailed Changelog +------------------ + +Kenyon Ralph (2): + Revert "if_: check for non-empty and >0 before reporting speed (thanks to ssm)" + plugins/linux/meminfo: correct typo + +Yu Watanabe (1): + Revert "munin_stats plugin: only graph munin-graph if graph_strategy=cron" + + +munin-2.0.29, 2016-12-31 + +------- +Summary +------- + +Bugfix release. + +Closes: D:847649, D:849383 + +------------------ +Detailed Changelog +------------------ + +Artur Smet (1): + Add queries for PostgreSQL 9.4 + +Peter J. Holzer (1): + p/postgres_querylength_: don't stack times + +Vincas Dargis (1): + Update postgres_connections_ for PostgreSQL 9.6 + + + +munin-2.0.28, 2016-12-04 + +------- +Summary +------- + +Bugfix release. + +------------------ +Detailed Changelog +------------------ + +Dr. Nagy Elem�r K�roly (1): + Visible graph titles => Ctrl-F works in browsers. + +IWAI, Masaharu (1): + autodetect the node encoding + +Kim B. Heino (3): + if_: /sys/class/net/ reports speed 0 for some devices + if_, if_err_: add more virtual devices like gre0 and bond0.99 to skip list + if_: check for non-empty and >0 before reporting speed (thanks to ssm) + +Lars Kruse (1): + plugin munin_stats: fix message typo + +Mark H. Wood (1): + Replace trivial use of Netcat with our own gadget to test for an open port. + +Stig Sandbeck Mathisen (1): + Add configuration for ssh master-node transport + +Tomohiro Hosaka (1): + s/IMGWEEKSUM/IMGYEARSUM/ + +sstj (1): + Fix "Use of uninitialized value in numeric eq (==)" warning + + +munin-2.0.27, 2016-10-31 + +------- +Summary +------- + +Bugfix release. For Halloween =) + +Closes: D:767032, D:768553, D:825136, D:834194, GH:690, GH:714 + +------------------ +Detailed Changelog +------------------ + +Andreas Maus (1): + slapd_bdb_cache - autoconf fails when database dir is valid + +Holger Levsen (1): + munin_stats plugin: only graph munin-graph if graph_strategy=cron + +Kenyon Ralph (1): + plugins/node.d/ntp_states: fix "outlier" state spelling for recent versions of NTP + +Steinar H. Gunderson (1): + Update acpi plugin to use the /sys interface. + +dipohl (1): + Return smartctl exit code and warning message + + +munin-2.0.26, 2016-09-09 + +------- +Summary +------- + +Bugfix release. + +Closes: D:761190, GH:426 + +------------------ +Detailed Changelog +------------------ + +Bj�rn Forsman (1): + multips: reject 'autoconf' unless $names is set + +Gabriele (1): + p/snmp_if: fix warning on receive + +Jason Woods (4): + Fix fofields always having the same entries as ofields. fofields now contains only entries that had a state change to OK (fo = fixed ok) + Fix ofields previous state detection not working correctly + Fix broken limits - Inheritance of warning/critical now works correctly and does not break subsequent limits - Aliased graph fields now obey limits assigned to them + Fix get_limit returning [undef, undef] instead of undef when no warning or critical defined + +Julien Pivotto (1): + Fix #1468: backport http_loadtime from devel + +Ken-ichi Mito (1): + fix https://github.com/munin-monitoring/munin/issues/426 (Numbers are crazy in diskstats plugin after reboot) + +Kenyon Ralph (1): + fix typo in graph_title + +Steve Schnepp (2): + p/apt_all: Be able to override /etc/apt.conf + p/apt_all: add some comment about default options + + + munin-2.0.25, 2014-11-24 ------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.25/RELEASE new/munin-2.0.32/RELEASE --- old/munin-2.0.25/RELEASE 2014-11-24 22:47:38.000000000 +0100 +++ new/munin-2.0.32/RELEASE 2017-03-01 20:46:24.000000000 +0100 @@ -1 +1 @@ -2.0.25 +2.0.32 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.25/common/lib/Munin/Common/Config.pm new/munin-2.0.32/common/lib/Munin/Common/Config.pm --- old/munin-2.0.25/common/lib/Munin/Common/Config.pm 2014-11-24 22:46:24.000000000 +0100 +++ new/munin-2.0.32/common/lib/Munin/Common/Config.pm 2017-03-01 20:43:49.000000000 +0100 @@ -107,6 +107,8 @@ rundir service_order skipdraw + ssh_command + ssh_options stack state staticdir diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.25/doc/node/async.rst new/munin-2.0.32/doc/node/async.rst --- old/munin-2.0.25/doc/node/async.rst 2014-11-24 22:46:24.000000000 +0100 +++ new/munin-2.0.32/doc/node/async.rst 2017-03-01 20:43:49.000000000 +0100 @@ -46,6 +46,9 @@ You will need to create an SSH key for the "munin" user, and distribute this to all nodes running munin-asyncd. +The ssh command and options can be customized in :ref:`munin.conf` +with the ssh_command and ssh_options configuration options. + On the munin node ----------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.25/doc/reference/munin.conf.rst new/munin-2.0.32/doc/reference/munin.conf.rst --- old/munin-2.0.25/doc/reference/munin.conf.rst 2014-11-24 22:46:24.000000000 +0100 +++ new/munin-2.0.32/doc/reference/munin.conf.rst 2017-03-01 20:43:49.000000000 +0100 @@ -101,6 +101,37 @@ html pages you must configure a web server to run :ref:`munin-cgi-graph` instead. +.. option:: ssh_command <command> + + The name of the secure shell command to use. Can be fully + qualified or looked up in $PATH. + + Defaults to "ssh". + +.. option:: ssh_options <options> + + The options for the secure shell command. + + Defaults are "-o ChallengeResponseAuthentication=no -o + StrictHostKeyChecking=no". Please adjust this according to your + desired security level. + + With the defaults, the master will accept and store the node ssh + host keys with the first connection. If a host ever changes its ssh + host keys, you will need to manually remove the old host key from + the ssh known hosts file. (with: ssh-keygen -R <node-hostname>, as + well as ssh-keygen -R <node-ip-address>) + + You can remove "StrictHostKeyChecking=no" to increase security, but + you will have to manually manage the known hosts file. Do so by + running "ssh <node-hostname>" manually as the munin user, for each + node, and accept the ssh host keys. + + If you would like the master to accept all node host keys, even + when they change, use the options "-o + UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o + PreferredAuthentications=publickey". + .. index:: pair: example; munin.conf diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.25/master/_bin/munin-cgi-graph.in new/munin-2.0.32/master/_bin/munin-cgi-graph.in --- old/munin-2.0.25/master/_bin/munin-cgi-graph.in 2014-11-24 22:46:24.000000000 +0100 +++ new/munin-2.0.32/master/_bin/munin-cgi-graph.in 2017-03-01 20:43:49.000000000 +0100 @@ -447,14 +447,20 @@ '--output-file', $filename ); # Sets the correct size on a by_graph basis - push @params, "--size_x", CGI::param("size_x") - if (defined(CGI::param("size_x"))); - push @params, "--size_y", CGI::param("size_y") - if (defined(CGI::param("size_y"))); - push @params, "--upper_limit", CGI::param("upper_limit") - if (CGI::param("upper_limit")); - push @params, "--lower_limit", CGI::param("lower_limit") - if (CGI::param("lower_limit")); + + # using a temporary variable to avoid expansion in list context and fix CVE-2017-6188 + my $size_x = CGI::param("size_x"); + push @params, "--size_x", $size_x if $size_x || ($size_x eq "0"); + + my $size_y = CGI::param("size_y"); + push @params, "--size_y", $size_y if $size_y || ($size_y eq "0"); + + my $upper_limit = CGI::param("upper_limit"); + push @params, "--upper_limit", $upper_limit if $upper_limit || ($upper_limit eq "0"); + + my $lower_limit = CGI::param("lower_limit"); + push @params, "--lower_limit", $lower_limit if $lower_limit || ($lower_limit eq "0"); + # Sometimes we want to set the IMG size, and not the canvas. push @params, "--full_size_mode" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.25/master/doc/munin.conf.pod.in new/munin-2.0.32/master/doc/munin.conf.pod.in --- old/munin-2.0.25/master/doc/munin.conf.pod.in 2014-11-24 22:46:24.000000000 +0100 +++ new/munin-2.0.32/master/doc/munin.conf.pod.in 2017-03-01 20:43:49.000000000 +0100 @@ -127,6 +127,19 @@ throttle down how many rrdgraph calls will be running at the same time to this number. Affects: munin-cgi-graph and munin-fastcgi-graph. +=item B<ssh_command> I<value> + +The name of the secure shell command to use. Can be fully qualified, +or looked up in $PATH. Default: C<ssh> + +=item B<ssh_options> I<value> + +The C<ssh> command line options. Defaults: C<-o +ChallengeResponseAuthentication=no -o StrictHostKeyChecking=no>. + +If you need per-host ssh configuration, add these to +F<~/munin/.ssh/config> + =item B<tls> <value> Can have four values. C<paranoid>, C<enabled>, C<auto>, and diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.25/master/lib/Munin/Master/Config.pm new/munin-2.0.32/master/lib/Munin/Master/Config.pm --- old/munin-2.0.25/master/lib/Munin/Master/Config.pm 2014-11-24 22:46:24.000000000 +0100 +++ new/munin-2.0.32/master/lib/Munin/Master/Config.pm 2017-03-01 20:43:49.000000000 +0100 @@ -162,6 +162,8 @@ tmpldir => "$Munin::Common::Defaults::MUNIN_CONFDIR/templates", staticdir => "$Munin::Common::Defaults::MUNIN_CONFDIR/static", cgitmpdir => "$Munin::Common::Defaults::MUNIN_DBDIR/cgi-tmp", + ssh_command => "ssh", + ssh_options => "-o ChallengeResponseAuthentication=no -o StrictHostKeyChecking=no", }, $class ), oldconfig => bless ( { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.25/master/lib/Munin/Master/GraphOld.pm new/munin-2.0.32/master/lib/Munin/Master/GraphOld.pm --- old/munin-2.0.25/master/lib/Munin/Master/GraphOld.pm 2014-11-24 22:46:24.000000000 +0100 +++ new/munin-2.0.32/master/lib/Munin/Master/GraphOld.pm 2017-03-01 20:43:49.000000000 +0100 @@ -53,7 +53,12 @@ use Text::ParseWords; # For UTF-8 handling (plugins are assumed to use Latin 1) -if ($RRDs::VERSION >= 1.3) { use Encode; } +if ($RRDs::VERSION >= 1.3) { + use Encode; + use Encode::Guess; + Encode->import; + Encode::Guess->import; +} use Munin::Master::Logger; use Munin::Master::Utils; @@ -1392,8 +1397,8 @@ if ($RRDs::VERSION >= 1.3) { @complete = map { my $str = $_; - $str = encode("utf8", (decode("latin1", $_))); - $str; + my $utf8 = guess_encoding($str, 'utf8'); + ref $utf8 ? $str : encode("utf8", (decode("latin1", $_))); } @complete; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.25/master/lib/Munin/Master/LimitsOld.pm new/munin-2.0.32/master/lib/Munin/Master/LimitsOld.pm --- old/munin-2.0.25/master/lib/Munin/Master/LimitsOld.pm 2014-11-24 22:46:24.000000000 +0100 +++ new/munin-2.0.32/master/lib/Munin/Master/LimitsOld.pm 2017-03-01 20:43:49.000000000 +0100 @@ -161,7 +161,19 @@ my $work_array = []; foreach my $workfield ( @{munin_find_field_for_limits($config, qr/^(critical|warning)/)}) { - my $parent = munin_get_parent($workfield); + my $parent; + if (defined $workfield->{'graph_title'}) { + # Limit is defined on a service and inherits to all fields, queue it + $parent = $workfield; + } else { + # Limit is defined on a field, or a non-existent service + # Assume field, grab parent service, and verify it is valid + $parent = munin_get_parent($workfield); + if (!defined $parent->{'graph_title'}) { + DEBUG "[DEBUG] Ignoring work item for non-existent service: " . munin_get_node_name($parent) if ($DEBUG); + next; + } + } if (!defined $work_hash_tmp{$parent}) { $work_hash_tmp{$parent} = 1; push @$work_array, $parent; @@ -297,7 +309,7 @@ my $hparentobj = munin_get_parent($hobj); my $parent = munin_get_node_name($hobj); my $gparent = munin_get_node_name($hparentobj); - my $children = munin_get_children($hash); + my $field_order = munin_get_field_order($hash); if (!ref $hash) { LOGCROAK("I was passed a non-hash!"); @@ -308,45 +320,51 @@ DEBUG "[DEBUG] processing service: $service"; # Some fields that are nice to have in the plugin output - $hash->{'fields'} = join(' ', map {munin_get_node_name($_)} @$children); + $hash->{'fields'} = join(' ', @$field_order); $hash->{'plugin'} = $service; $hash->{'graph_title'} = get_full_service_name($hash); $hash->{'host'} = $hostalias; $hash->{'group'} = get_full_group_path($hparentobj); $hash->{'worst'} = "ok"; $hash->{'worstid'} = 0 unless defined $hash->{'worstid'}; + $hash->{'recovered'} = {}; my $state_file = sprintf ('%s/state-%s-%s.storable', $config->{dbdir}, $hash->{group}, $host); DEBUG "[DEBUG] state_file: $state_file"; my $state = munin_read_storable($state_file) || {}; - foreach my $field (@$children) { + my %seen = (); + foreach my $fname (@$field_order) { + # If field has an alias, strip it away and store it for use in munin_get_rrd_filename + my $path = undef; + $path = $1 if ($fname =~ s/=(.+)//); + + # Field order contains duplicates sometimes, skip if already seen + next if (exists($seen{$fname})); + $seen{$fname} = 1; + + my $field = munin_get_node($hash, [$fname]); next if (!defined $field or ref($field) ne "HASH"); - my $fname = munin_get_node_name($field); my $fpath = munin_get_node_loc($field); my $onfield = munin_get_node($oldnotes, $fpath); - my $oldstate= ''; + my $oldstate = 'ok'; + + my ($warn, $crit, $unknown_limit) = get_limits($field); - # 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})); + # Skip fields without warning/critical definitions + next if (!defined $warn and !defined $crit); # get the old state if there is one, or leave it empty. - if ( defined($onfield) or + if ( defined($onfield) and defined($onfield->{"state"}) ) { $oldstate = $onfield->{"state"}; } - my ($warn, $crit, $unknown_limit) = get_limits($field); - - # Skip fields without warning/critical definitions - next if (!defined $warn and !defined $crit); - DEBUG "[DEBUG] processing field: " . join('::', @$fpath); DEBUG "[DEBUG] field: " . munin_dumpconfig_as_str($field); my $value; { - my $rrd_filename = munin_get_rrd_filename($field); + my $rrd_filename = munin_get_rrd_filename($field, $path); my ($current_updated_timestamp, $current_updated_value) = @{ $state->{value}{"$rrd_filename:42"}{current} || [ ] }; my ($previous_updated_timestamp, $previous_updated_value) = @{ $state->{value}{"$rrd_filename:42"}{previous} || [ ] }; @@ -525,6 +543,7 @@ if ($oldstate ne 'ok') { $hash->{'state_changed'} = 1; + $hash->{'recovered'}{$fname} = 1; } } } @@ -536,8 +555,8 @@ my $hash = shift || return; # This hash will have values that we can look up such as these: - my @critical = (undef, undef); - my @warning = (undef, undef); + my $critical = undef; + my $warning = undef; my $crit = munin_get($hash, "critical", undef); my $warn = munin_get($hash, "warning", undef); my $unknown_limit = munin_get($hash, "unknown_limit", 3); @@ -545,37 +564,38 @@ my $name = munin_get_node_name($hash); if (defined $crit and $crit =~ /^\s*([-+\d.]*):([-+\d.]*)\s*$/) { - $critical[0] = $1 if length $1; - $critical[1] = $2 if length $2; + $critical = [undef, undef]; + ${$critical}[0] = $1 if length $1; + ${$critical}[1] = $2 if length $2; } elsif (defined $crit and $crit =~ /^\s*([-+\d.]+)\s*$/) { - $critical[1] = $1; + $critical = [undef, $1]; } elsif (defined $crit) { - @critical = (0, 0); + $critical = [0, 0]; } if(defined $crit) { DEBUG "[DEBUG] processing critical: $name -> " - . (defined $critical[0]? $critical[0] : "") + . (defined ${$critical}[0]? ${$critical}[0] : "") . " : " - . (defined $critical[1]? $critical[1] : ""); - } + . (defined ${$critical}[1]? ${$critical}[1] : ""); + } if (defined $warn and $warn =~ /^\s*([-+\d.]*):([-+\d.]*)\s*$/) { - $warning[0] = $1 if length $1; - $warning[1] = $2 if length $2; + ${$warning}[0] = $1 if length $1; + ${$warning}[1] = $2 if length $2; } elsif (defined $warn and $warn =~ /^\s*([-+\d.]+)\s*$/) { - $warning[1] = $1; + $warning = [undef, $1]; } elsif (defined $warn) { - @warning = (0, 0); + $warning = [0, 0]; } if(defined $warn) { DEBUG "[DEBUG] processing warning: $name -> " - . (defined $warning[0]? $warning[0] : "") + . (defined ${$warning}[0]? ${$warning}[0] : "") . " : " - . (defined $warning[1]? $warning[1] : ""); + . (defined ${$warning}[1]? ${$warning}[1] : ""); } if ($unknown_limit =~ /^\s*(\d+)\s*$/) { @@ -589,7 +609,7 @@ DEBUG "[DEBUG] processing unknown_limit: $name -> $unknown_limit"; } - return (@warning, @critical, $unknown_limit); + return ($warning, $critical, $unknown_limit); } sub generate_service_message { @@ -616,10 +636,11 @@ if ( defined($children) ) { foreach my $field (@$children) { if (defined $field->{"state"}) { - push @{$stats{$field->{"state"}}}, munin_get_node_name($field); - if ($field->{"state"} eq "ok") { - push @{$stats{"foks"}}, munin_get_node_name($field); - } + my $fname = munin_get_node_name($field); + push @{$stats{$field->{'state'}}}, $fname; + if ($field->{'state'} eq 'ok' and defined $hash->{'recovered'}{$fname}) { + push @{$stats{'foks'}}, $fname; + } } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.25/master/lib/Munin/Master/Node.pm new/munin-2.0.32/master/lib/Munin/Master/Node.pm --- old/munin-2.0.25/master/lib/Munin/Master/Node.pm 2014-11-24 22:46:24.000000000 +0100 +++ new/munin-2.0.32/master/lib/Munin/Master/Node.pm 2017-03-01 20:43:49.000000000 +0100 @@ -94,7 +94,7 @@ return 0; } } elsif ($uri->scheme eq "ssh") { - my $ssh_command = "ssh -o ChallengeResponseAuthentication=no -o StrictHostKeyChecking=no "; + my $ssh_command = sprintf("%s %s", $config->{ssh_command}, $config->{ssh_options}); my $user_part = ($uri->user) ? ($uri->user . "@") : ""; my $remote_cmd = ($uri->path ne '/') ? $uri->path : ""; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.25/master/lib/Munin/Master/Utils.pm new/munin-2.0.32/master/lib/Munin/Master/Utils.pm --- old/munin-2.0.25/master/lib/Munin/Master/Utils.pm 2014-11-24 22:46:24.000000000 +0100 +++ new/munin-2.0.32/master/lib/Munin/Master/Utils.pm 2017-03-01 20:43:49.000000000 +0100 @@ -960,7 +960,7 @@ exit(1); } # missing ok, return last value if we have one, copy config if not - if (undef == $config_parts->{$what}{config}) { + unless (defined $config_parts->{$what}{config}) { # well, not if we shouldn't include the config if ($config_parts->{$what}{include_base}) { $doupdate = 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.25/master/www/munin-nodeview.tmpl new/munin-2.0.32/master/www/munin-nodeview.tmpl --- old/munin-2.0.25/master/www/munin-nodeview.tmpl 2014-11-24 22:46:24.000000000 +0100 +++ new/munin-2.0.32/master/www/munin-nodeview.tmpl 2017-03-01 20:43:49.000000000 +0100 @@ -9,7 +9,7 @@ <h3 id="<TMPL_VAR ESCAPE="HTML" NAME="NAME">"><TMPL_VAR ESCAPE="HTML" NAME="NAME"></h3> <table> <TMPL_LOOP NAME="SERVICES"> - <tr><td> + <tr><td><TMPL_VAR ESCAPE="HTML" NAME="NAME"></td></tr><tr><td> <a href="<TMPL_VAR NAME="URLX">"> <img class="i<TMPL_IF NAME="STATE_WARNING">warn</TMPL_IF><TMPL_IF NAME="STATE_CRITICAL">crit</TMPL_IF>" src="<TMPL_VAR NAME="IMGDAY">" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.25/master/www/munin-serviceview.tmpl new/munin-2.0.32/master/www/munin-serviceview.tmpl --- old/munin-2.0.25/master/www/munin-serviceview.tmpl 2014-11-24 22:46:24.000000000 +0100 +++ new/munin-2.0.32/master/www/munin-serviceview.tmpl 2017-03-01 20:43:49.000000000 +0100 @@ -47,10 +47,10 @@ <TMPL_IF NAME="IMGWEEKSUMWIDTH">width="<TMPL_VAR NAME="IMGWEEKSUMWIDTH">" </TMPL_IF> <TMPL_IF NAME="IMGWEEKSUMHEIGHT">height="<TMPL_VAR NAME="IMGWEEKSUMHEIGHT">"</TMPL_IF>/> </td> - <td><img src="<TMPL_VAR NAME="IMGWEEKSUM">" - alt="summed weekly graph" - <TMPL_IF NAME="IMGWEEKSUMWIDTH">width="<TMPL_VAR NAME="IMGWEEKSUMWIDTH">" </TMPL_IF> - <TMPL_IF NAME="IMGWEEKSUMHEIGHT">height="<TMPL_VAR NAME="IMGWEEKSUMHEIGHT">"</TMPL_IF>/> + <td><img src="<TMPL_VAR NAME="IMGYEARSUM">" + alt="summed yearly graph" + <TMPL_IF NAME="IMGYEARSUMWIDTH">width="<TMPL_VAR NAME="IMGYEARSUMWIDTH">" </TMPL_IF> + <TMPL_IF NAME="IMGYEARSUMHEIGHT">height="<TMPL_VAR NAME="IMGYEARSUMHEIGHT">"</TMPL_IF>/> </td> </tr> </TMPL_IF> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.25/plugins/javalib/org/munin/plugin/jmx/PortProbe.java new/munin-2.0.32/plugins/javalib/org/munin/plugin/jmx/PortProbe.java --- old/munin-2.0.25/plugins/javalib/org/munin/plugin/jmx/PortProbe.java 1970-01-01 01:00:00.000000000 +0100 +++ new/munin-2.0.32/plugins/javalib/org/munin/plugin/jmx/PortProbe.java 2017-03-01 20:43:49.000000000 +0100 @@ -0,0 +1,43 @@ +package org.munin.plugin.jmx; + +import java.io.IOException; +import java.net.InetAddress; +import java.net.InetSocketAddress; +import java.net.Socket; +import java.net.SocketAddress; + +public class PortProbe +{ + static public void main(String[] argv) + throws Exception + { + int port = -1; + InetAddress host = null; + + switch (argv.length) + { + case 1: // assume the loopback address ("localhost") + port = Integer.valueOf(argv[0]); + host = InetAddress.getByName(null); + break; + case 2: // host name or address was given + port = Integer.valueOf(argv[0]); + host = InetAddress.getByName(argv[1]); + break; + default: + System.err.println("Utilities PORT [HOST]"); + System.exit(1); + } + + Socket socket = new Socket(); + SocketAddress sa = new InetSocketAddress(host, port); + try { + socket.connect(sa, 5*1000); + } catch (IOException e) { + System.exit(1); + } finally { + if (!socket.isClosed()) + socket.close(); + } + } +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.25/plugins/node.d/ejabberd_.in new/munin-2.0.32/plugins/node.d/ejabberd_.in --- old/munin-2.0.25/plugins/node.d/ejabberd_.in 2014-11-24 22:46:24.000000000 +0100 +++ new/munin-2.0.32/plugins/node.d/ejabberd_.in 2017-03-01 20:43:49.000000000 +0100 @@ -179,7 +179,7 @@ echo 'graph_info This graph shows a statistic of ejabberd' if [ "$MODE" = "connections" ]; then - echo 'graph_title Server-to-server conections' + echo 'graph_title Server-to-server connections' echo 'graph_vlabel s2s' echo 's2s_connections_out.label incoming s2s connections' echo 's2s_connections_out.info Number of outgoing server to server connections' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.25/plugins/node.d/hddtemp_smartctl.in new/munin-2.0.32/plugins/node.d/hddtemp_smartctl.in --- old/munin-2.0.25/plugins/node.d/hddtemp_smartctl.in 2014-11-24 22:46:24.000000000 +0100 +++ new/munin-2.0.32/plugins/node.d/hddtemp_smartctl.in 2017-03-01 20:43:49.000000000 +0100 @@ -24,7 +24,7 @@ used. dev_$dev - monitoring device for one drive, e.g. twe0 -If the "smartctl" enviroment variable is not set the plugin will +If the "smartctl" environment variable is not set the plugin will search your $PATH, /usr/bin, /usr/sbin, /usr/local/bin and /usr/local/sbin for a file called "smartctl", and use that. @@ -41,6 +41,9 @@ Copyright (c) 2005, Lutz Peter Christoph All rights reserved. +2016-08-27, Gabriele Pohl (contact@dipohl.de) +Fix for github issue #690 + =head1 LICENSE Redistribution and use in source and binary forms, with or without @@ -162,7 +165,7 @@ } elsif ($^O eq 'freebsd') { opendir(DEV, '/dev'); - @drives = grep /^ad[0-9]+$/, readdir DEV; + @drives = grep /^(ada?|da)[0-9]+$/, readdir DEV; closedir(DEV); } elsif ($^O eq 'solaris') { @drives = map { s@.*/@@ ; $_ } glob '/dev/rdsk/c*t*d*s2'; @@ -224,11 +227,32 @@ warn "[DEBUG] Command for $drive is % $cmd %\n" if $DEBUG; my $output = `$cmd`; - if ($? ne 0) { - print "$drive.value U\n"; - print "$drive.extinfo Command $cmd on drive $drive failed: $?. The plugin needs to have read permission on all monitored devices.\n"; - warn "[ERROR] Command $cmd on drive $drive failed: $?. The plugin needs to have read permission on all monitored devices.\n"; - next; + my $cmd_exit = $?; + + # Strip header + $output =~ s/.*?\n\n//s; + # Strip trailer + $output =~ s/Please specify device type with the -d option.\n//s; + $output =~ s/Use smartctl -h to get a usage summary//s; + $output =~ s/\n+$//s; + + if ($cmd_exit != 0) { + print "$drive.value U\n"; + if ($cmd_exit == -1) { + warn "[ERROR] Command $cmd on drive $drive failed to execute: $!"; + } else { + my $smartctl_exit = $cmd_exit >> 8; + print "$drive.extinfo Command '$cmd' on drive $drive failed with exit($smartctl_exit)\n"; + + # exit (2) is a normal state with directive "--nocheck=standby" when device is in STANDBY or SLEEP mode + if ($smartctl_exit == 2 and $use_nocheck) { + if ($output =~ /(?:standby|sleep)/i) { + next; + } + } + warn "[ERROR] Command $cmd on drive $drive failed with exit($smartctl_exit): $output"; + } + next; } if ($output =~ /Current Drive Temperature:\s*(\d+)/) { print "$drive.value $1\n"; @@ -238,6 +262,9 @@ } elsif ($output =~ /^(231 Temperature_Celsius.*)/m) { my @F = split ' ', $1; print "$drive.value $F[9]\n"; + } elsif ($output =~ /^(190 Airflow_Temperature_Cel.*)/m) { + my @F = split ' ', $1; + print "$drive.value $F[9]\n"; } else { print "$drive.value U\n"; print "$drive.extinfo Temperature not detected in smartctl output\n"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.25/plugins/node.d/http_loadtime.in new/munin-2.0.32/plugins/node.d/http_loadtime.in --- old/munin-2.0.25/plugins/node.d/http_loadtime.in 2014-11-24 22:46:24.000000000 +0100 +++ new/munin-2.0.32/plugins/node.d/http_loadtime.in 2017-03-01 20:43:49.000000000 +0100 @@ -5,13 +5,20 @@ =head1 NAME -http_loadtime - Plugin to graph HTTP response time of a specific page +http_loadtime - Plugin to graph the HTTP response times of specific pages =head1 CONFIGURATION The following environment variables are used by this plugin - target - URL to fetch (default: "http://localhost/") + target - comma separated URL(s) to fetch (default: "http://localhost/") + example: + [http_loadtime] + env.target http://localhost.de,http://localhost.de/some-site.html + env.requisites true + + Do not enable the download of page requisites (env.requisites) for https + sites since wget needs incredible long to perform this on big sites... =head1 AUTHOR @@ -29,8 +36,17 @@ =cut +. $MUNIN_LIBDIR/plugins/plugin.sh + target=${target:-"http://localhost/"} -wget_opt="--user-agent munin/http_loadtime --no-cache -q --delete-after" +requisites=${requisites:-"false"} + +urls=`echo $target | tr "," "\n"` +wget_opt="--user-agent munin/http_loadtime --no-cache -q" +if [ "$requisites" == "true" ]; then + wget_opt="$wget_opt --page-requisites" +fi + time_bin=`which time` if [ "$1" = "autoconf" ]; then @@ -40,16 +56,22 @@ command -v wget 2>&1 >/dev/null || result=1 if [ "$result" != "yes" ]; then echo "no (programs time, wget and tr required)" - exit 0 + exit 0 fi - if ! $wget_bin -q -O /dev/null $target; then - # check if url responds - # - wget --spider $target $wget_opt - if [ "$?" != "0" ]; then - echo "no (Cannot run wget against "$target")" - exit 0 + # if $target contains more than one url + if ! wget -q -O /dev/null $target; then + + # check if urls respond + # + for uri in $urls + do + wget --spider $uri $wget_opt + if [ "$?" != "0" ]; then + echo "no (Cannot run wget against "$uri")" + exit 0 + fi + done fi echo yes exit 0 @@ -60,9 +82,15 @@ echo "graph_args --base 1000 -l 0" echo "graph_vlabel Load time in seconds" echo "graph_category network" - echo "graph_info This graph shows load time in seconds of $target" - echo "loadtime.label loadtime" - echo "loadtime.info Load time" + echo "graph_info This graph shows the load time in seconds" + for uri in $urls + do + uri_short=`echo ${uri:0:30}` + if [ "$uri_short" != "$uri" ]; then uri_short=$uri_short"..."; fi + esc_uri="$(clean_fieldname "$uri")" + echo $esc_uri".label $uri_short" + echo $esc_uri".info page load time" + done exit 0 fi @@ -71,7 +99,13 @@ trap "rm -rf $TEMPO_DIR" EXIT cd $TEMPO_DIR || exit 1 -loadtime=`$time_bin --quiet -f "%e" wget $wget_opt $target 2>&1` -cd - -echo "loadtime.value $loadtime" +for uri in $urls +do + loadtime=`$time_bin -f "%e" wget $wget_opt --header='Accept-Encoding: gzip,deflate' $uri 2>&1` + + esc_uri="$(clean_fieldname "$uri")" + echo $esc_uri".value $loadtime" +done + +exit 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.25/plugins/node.d/multips.in new/munin-2.0.32/plugins/node.d/multips.in --- old/munin-2.0.25/plugins/node.d/multips.in 2014-11-24 22:46:24.000000000 +0100 +++ new/munin-2.0.32/plugins/node.d/multips.in 2017-03-01 20:43:49.000000000 +0100 @@ -56,6 +56,11 @@ . $MUNIN_LIBDIR/plugins/plugin.sh if [ "$1" = "autoconf" ]; then + if [ -z "$names" ]; then + echo "no (Configuration required)" + exit 0 + fi + echo yes exit 0 fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.25/plugins/node.d/ntp_kernel_err.in new/munin-2.0.32/plugins/node.d/ntp_kernel_err.in --- old/munin-2.0.25/plugins/node.d/ntp_kernel_err.in 2014-11-24 22:46:24.000000000 +0100 +++ new/munin-2.0.32/plugins/node.d/ntp_kernel_err.in 2017-03-01 20:43:49.000000000 +0100 @@ -53,9 +53,7 @@ if [ $(ntpq -c version | grep --extended-regexp --only-matching '[[:digit:]].[[:digit:]].[[:digit:]]' | tr -d '.') -ge 427 ] then - cmd=ntpq + ntpq -c kerninfo | awk '/^estimated error:/ { print $3 / 1000 }' else - cmd=ntpdc + ntpdc -c kerninfo | awk '/^estimated error:/ { print $3 }' fi - -$cmd -c kerninfo | awk '/^estimated error:/ { print $3 }' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.25/plugins/node.d/ntp_kernel_pll_off.in new/munin-2.0.32/plugins/node.d/ntp_kernel_pll_off.in --- old/munin-2.0.25/plugins/node.d/ntp_kernel_pll_off.in 2014-11-24 22:46:24.000000000 +0100 +++ new/munin-2.0.32/plugins/node.d/ntp_kernel_pll_off.in 2017-03-01 20:43:49.000000000 +0100 @@ -53,9 +53,7 @@ if [ $(ntpq -c version | grep --extended-regexp --only-matching '[[:digit:]].[[:digit:]].[[:digit:]]' | tr -d '.') -ge 427 ] then - cmd=ntpq + ntpq -c kerninfo | awk '/^pll offset:/ { print $3 / 1000 }' else - cmd=ntpdc + ntpdc -c kerninfo | awk '/^pll offset:/ { print $3 }' fi - -$cmd -c kerninfo | awk '/^pll offset:/ { print $3 }' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.25/plugins/node.d/ntp_states.in new/munin-2.0.32/plugins/node.d/ntp_states.in --- old/munin-2.0.25/plugins/node.d/ntp_states.in 2014-11-24 22:46:24.000000000 +0100 +++ new/munin-2.0.32/plugins/node.d/ntp_states.in 2017-03-01 20:43:49.000000000 +0100 @@ -53,6 +53,7 @@ "excess" => 2, "backup" => 3, "outlyer" => 4, + "outlier" => 4, "candidate" => 5, "sys.peer" => 6, "pps.peer" => 7 @@ -69,7 +70,7 @@ # ntpq -c associations output: #ind assid status conf reach auth condition last_event cnt #=========================================================== -# 1 63933 931a yes yes none outlyer sys_peer 1 +# 1 63933 931a yes yes none outlier sys_peer 1 # 2 63934 943a yes yes none candidate sys_peer 3 foreach my $line (`ntpq -c associations`) { @@ -146,7 +147,7 @@ print "graph_title NTP states\n"; print "graph_args --base 1000 --vertical-label state --lower-limit 0\n"; print "graph_category time\n"; - print "graph_info These are graphs of the states of this system's NTP peers. The states translate as follows: 0=reject, 1=falsetick, 2=excess, 3=backup, 4=outlyer, 5=candidate, 6=system peer, 7=PPS peer. See http://www.eecis.udel.edu/~mills/ntp/html/decode.html for more information on the meaning of these conditions.\n"; + print "graph_info These are graphs of the states of this system's NTP peers. The states translate as follows: 0=reject, 1=falsetick, 2=excess, 3=backup, 4=outiyer, 5=candidate, 6=system peer, 7=PPS peer. See http://www.eecis.udel.edu/~mills/ntp/html/decode.html for more information on the meaning of these conditions.\n"; foreach my $addr (keys %peers_condition) { my ($fieldname, $hostname) = &make_names($addr); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.25/plugins/node.d/postgres_connections_.in new/munin-2.0.32/plugins/node.d/postgres_connections_.in --- old/munin-2.0.25/plugins/node.d/postgres_connections_.in 2014-11-24 22:46:24.000000000 +0100 +++ new/munin-2.0.32/plugins/node.d/postgres_connections_.in 2017-03-01 20:43:49.000000000 +0100 @@ -68,6 +68,17 @@ "SELECT tmp.mstate AS state,COALESCE(count,0) FROM (VALUES ('active'),('waiting'),('idle'),('idletransaction'),('unknown')) AS tmp(mstate) LEFT JOIN + (SELECT CASE WHEN wait_event_type IS NOT NULL THEN 'waiting' WHEN state='idle' THEN 'idle' WHEN state LIKE 'idle in transaction%' THEN 'idletransaction' WHEN state='disabled' THEN 'unknown' WHEN query='<insufficient privilege>' THEN 'unknown' ELSE 'active' END AS mstate, + count(*) AS count + FROM pg_stat_activity WHERE pid != pg_backend_pid() %%FILTER%% + GROUP BY CASE WHEN wait_event_type IS NOT NULL THEN 'waiting' WHEN state='idle' THEN 'idle' WHEN state LIKE 'idle in transaction%' THEN 'idletransaction' WHEN state='disabled' THEN 'unknown' WHEN query='<insufficient privilege>' THEN 'unknown' ELSE 'active' END + ) AS tmp2 + ON tmp.mstate=tmp2.mstate + ORDER BY 1; + ", + [ 9.5, "SELECT tmp.mstate AS state,COALESCE(count,0) FROM + (VALUES ('active'),('waiting'),('idle'),('idletransaction'),('unknown')) AS tmp(mstate) + LEFT JOIN (SELECT CASE WHEN waiting THEN 'waiting' WHEN state='idle' THEN 'idle' WHEN state LIKE 'idle in transaction%' THEN 'idletransaction' WHEN state='disabled' THEN 'unknown' WHEN query='<insufficient privilege>' THEN 'unknown' ELSE 'active' END AS mstate, count(*) AS count FROM pg_stat_activity WHERE pid != pg_backend_pid() %%FILTER%% @@ -75,7 +86,18 @@ ) AS tmp2 ON tmp.mstate=tmp2.mstate ORDER BY 1; - ", + " ], + [ 9.4, "SELECT tmp.state,COALESCE(count,0) FROM + (VALUES ('active'),('waiting'),('idle'),('idletransaction'),('unknown')) AS tmp(state) + LEFT JOIN + (SELECT CASE WHEN waiting THEN 'waiting' WHEN query='<IDLE>' THEN 'idle' WHEN query='<IDLE> in transaction' THEN 'idletransaction' WHEN query='<insufficient privilege>' THEN 'unknown' ELSE 'active' END AS state, + count(*) AS count + FROM pg_stat_activity WHERE pid != pg_backend_pid() %%FILTER%% + GROUP BY CASE WHEN waiting THEN 'waiting' WHEN query='<IDLE>' THEN 'idle' WHEN query='<IDLE> in transaction' THEN 'idletransaction' WHEN query='<insufficient privilege>' THEN 'unknown' ELSE 'active' END + ) AS tmp2 + ON tmp.state=tmp2.state + ORDER BY 1 + " ], [ 9.1, "SELECT tmp.state,COALESCE(count,0) FROM (VALUES ('active'),('waiting'),('idle'),('idletransaction'),('unknown')) AS tmp(state) LEFT JOIN diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.25/plugins/node.d/postgres_connections_db.in new/munin-2.0.32/plugins/node.d/postgres_connections_db.in --- old/munin-2.0.25/plugins/node.d/postgres_connections_db.in 2014-11-24 22:46:24.000000000 +0100 +++ new/munin-2.0.32/plugins/node.d/postgres_connections_db.in 2017-03-01 20:43:49.000000000 +0100 @@ -63,8 +63,10 @@ vlabel => 'Connections', basequery => [ "SELECT pg_database.datname,COALESCE(count,0) AS count FROM pg_database LEFT JOIN (SELECT datname,count(*) FROM pg_stat_activity WHERE pid != pg_backend_pid() GROUP BY datname) AS tmp ON pg_database.datname=tmp.datname WHERE datallowconn ORDER BY 1", - [ - 9.1, + [ 9.4, + "SELECT pg_database.datname,COALESCE(count,0) AS count FROM pg_database LEFT JOIN (SELECT datname,count(*) FROM pg_stat_activity WHERE pid != pg_backend_pid() GROUP BY datname) AS tmp ON pg_database.datname=tmp.datname WHERE datallowconn ORDER BY 1", + ], + [ 9.1, "SELECT pg_database.datname,COALESCE(count,0) AS count FROM pg_database LEFT JOIN (SELECT datname,count(*) FROM pg_stat_activity WHERE procpid != pg_backend_pid() GROUP BY datname) AS tmp ON pg_database.datname=tmp.datname WHERE datallowconn ORDER BY 1", ] ], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.25/plugins/node.d/postgres_querylength_.in new/munin-2.0.32/plugins/node.d/postgres_querylength_.in --- old/munin-2.0.25/plugins/node.d/postgres_querylength_.in 2014-11-24 22:46:24.000000000 +0100 +++ new/munin-2.0.32/plugins/node.d/postgres_querylength_.in 2017-03-01 20:43:49.000000000 +0100 @@ -70,6 +70,12 @@ SELECT 'transaction',COALESCE(max(extract(epoch FROM CURRENT_TIMESTAMP-xact_start)),0) FROM pg_stat_activity WHERE 1=1 %%FILTER%%", [ 9.1, + "SELECT 'query',COALESCE(max(extract(epoch FROM CURRENT_TIMESTAMP-query_start)),0) FROM pg_stat_activity WHERE query NOT LIKE '<IDLE%' %%FILTER%% + UNION ALL + SELECT 'transaction',COALESCE(max(extract(epoch FROM CURRENT_TIMESTAMP-xact_start)),0) FROM pg_stat_activity WHERE 1=1 %%FILTER%%", + ], + [ + 9.1, "SELECT 'query',COALESCE(max(extract(epoch FROM CURRENT_TIMESTAMP-query_start)),0) FROM pg_stat_activity WHERE current_query NOT LIKE '<IDLE%' %%FILTER%% UNION ALL SELECT 'transaction',COALESCE(max(extract(epoch FROM CURRENT_TIMESTAMP-xact_start)),0) FROM pg_stat_activity WHERE 1=1 %%FILTER%%", @@ -87,7 +93,7 @@ ], suggestquery => "SELECT datname FROM pg_database WHERE datallowconn AND NOT datistemplate AND NOT datname='postgres' UNION ALL SELECT 'ALL' ORDER BY 1 LIMIT 10", - stack => 1 + stack => 0 ); $pg->Process(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.25/plugins/node.d/postgres_users.in new/munin-2.0.32/plugins/node.d/postgres_users.in --- old/munin-2.0.25/plugins/node.d/postgres_users.in 2014-11-24 22:46:24.000000000 +0100 +++ new/munin-2.0.32/plugins/node.d/postgres_users.in 2017-03-01 20:43:49.000000000 +0100 @@ -62,8 +62,10 @@ vlabel => 'Connections', basequery => [ "SELECT usename,count(*) FROM pg_stat_activity WHERE pid != pg_backend_pid() GROUP BY usename ORDER BY 1", - [ - 9.1, + [ 9.4, + "SELECT usename,count(*) FROM pg_stat_activity WHERE pid != pg_backend_pid() GROUP BY usename ORDER BY 1", + ], + [ 9.1, "SELECT usename,count(*) FROM pg_stat_activity WHERE procpid != pg_backend_pid() GROUP BY usename ORDER BY 1", ] ], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.25/plugins/node.d/slapd_bdb_cache_.in new/munin-2.0.32/plugins/node.d/slapd_bdb_cache_.in --- old/munin-2.0.25/plugins/node.d/slapd_bdb_cache_.in 2014-11-24 22:46:24.000000000 +0100 +++ new/munin-2.0.32/plugins/node.d/slapd_bdb_cache_.in 2017-03-01 20:43:49.000000000 +0100 @@ -76,7 +76,7 @@ } elsif ($arg && $arg eq "autoconf") { if (! -x $dbstat) { print "no (Can't execute db_stat file '$dbstat')\n"; - } elsif (-d $dbdir && -r $dbdir) { + } elsif (! -d $dbdir || ! -r $dbdir) { print "no (Can't open database directory '$dbdir')"; } else { print "yes\n"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.25/plugins/node.d/snmp__if_.in new/munin-2.0.32/plugins/node.d/snmp__if_.in --- old/munin-2.0.25/plugins/node.d/snmp__if_.in 2014-11-24 22:46:24.000000000 +0100 +++ new/munin-2.0.32/plugins/node.d/snmp__if_.in 2017-03-01 20:43:49.000000000 +0100 @@ -219,7 +219,7 @@ print "recv.cdef recv,8,*\n"; print "recv.max $speed\n"; print "recv.min 0\n"; - print "recv.warning ", (-$warn), "\n" if defined $warn; + print "recv.warning ", ($warn), "\n" if defined $warn; print "send.label bps\n"; print "send.type DERIVE\n"; print "send.negative recv\n"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.25/plugins/node.d/snmp__if_err_.in new/munin-2.0.32/plugins/node.d/snmp__if_err_.in --- old/munin-2.0.25/plugins/node.d/snmp__if_err_.in 2014-11-24 22:46:24.000000000 +0100 +++ new/munin-2.0.32/plugins/node.d/snmp__if_err_.in 2017-03-01 20:43:49.000000000 +0100 @@ -143,7 +143,7 @@ print "recv.type DERIVE\n"; print "recv.graph no\n"; print "recv.min 0\n"; - print "recv.warning ", (-$warn), "\n" if defined $warn; + print "recv.warning ", ($warn), "\n" if defined $warn; print "send.label errors\n"; print "send.type DERIVE\n"; print "send.negative recv\n"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.25/plugins/node.d.java/jmx_.in new/munin-2.0.32/plugins/node.d.java/jmx_.in --- old/munin-2.0.25/plugins/node.d.java/jmx_.in 2014-11-24 22:46:24.000000000 +0100 +++ new/munin-2.0.32/plugins/node.d.java/jmx_.in 2017-03-01 20:43:49.000000000 +0100 @@ -97,12 +97,7 @@ fi if [ "x$1" = "xautoconf" ] ; then - NC=`which nc 2>/dev/null` - if [ "x$NC" = "x" ] ; then - echo "no (nc not found)" - exit 0 - fi - $NC -n -z $ip $port >/dev/null 2>&1 + $JAVA_BIN -cp $MUNIN_JAR $JAVA_OPTS org.munin.plugin.jmx.PortProbe $port $ip CONNECT=$? $JAVA_BIN -? >/dev/null 2>&1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.25/plugins/node.d.linux/acpi.in new/munin-2.0.32/plugins/node.d.linux/acpi.in --- old/munin-2.0.25/plugins/node.d.linux/acpi.in 2014-11-24 22:46:24.000000000 +0100 +++ new/munin-2.0.32/plugins/node.d.linux/acpi.in 2017-03-01 20:43:49.000000000 +0100 @@ -13,7 +13,7 @@ =head1 CONFIGURATION -Load the 'thermal_zone' kernel module and the plugin gets the thermal zones from /proc/acpi/thermal_zones/*/ automagically. +Load the 'thermal' kernel module and the plugin gets the thermal zones from /sys/class/thermal/thermal_zone*/ automagically. =head1 USAGE @@ -47,33 +47,31 @@ =cut -ATZ="$(echo /proc/acpi/thermal_zone/*/temperature)" +ATZ="$(echo /sys/class/thermal/thermal_zone*)" do_ () { # Fetch - echo "$ATZ" | tr ' ' '\n' | awk -F'[ /\t]*' '{ - ZONE=$5 - getline < $0 - print ZONE".value "$2 - }' + for ZONE in $ATZ; do + TEMP=`cat $ZONE/temp` + echo `basename $ZONE`.value `echo $TEMP * 0.001 | bc` + done exit 0 } do_config () { echo "graph_title ACPI Thermal zone temperatures" - echo "graph_vlabel Celcius" + echo "graph_vlabel Celsius" echo "graph_category sensors" echo "graph_info This graph shows the temperature in different ACPI Thermal zones. If there is only one it will usually be the case temperature." - echo "$ATZ" | - awk -F'[ /]' '{ - print $5".label "$5; - }' - + for ZONE in $ATZ; do + TYPE=`cat $ZONE/type` + echo `basename $ZONE`.label $TYPE + done } do_autoconf () { for f in $ATZ; do - test -r $f || { - echo "no (cannot read $f)" + test -r $f/temp || { + echo "no (cannot read $f/temp)" exit 0 } done diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.25/plugins/node.d.linux/apt_all.in new/munin-2.0.32/plugins/node.d.linux/apt_all.in --- old/munin-2.0.25/plugins/node.d.linux/apt_all.in 2014-11-24 22:46:24.000000000 +0100 +++ new/munin-2.0.32/plugins/node.d.linux/apt_all.in 2017-03-01 20:43:49.000000000 +0100 @@ -14,7 +14,14 @@ =head1 CONFIGURATION -No configuration needed +You can add some extra options to the apt call, in order to override +your /etc/apt.conf defaults. + +[apt_all] +env.options -o Debug::pkgDepCache::AutoInstall=false -o APT::Get::Show-Versions=false + +Note that apt is called with no extra options by default, so it fully honors +your /etc/apt.conf defaults. =head1 USAGE @@ -79,7 +86,8 @@ open(STATE, ">$statefile") or die("Couldn't open state file $statefile for writing."); foreach my $release (@releases) { - my $apt="apt-get -u dist-upgrade --print-uris --yes -t $release |"; + my $options = $ENV{options} || ""; + my $apt="apt-get $options -u dist-upgrade --print-uris --yes -t $release |"; open (APT, "$apt") or exit 22; my @pending = (); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.25/plugins/node.d.linux/diskstats.in new/munin-2.0.32/plugins/node.d.linux/diskstats.in --- old/munin-2.0.25/plugins/node.d.linux/diskstats.in 2014-11-24 22:46:24.000000000 +0100 +++ new/munin-2.0.32/plugins/node.d.linux/diskstats.in 2017-03-01 20:43:49.000000000 +0100 @@ -34,6 +34,9 @@ # Fetch current counter values my %cur_diskstats = fetch_device_counters(); +# Fetch uptime to detect system reboot +my ($uptime) = fetch_uptime(); + # Weed out unwanted devices filter_device_list( %cur_diskstats ); @@ -67,6 +70,20 @@ # SUBS # ######## +# fetch_uptime +# +# read /proc/uptime and return it + +sub fetch_uptime { + open my $FH, "<", '/proc/uptime' or return undef; + my $line = <$FH>; + chomp($line); + my @row = split(/\s+/, $line); + close $FH; + + return @row; +} + # generate_multigraph_data # # Creates the data which is needed by munin's fetch command @@ -181,6 +198,17 @@ my $interval = time() - $prev_time; + if ($uptime < $interval) { + # system has rebooted + + $interval = $uptime; + + # all values will be zero at system reboot + for my $entry ( keys %$prev_stats ) { + $prev_stats->{$entry} = 0; + } + } + my $read_ios = subtract_wrapping_numbers($cur_stats->{'rd_ios'}, $prev_stats->{'rd_ios'}); my $write_ios = subtract_wrapping_numbers($cur_stats->{'wr_ios'}, $prev_stats->{'wr_ios'}); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.25/plugins/node.d.linux/if_.in new/munin-2.0.32/plugins/node.d.linux/if_.in --- old/munin-2.0.25/plugins/node.d.linux/if_.in 2014-11-24 22:46:24.000000000 +0100 +++ new/munin-2.0.32/plugins/node.d.linux/if_.in 2017-03-01 20:43:49.000000000 +0100 @@ -91,7 +91,7 @@ # iwlist first) if [[ -r /sys/class/net/$INTERFACE/speed ]]; then SPEED=$(cat /sys/class/net/$INTERFACE/speed 2>/dev/null) - if [[ -n "$SPEED" ]]; then + if [[ "$SPEED" -gt 0 ]]; then echo $SPEED return fi @@ -162,7 +162,7 @@ ;; suggest) if [[ -r /proc/net/dev ]]; then - sed -rne '/^[[:space:]]*(lo|sit[[:digit:]]+):/d;s,^[[:space:]]*([^:]+):.*,\1,p' /proc/net/dev + sed -rne '/^[[:space:]]*(lo|gre[[:digit:]]|sit[[:digit:]]+|[a-z0-9]+.[0-9]+):/d;s,^[[:space:]]*([^:]+):.*,\1,p' /proc/net/dev fi exit 0 ;; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.25/plugins/node.d.linux/if_err_.in new/munin-2.0.32/plugins/node.d.linux/if_err_.in --- old/munin-2.0.25/plugins/node.d.linux/if_err_.in 2014-11-24 22:46:24.000000000 +0100 +++ new/munin-2.0.32/plugins/node.d.linux/if_err_.in 2017-03-01 20:43:49.000000000 +0100 @@ -58,7 +58,7 @@ if [ "$1" = "suggest" ]; then if [ -r /proc/net/dev ]; then - sed -rne '/^[[:space:]]*(lo|sit[[:digit:]]+):/d;s,^[[:space:]]*([^:]+):.*,\1,p' /proc/net/dev + sed -rne '/^[[:space:]]*(lo|gre[[:digit:]]|sit[[:digit:]]+|[a-z0-9]+.[0-9]+):/d;s,^[[:space:]]*([^:]+):.*,\1,p' /proc/net/dev fi exit 0 fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.25/plugins/node.d.linux/meminfo.in new/munin-2.0.32/plugins/node.d.linux/meminfo.in --- old/munin-2.0.25/plugins/node.d.linux/meminfo.in 2014-11-24 22:46:24.000000000 +0100 +++ new/munin-2.0.32/plugins/node.d.linux/meminfo.in 2017-03-01 20:43:49.000000000 +0100 @@ -32,9 +32,9 @@ Summary `applicationName1` memory usage v ... - Summary application processes memory using Summary `applicationNameX` memory usage ^ - External fragmentztion: Buddyinfo - Buddyinfo/ Nodes and zones summary + External fragmentation: Buddyinfo - Buddyinfo/ Nodes and zones summary Node X, zone ZZZ - Chunks for each zone - External fragmentztion: Page type info - Page type info, summary node-zone-type pages + External fragmentation: Page type info - Page type info, summary node-zone-type pages Node X, zone ZZZ, type TTT - Free pages per node-zone-page by order Physical memory usage - Main graph, show phisical memory usage Active/Inactive memory - subj :) @@ -420,7 +420,7 @@ 'munin' => { 'args' => '--base 1000', - 'title' => 'External fragmentztion: Buddyinfo', + 'title' => 'External fragmentation: Buddyinfo', 'vtitle' => 'chunks', 'category' => 'memory', 'info' => 'External fragmentation is a problem under some workloads, and buddyinfo is a useful tool for helping diagnose these problems. Buddyinfo will give you a clue as to how big an area you can safely allocate, or why a previous allocation failed.', @@ -470,7 +470,7 @@ 'munin' => { 'args' => '--base 1000', - 'title' => 'External fragmentztion: Page type info', + 'title' => 'External fragmentation: Page type info', 'vtitle' => 'pages', 'info' => 'The pagetypinfo gives the same type of information as buddyinfo except broken down by migrate-type and finishes with details on how many page blocks of each type exist.', 'category' => 'memory'