Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package munin for openSUSE:Factory checked in at 2022-12-17 20:36:06 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/munin (Old) and /work/SRC/openSUSE:Factory/.munin.new.1835 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "munin" Sat Dec 17 20:36:06 2022 rev:27 rq:1043233 version:2.0.71 Changes: -------- --- /work/SRC/openSUSE:Factory/munin/munin.changes 2021-12-02 02:18:25.082038493 +0100 +++ /work/SRC/openSUSE:Factory/.munin.new.1835/munin.changes 2022-12-17 20:36:09.172475678 +0100 @@ -1,0 +2,39 @@ +Thu Dec 15 17:20:35 UTC 2022 - Carsten Ziepke <[email protected]> + +- Update to 2.0.71 + * fix the fix for Date::Manip +- Changes in 2.0.70 + * plugins/http_loadtime: enable saving cookies between requests + * UpdateWorker: prevent use of uninitialized value $first_epoch + * fix html_strategy to point to munin-cgi-html + * plugin fail2ban: allow configuration of warning/critical + thresholds + * Plugin haproxy_: handle backends with special characters + * [snmp__df_ram] Update title to match the memory plugin + * [snmp__cpuload] Update title to match the cpu plugin + * Plugin df_inode : Exclude msdosfs on FreeBSD as there's no + concept of inode + * Plugin bind9: stabilize order of values in graph + * Plugin bind9: Author's blog has moved to .no TLD + * Plugin bind9: Move 'Other' to bottom of list + * Update munin-graph.in + * Update munin-cgi-graph.in +- Run spec-cleaner +- Fix rpmlint warning: This script uses 'env' as an interpreter. + +------------------------------------------------------------------- +Mon Oct 24 11:04:04 UTC 2022 - Ludwig Nussel <[email protected]> + +- UsrMerge: move stuff from /sbin to /usr/sbin (boo#1191080) + +------------------------------------------------------------------- +Sun Feb 20 10:39:50 UTC 2022 - Wolfgang Rosenauer <[email protected]> + +- update to 2.0.69 + * bugfixes + * Handle NVME drives in the Linux iostat plugin + * munin-run: allow to pass additional arguments to the plugin + * use dedicated munin SNMP plugin +- require the www group (boo#1195732) + +------------------------------------------------------------------- Old: ---- munin-2.0.66.tar.gz munin-2.0.66.tar.gz.asc New: ---- munin-2.0.71.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ munin.spec ++++++ --- /var/tmp/diff_new_pack.Pcolhm/_old 2022-12-17 20:36:09.804479150 +0100 +++ /var/tmp/diff_new_pack.Pcolhm/_new 2022-12-17 20:36:09.804479150 +0100 @@ -1,7 +1,7 @@ # # spec file for package munin # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,19 +18,18 @@ %define htmldir /srv/www/htdocs/munin %define cgidir /srv/www/cgi-bin -%define dbdir /var/lib/munin -%define logdir /var/log/munin -%define plugindir /usr/lib/munin/plugins +%define dbdir %{_localstatedir}/lib/munin +%define logdir %{_localstatedir}/log/munin +%define plugindir %{_prefix}/lib/munin/plugins %define active_by_default 0 - Name: munin -Version: 2.0.66 +Version: 2.0.71 Release: 0 Summary: Network-wide graphing framework (grapher/gatherer) License: GPL-2.0-only Group: System/Monitoring -URL: http://munin-monitoring.org/ -Source0: http://downloads.munin-monitoring.org/%{name}/stable/%{version}/%{name}-%{version}.tar.gz +URL: https://munin-monitoring.org/ +Source0: https://codeload.github.com/munin-monitoring/munin/tar.gz/refs/tags/%{version}#/%{name}-%{version}.tar.gz Source1: Makefile.config Source2: munin-node.rc Source3: munin.cron.d @@ -48,22 +47,22 @@ Source13: gsa-munin.zip Source14: munin-cron.timer Source15: munin-cron.service -Source16: http://downloads.munin-monitoring.org/%{name}/stable/%{version}/%{name}-%{version}.tar.gz.asc +# Source16: http://downloads.munin-monitoring.org/%{name}/stable/%{version}/%{name}-%{version}.tar.gz.asc # 0x910846ADEE4C5D67C19B3E6F0A24C05998BA4133 Source17: munin.keyring Patch1: perl526.patch BuildRequires: firewall-macros BuildRequires: html2text +BuildRequires: htmldoc BuildRequires: perl-HTML-Template BuildRequires: perl-Log-Log4perl BuildRequires: perl-Net-SNMP BuildRequires: perl-Net-SSLeay BuildRequires: perl-Net-Server +BuildRequires: pkgconfig BuildRequires: shadow BuildRequires: unzip BuildRequires: perl(Module::Build) -%{?systemd_ordering} -BuildRequires: htmldoc BuildRequires: pkgconfig(systemd) Requires: perl-Date-Manip Requires: perl-FastCGI @@ -82,11 +81,11 @@ Requires: spawn-fcgi Requires: perl(Munin::Common::Defaults) Recommends: logrotate +BuildArch: noarch +%{?systemd_ordering} %if 0%{?suse_version} <= 1510 Recommends: cron %endif -BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildArch: noarch %description Munin is a highly flexible and powerful solution used to create graphs of @@ -101,14 +100,12 @@ Munin is written in Perl, and relies heavily on Tobi Oetiker's excellent RRDtool. - %package node Summary: Network-wide graphing framework (node) # 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 Requires: perl-Net-SNMP @@ -117,16 +114,18 @@ Requires: perl-base = %{perl_version} Requires: perl-libwww-perl Requires: ps -Requires: shadow -Requires: sysstat # manual requires from certain plugins using "env ..." Requires: python Requires: ruby -%{?systemd_ordering} +Requires: shadow +Requires: sysstat Requires(pre): group(nobody) +Requires(pre): group(www) Requires(pre): user(nobody) +Recommends: logdigest Recommends: logrotate BuildArch: noarch +%{?systemd_ordering} %description node Munin is a highly flexible and powerful solution used to create graphs of @@ -150,7 +149,6 @@ RRDtool. To see a real example of Munin in action, take a peek at <http://www.linpro.no/projects/munin/example/>. - %prep %setup -q cp %{SOURCE1} . @@ -166,16 +164,16 @@ %__mkdir_p %{buildroot}/%{_sysconfdir}/munin/plugins %__mkdir_p %{buildroot}/%{_sysconfdir}/munin/munin-conf.d -%__mkdir_p %{buildroot}/etc/logrotate.d +%__mkdir_p %{buildroot}%{_sysconfdir}/logrotate.d %__install -m0644 %{SOURCE4} %{buildroot}/%{_sysconfdir}/logrotate.d/munin %__install -m0644 %{SOURCE5} %{buildroot}/%{_sysconfdir}/logrotate.d/munin-node %__install -m0644 %{SOURCE7} %{buildroot}/%{_sysconfdir}/munin/plugin-conf.d/munin-node -%__mkdir_p %{buildroot}/sbin -%__ln_s /sbin/service $RPM_BUILD_ROOT/sbin/rcmunin-node -%__ln_s /sbin/service $RPM_BUILD_ROOT/sbin/rcmunin-cgi-graph -%__ln_s /sbin/service $RPM_BUILD_ROOT/sbin/rcmunin-cgi-html +%__mkdir_p %{buildroot}%{_sbindir} +%__ln_s service %{buildroot}%{_sbindir}/rcmunin-node +%__ln_s service %{buildroot}%{_sbindir}/rcmunin-cgi-graph +%__ln_s service %{buildroot}%{_sbindir}/rcmunin-cgi-html %__mkdir_p %{buildroot}/%{_prefix}/lib/tmpfiles.d %__install -m0644 %{SOURCE8} %{buildroot}/%{_prefix}/lib/tmpfiles.d/munin.conf @@ -203,15 +201,25 @@ %__install -m0755 munin-gsa-master/snmp_* %{buildroot}/%{plugindir} ln munin-gsa-master/README.md README.gsa +# Fix rpmlint warning: This script uses 'env' as an interpreter. +for F in \ + %{buildroot}/%{_prefix}/lib/munin/plugins/ipmi_sensor_ \ + %{buildroot}/%{_prefix}/lib/munin/plugins/smart_ \ + ; do + sed -i -e 's|^#!%{_bindir}/env python|#!%{_bindir}/python|' $F +done +for F in \ + %{buildroot}/%{_prefix}/lib/munin/plugins/tomcat_ \ + ; do + sed -i -e 's|^#!%{_bindir}/env ruby|#!%{_bindir}/ruby|' $F +done + # firewalld install -D -m 644 %{SOURCE6} %{buildroot}%{_prefix}/lib/firewalld/services/munin-node.xml -%clean -%{__rm} -rf %{buildroot} - %pre -getent group munin >/dev/null || /usr/sbin/groupadd -r munin -getent passwd munin > /dev/null || /usr/sbin/useradd -r -c "munin monitoring" -d %{dbdir} -g munin munin +getent group munin >/dev/null || %{_sbindir}/groupadd -r munin +getent passwd munin > /dev/null || %{_sbindir}/useradd -r -c "munin monitoring" -d %{dbdir} -g munin munin %service_add_pre munin-cgi-graph.service %service_add_pre munin-cgi-html.service %if 0%{?suse_version} > 1510 @@ -257,13 +265,13 @@ ## Node %pre node -getent group munin >/dev/null || /usr/sbin/groupadd -r munin -getent passwd munin > /dev/null || /usr/sbin/useradd -r -c "munin monitoring" -d %{dbdir} -g munin munin +getent group munin >/dev/null || %{_sbindir}/groupadd -r munin +getent passwd munin > /dev/null || %{_sbindir}/useradd -r -c "munin monitoring" -d %{dbdir} -g munin munin %service_add_pre munin-node.service %post node if [ $1 = 1 ]; then -/usr/sbin/munin-node-configure --shell | sh +%{_sbindir}/munin-node-configure --shell | sh fi chown -R munin:munin %{dbdir} chmod 755 %{dbdir} @@ -282,7 +290,6 @@ %service_del_postun munin-node.service %files -%defattr(-, root, root) %license COPYING %doc ChangeLog README UPGRADING %{_bindir}/munin-check @@ -302,8 +309,8 @@ %{_prefix}/lib/tmpfiles.d/munin.conf %{_unitdir}/munin-cgi-graph.service %{_unitdir}/munin-cgi-html.service -/sbin/rcmunin-cgi-graph -/sbin/rcmunin-cgi-html +%{_sbindir}/rcmunin-cgi-graph +%{_sbindir}/rcmunin-cgi-html %if 0%{?suse_version} > 1510 %{_unitdir}/munin-cron.* %else @@ -350,21 +357,20 @@ %{_mandir}/man3/Munin::Master::UpdateWorker.3pm.gz %{_mandir}/man3/Munin::Master::Utils.3pm.gz %{_mandir}/man3/Munin::Master::Worker.3pm.gz -%{_mandir}/man5/munin-node.conf.5.gz -%{_mandir}/man5/munin.conf.5.gz -%{_mandir}/man8/munin-check.8.gz -%{_mandir}/man8/munin-cron.8.gz -%{_mandir}/man8/munin-graph.8.gz -%{_mandir}/man8/munin-html.8.gz -%{_mandir}/man8/munin-limits.8.gz -%{_mandir}/man8/munin-update.8.gz -%{_mandir}/man8/munin.8.gz +%{_mandir}/man5/munin-node.conf.5%{?ext_man} +%{_mandir}/man5/munin.conf.5%{?ext_man} +%{_mandir}/man8/munin-check.8%{?ext_man} +%{_mandir}/man8/munin-cron.8%{?ext_man} +%{_mandir}/man8/munin-graph.8%{?ext_man} +%{_mandir}/man8/munin-html.8%{?ext_man} +%{_mandir}/man8/munin-limits.8%{?ext_man} +%{_mandir}/man8/munin-update.8%{?ext_man} +%{_mandir}/man8/munin.8%{?ext_man} %attr(0750, munin, munin) %dir %{logdir} %attr(0755, munin, munin) %dir %{dbdir} %ghost /run/munin %files node -%defattr(-, root, root) %doc README.nginx README.gsa %{_sbindir}/munin-run %{_sbindir}/munin-node @@ -376,7 +382,7 @@ %{_prefix}/lib/munin/munin-async %{_prefix}/lib/munin/munin-asyncd %{_prefix}/lib/munin/plugins/ -/sbin/rcmunin-node +%{_sbindir}/rcmunin-node %dir %{_sysconfdir}/munin/plugin-conf.d %dir %{_sysconfdir}/munin/plugins %config(noreplace) %{_sysconfdir}/munin/plugin-conf.d/munin-node @@ -413,11 +419,11 @@ %dir %{perl_vendorlib}/Munin/Plugin %{perl_vendorlib}/Munin/Plugin/Pgsql.pm %{perl_vendorlib}/Munin/Plugin/SNMP.pm -%{_mandir}/man1/munin-node-configure.1.gz -%{_mandir}/man1/munin-node.1.gz -%{_mandir}/man1/munin-run.1.gz -%{_mandir}/man1/munindoc.1.gz -%{_mandir}/man1/munin-get.1.gz +%{_mandir}/man1/munin-node-configure.1%{?ext_man} +%{_mandir}/man1/munin-node.1%{?ext_man} +%{_mandir}/man1/munin-run.1%{?ext_man} +%{_mandir}/man1/munindoc.1%{?ext_man} +%{_mandir}/man1/munin-get.1%{?ext_man} %{_mandir}/man3/Munin::Common::Config.3pm.gz %{_mandir}/man3/Munin::Common::Daemon.3pm.gz %{_mandir}/man3/Munin::Common::Defaults.3pm.gz ++++++ munin-2.0.66.tar.gz -> munin-2.0.71.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/ChangeLog new/munin-2.0.71/ChangeLog --- old/munin-2.0.66/ChangeLog 2021-01-06 21:16:52.000000000 +0100 +++ new/munin-2.0.71/ChangeLog 2022-09-19 09:13:00.000000000 +0200 @@ -1,5 +1,149 @@ -*- text -*- +munin-2.0.71, 2022-09-19 +------- +Summary +------- + +Bugfix release. + +------------------ +Detailed Changelog +------------------ + +Steve Schnepp (1): + fix the fix for Date::Manip + + +munin-2.0.70, 2022-09-11 +------- +Summary +------- + +Bugfix release. + +------------------ +Detailed Changelog +------------------ + +Andreas Perhab (3): + plugins/http_loadtime: enable saving cookies between requests + UpdateWorker: prevent use of uninitialized value $first_epoch + fix html_strategy to point to munin-cgi-html + +Lars Kruse (2): + plugin fail2ban: allow configuration of warning/critical thresholds + Plugin haproxy_: handle backends with special characters + +Olivier Mehani (2): + [snmp__df_ram] Update title to match the memory plugin + [snmp__cpuload] Update title to match the cpu plugin + +Pierre-Alain TORET (1): + Plugin df_inode : Exclude msdosfs on FreeBSD as there's no concept of inode + +Sandro (3): + Plugin bind9: stabilize order of values in graph + Plugin bind9: Author's blog has moved to .no TLD + Plugin bind9: Move 'Other' to bottom of list + +Steve Schnepp (2): + Update munin-graph.in + Update munin-cgi-graph.in + + +munin-2.0.69, 2021-11-22 +------- +Summary +------- + +Bugfix release. + +------------------ +Detailed Changelog +------------------ + +Andreas Perhab (1): + +Lars Kruse (1): + Fix loading of "local_address" configuration + + +munin-2.0.68, 2021-11-14 +------- +Summary +------- + +Bugfix release. + +------------------ +Detailed Changelog +------------------ + +Andreas Perhab (1): + plugins/postgres_: enable configuring warning/critical + +Christoph Moench-Tegeder (2): + postgres_querylength: catch real statements only + ntp_: do not mask required variable from Net::IP + +Guillaume Rousse (2): + display locally-defined tresholds + use dedicated munin SNMP plugin + +Kim B. Heino (2): + plugins/mailman: add missing "graph_category" header + plugins/postfix_mailqueue: don't run postconf if spooldir-override is defined + +Lars Kruse (11): + Remove obsolete links to old bug tracker ("trac") + Fix typo + plugin.sh: remove conversation log regarding shell redirects + Remove old "authors" file + Fix typos + munin-asyncd: use configured update rate if undefined + Munin::Master::Node: unify configuration access + munin-run: allow to pass additional arguments to the plugin (#1419) + Fix homepage link + fix(postgres_querylength_): fix wrong PostgreSQL version (for 9.4) + docs: remove stale content from release checklist + +Sven Edge (1): + Handle NVME drives in the Linux iostat plugin (2.0 branch) + +Ville Skyttä (1): + Use `grep -E/-F` instead of `egrep` and `fgrep` + +wferi (1): + Use the host-specific local_address configuration if present + + +munin-2.0.67, 2021-02-22 +------- +Summary +------- + +Bugfix release. + +------------------ +Detailed Changelog +------------------ + +Lars Kruse (7): + +Lars Kruse (7): + Template "overview": add missing closing "li" and unify indentation + CDEF handling: fix access to "negative" field metadata + CDEF handling: fix translation of fieldnames to RRD field names + CDEF handling: fix access to "negative" field with long name or starting with a digit + master: tolerate fields without content in "info" + Plugin hddtemp_smartctl: avoid misinterpretation of serial numbers as partitions + Plugin memcached_: implement suggest and improve autoconf + +Wiebe Cazemier (1): + Make netstat human and high connection friendly + + munin-2.0.66, 2021-01-06 ------- Summary diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/Checklist new/munin-2.0.71/Checklist --- old/munin-2.0.66/Checklist 2021-01-06 21:16:52.000000000 +0100 +++ new/munin-2.0.71/Checklist 2022-09-19 09:13:00.000000000 +0200 @@ -1,27 +1,3 @@ -This is a pre-release checklist for the maintainer. - - * is there any "FIX" in: ChangeLog, INSTALL, Announce? - - * Is .htaccess installed? - * rm -f /etc/munin/plugins/* - Does munin-node-configure -d show any autoconf errors? - Does munin-node-configure --debug run nicely or do we get perl errors? - - * Update plugins/plugins.history.in: - - 1. cd plugins - - 2. Figure out which r the previous tag was at and do this (r910 was - 1.3.2 and r1234 is head) - svn --verbose log -r910:1234 | fgrep node.d | grep -w A | - cut -d/ -f 4- | sed 's/^node\.d\.//' - - 3. Check if the listed plugins are still present (or moved): - - svn --verbose log -r910:1234 | fgrep node.d | grep -w A | - cut -d/ -f 4- | sed s'/(.*//' | xargs ls -ld >/dev/null - - # Git release The tag used here is "2.0.1", exchange this with a current version. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/Makefile new/munin-2.0.71/Makefile --- old/munin-2.0.66/Makefile 2021-01-06 21:16:52.000000000 +0100 +++ new/munin-2.0.71/Makefile 2022-09-19 09:13:00.000000000 +0200 @@ -86,7 +86,7 @@ tags: -rm -f TAGS - find master common -type f | egrep -v '/(build/|_build/|blib/|\.svn/)' | grep -v '\.t$$' | fgrep -v '~' | xargs etags -l perl -a + find master common -type f | grep -Ev '/(build/|_build/|blib/|\.svn/)' | grep -v '\.t$$' | grep -Fv '~' | xargs etags -l perl -a ###################################################################### @@ -526,7 +526,7 @@ build-common: build-common-defaults-stamp # BUG: the Build script writes files under PWD when it does "install" -# can't seem to find a way to persuade it to write otherwhere. +# can't seem to find a way to persuade it to write elsewhere. install-%: %/Build cd $* && $(PERL) Build install \ --install_path lib=$(PERLLIB) \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/RELEASE new/munin-2.0.71/RELEASE --- old/munin-2.0.66/RELEASE 2021-01-06 22:23:29.000000000 +0100 +++ new/munin-2.0.71/RELEASE 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -2.0.66 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/UPGRADING-1.4 new/munin-2.0.71/UPGRADING-1.4 --- old/munin-2.0.66/UPGRADING-1.4 2021-01-06 21:16:52.000000000 +0100 +++ new/munin-2.0.71/UPGRADING-1.4 2022-09-19 09:13:00.000000000 +0200 @@ -95,10 +95,10 @@ Too audit the differences in warning and critical levels you can make a copy of the munin file called "datafile" before upgrading (or get -one from backup), and use egrep to get a listing of the settings prior +one from backup), and use grep -E to get a listing of the settings prior to update: - egrep '(warning|critical)' datafile.old + grep -E '(warning|critical)' datafile.old and again on the post-upgrade datafile to compare the lists so you can specify the ones you need. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/authors new/munin-2.0.71/authors --- old/munin-2.0.66/authors 2021-01-06 21:16:52.000000000 +0100 +++ new/munin-2.0.71/authors 1970-01-01 01:00:00.000000000 +0100 @@ -1,41 +0,0 @@ -agx = Guido Guenther <[email protected]> -arhont = Andrei Mikhailovsky <[email protected]> -auduny = Audun Ytterdal <[email protected]> -ay = Audun Ytterdal <[email protected]> -bjorn = Bjørn Ruberg <[email protected]> -bldewolf = Brian De Wolf <[email protected]> -feiner.tom = Tom Feiner <[email protected]> -haraldk = Harald Korneliussen <[email protected]> -holger = Holger Levsen <[email protected]> -ilmari = Dagfin Ilmari MansÃ¥ker <[email protected]> -ingvar = Ingvar Hagelund <[email protected]> -janl = Nicolai Langfeldt <[email protected]> -jimmyo = Jimmy Olsen <[email protected]> -jo = Jimmy Olsen <[email protected]> -joar = Joar Jegleim <[email protected]> -jorne = Jorne Kandziora <[email protected]> -kenyon = Kenyon Ralph <[email protected]> -kjellm = Kjell-Magne Ãierud <[email protected]> -kjetilho = Kjetil Torgrim Homme <[email protected]> -knan = Erik I. Bolsø <[email protected]> -knuthaug = Knut Haugen <[email protected]> -kristian = Kristian Lyngstøl <[email protected]> -ligne = Matthew Boyle <[email protected]> -lkoberstein = Luke Koberstein <[email protected]> -loic = Loic Dachary (OuoU) <[email protected]> -lupe = Lupe Christoph <[email protected]> -matthias = Matthias Schmitz <[email protected]> -mha = Magnus Hagander <[email protected]> -niemann = Philipp Niemann <[email protected]> -qha = Ulrik Haugen <[email protected]> -runesk = Rune Nordbøe Skillingstad <[email protected]> -ssm = Stig Sandbeck Mathisen <[email protected]> -stabidlo = Rado Rovny <[email protected]> -steve.schnepp = Steve Schnepp <[email protected]> -tatjana = Tatjana Anderson <[email protected]> -tfheen = Tollef Fog Heen <[email protected]> -tore = Tore Anderson <[email protected]> -toreanderson = Tore Anderson <[email protected]> -tv = Trygve Vea <[email protected]> -zugschlus = Marc Haber <[email protected]> -(no author) = Automatic Commit <[email protected]> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/doc/reference/munin.conf.rst new/munin-2.0.71/doc/reference/munin.conf.rst --- old/munin-2.0.66/doc/reference/munin.conf.rst 2021-01-06 21:16:52.000000000 +0100 +++ new/munin-2.0.71/doc/reference/munin.conf.rst 2022-09-19 09:13:00.000000000 +0200 @@ -99,7 +99,7 @@ If set to "cgi", :ref:`munin-html` will do nothing. To generate html pages you must configure a web server to run - :ref:`munin-cgi-graph` instead. + :ref:`munin-cgi-html` instead. .. option:: ssh_command <command> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/master/_bin/munin-cgi-graph.in new/munin-2.0.71/master/_bin/munin-cgi-graph.in --- old/munin-2.0.66/master/_bin/munin-cgi-graph.in 2021-01-06 21:16:52.000000000 +0100 +++ new/munin-2.0.71/master/_bin/munin-cgi-graph.in 2022-09-19 09:13:00.000000000 +0200 @@ -25,11 +25,7 @@ use strict; use warnings; use IO::Handle; -BEGIN { - no warnings; - $Date::Manip::Backend = 'DM5'; -} -use Date::Manip; +use Date::Manip; # Using UnixDate() & ParseDateString() use POSIX qw(strftime locale_h); use CGI::Fast qw(:cgi); use CGI::Carp qw(fatalsToBrowser); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/master/_bin/munin-graph.in new/munin-2.0.71/master/_bin/munin-graph.in --- old/munin-2.0.66/master/_bin/munin-graph.in 2021-01-06 21:16:52.000000000 +0100 +++ new/munin-2.0.71/master/_bin/munin-graph.in 2022-09-19 09:13:00.000000000 +0200 @@ -32,16 +32,7 @@ use warnings; use IO::Handle; -BEGIN { - # This is needed because Date::Manip has deprecated the functional - # interface in >= 6.x. So, we force the use of the 5.x API. - $Date::Manip::Backend = 'DM5'; - - # Double line here to avoid spurious warnings about D::M::Backend being - # used only once. - $Date::Manip::Backend = 'DM5'; -} -use Date::Manip; +use Date::Manip; # Using UnixDate() & ParseDateString() use POSIX qw(strftime); use Time::HiRes qw(gettimeofday tv_interval); use IO::File; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/master/lib/Munin/Master/GraphOld.pm new/munin-2.0.71/master/lib/Munin/Master/GraphOld.pm --- old/munin-2.0.66/master/lib/Munin/Master/GraphOld.pm 2021-01-06 21:16:52.000000000 +0100 +++ new/munin-2.0.71/master/lib/Munin/Master/GraphOld.pm 2022-09-19 09:13:00.000000000 +0200 @@ -876,6 +876,16 @@ return @ret; } +sub _sanitise_fieldname { + # http://munin-monitoring.org/wiki/notes_on_datasource_names + my ($name) = @_; + + $name =~ s/^[^A-Za-z_]/_/; + $name =~ s/[^A-Za-z0-9_]/_/g; + + return $name; +} + sub process_service { my ($service) = @_; @@ -1135,7 +1145,7 @@ if ($has_negative) { my $negfieldname = orig_to_cdef($service, munin_get($field, "negative")); - my $negfield = $service->{$negfieldname}; + my $negfield = $service->{_sanitise_fieldname(munin_get($field, "negative"))}; if (my $tmpneg = munin_get($negfield, "realname")) { $negfieldname = $tmpneg; $negfield = $service->{$negfieldname}; @@ -1696,13 +1706,21 @@ sub orig_to_cdef { my $service = shift; my $fieldname = shift; + my $original_fieldname = shift || $fieldname; return unless ref($service) eq "HASH"; if (defined $service->{$fieldname} && defined $service->{$fieldname}->{"cdef_name"}) { - return orig_to_cdef($service, $service->{$fieldname}->{"cdef_name"}); + return orig_to_cdef($service, $service->{$fieldname}->{"cdef_name"}, $original_fieldname); + } + # For unknown reasons the sanitizing of fieldnames in the context of RRD field names is not + # applied consistently (maybe it should not be applied at all). + # Thus we need to apply it here in the same way, as it seems to be applied at other places. + if (_sanitise_fieldname($original_fieldname) ne $original_fieldname) { + return get_field_name(_sanitise_fieldname($fieldname)); + } else { + return get_field_name($fieldname); } - return $fieldname; } sub reset_cdef { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/master/lib/Munin/Master/Node.pm new/munin-2.0.71/master/lib/Munin/Master/Node.pm --- old/munin-2.0.66/master/lib/Munin/Master/Node.pm 2021-01-06 21:16:52.000000000 +0100 +++ new/munin-2.0.71/master/lib/Munin/Master/Node.pm 2022-09-19 09:13:00.000000000 +0200 @@ -85,7 +85,7 @@ $self->{reader} = $self->{writer} = IO::Socket::INET6->new( PeerAddr => $uri->host, PeerPort => $self->{port} || 4949, - LocalAddr => $config->{local_address}, + LocalAddr => $self->_get_node_or_global_setting("local_address"), Proto => 'tcp', MultiHomed => 1, Timeout => $config->{timeout} @@ -239,16 +239,12 @@ my ($self) = @_; # Check for one on this node- if not, use the global one - my $use_node_name = defined($self->{configref}{use_node_name}) - ? $self->{configref}{use_node_name} - : $config->{use_node_name}; + my $use_node_name = $self->_get_node_or_global_setting("use_node_name"); my $host = $use_node_name ? $self->{node_name} : $self->{host}; - my $use_default_node = defined($self->{configref}{use_default_node}) - ? $self->{configref}{use_default_node} - : $config->{use_default_node}; + my $use_default_node = $self->_get_node_or_global_setting("use_default_node"); if (! $use_default_node && ! $host) { die "[ERROR] Couldn't find out which host to list on $host.\n"; @@ -394,6 +390,14 @@ DEBUG "[CONFIG dataseries $plugin] $service->$ds_name.$ds_var = $ds_val" if $debug; push ( @graph_order, $ds_name ) if $ds_var eq 'label'; } + elsif ($line =~ m{\A ([^\.]+)\.([^\s]+) \s* $}xms) { + # the field value is empty - ignore it + # see https://github.com/munin-monitoring/contrib/issues/1156#issuecomment-746884950 + # For example the meminfo "slab_size" graph may contain empty fields. These should not + # end up as log noise, but can be safely ignored instead. + $correct++; + DEBUG "[DEBUG] Ignoring field without value ('$line') from $plugin on $nodedesignation.\n"; + } else { $errors++; DEBUG "[DEBUG] Protocol exception: unrecognized line '$line' from $plugin on $nodedesignation.\n"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/master/lib/Munin/Master/UpdateWorker.pm new/munin-2.0.71/master/lib/Munin/Master/UpdateWorker.pm --- old/munin-2.0.66/master/lib/Munin/Master/UpdateWorker.pm 2021-01-06 21:16:52.000000000 +0100 +++ new/munin-2.0.71/master/lib/Munin/Master/UpdateWorker.pm 2022-09-19 09:13:00.000000000 +0200 @@ -251,7 +251,7 @@ } if ($EVAL_ERROR =~ m/^NO_SPOOLFETCH_DATA /) { - INFO "[INFO] No spoofetch data for $nodedesignation"; + INFO "[INFO] No spoolfetch data for $nodedesignation"; return; } elsif ($EVAL_ERROR) { ERROR "[ERROR] Error in node communication with $nodedesignation: " @@ -626,7 +626,7 @@ DEBUG "[DEBUG] asking for a rrd of size : " . $ds_config->{graph_data_size}; # Avoid autovivification (for multigraphs) - my $first_epoch = (defined($service_data) and defined($service_data->{$ds_name})) ? ($service_data->{$ds_name}->{when}->[0]) : 0; + my $first_epoch = (defined($service_data) and defined($service_data->{$ds_name}) and $service_data->{$ds_name}->{when}) ? ($service_data->{$ds_name}->{when}->[0]) : 0; my $rrd_file = $self->_create_rrd_file_if_needed($service, $ds_name, $ds_config, $first_epoch); if (defined($service_data) and defined($service_data->{$ds_name})) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/master/www/munin-overview.tmpl new/munin-2.0.71/master/www/munin-overview.tmpl --- old/munin-2.0.66/master/www/munin-overview.tmpl 2021-01-06 21:16:52.000000000 +0100 +++ new/munin-2.0.71/master/www/munin-overview.tmpl 2022-09-19 09:13:00.000000000 +0200 @@ -1,73 +1,115 @@ <TMPL_INCLUDE NAME="partial/head.tmpl"><!-- -*- HTML -*- --> <body> - <div id="header"> - <h1><a href="<TMPL_VAR NAME="R_PATH">"><span class="logo"></span></a> <span class="currentpage">Overview</span></h1> - </div> - <div id="main"> - <TMPL_INCLUDE NAME="partial/navigation.tmpl"> - <div id="content"> - <h2>Overview</h2> - <TMPL_IF NAME="GROUPS"> - <ul class="groupview"> - <TMPL_LOOP NAME="GROUPS"><TMPL_UNLESS NAME="MULTIGRAPH"> - <li <TMPL_IF NAME="__LAST__">class="last"</TMPL_IF>> - <TMPL_IF NAME="NCATEGORIES"><span class="host"><TMPL_ELSE><span class="domain"></TMPL_IF><a href="<TMPL_VAR NAME="URL">"><TMPL_VAR ESCAPE="HTML" NAME="NAME"></a></span> - <TMPL_IF NAME="COMPARE"> :: [ - <a href="<TMPL_VAR NAME="R_PATH">/<TMPL_LOOP NAME="PATH"><TMPL_IF NAME="pathname"><TMPL_VAR ESCAPE="URL" NAME="PATHNAME">/</TMPL_IF></TMPL_LOOP>comparison-day.html">day</a> - <a href="<TMPL_VAR NAME="R_PATH">/<TMPL_LOOP NAME="PATH"><TMPL_IF NAME="pathname"><TMPL_VAR ESCAPE="URL" NAME="PATHNAME">/</TMPL_IF></TMPL_LOOP>comparison-week.html">week</a> - <a href="<TMPL_VAR NAME="R_PATH">/<TMPL_LOOP NAME="PATH"><TMPL_IF NAME="pathname"><TMPL_VAR ESCAPE="URL" NAME="PATHNAME">/</TMPL_IF></TMPL_LOOP>comparison-month.html">month</a> - <a href="<TMPL_VAR NAME="R_PATH">/<TMPL_LOOP NAME="PATH"><TMPL_IF NAME="pathname"><TMPL_VAR ESCAPE="URL" NAME="PATHNAME">/</TMPL_IF></TMPL_LOOP>comparison-year.html">year</a> ]</TMPL_IF> - <TMPL_IF NAME="NCATEGORIES">[ <TMPL_LOOP NAME="CATEGORIES"> - <a <TMPL_IF NAME="STATE_WARNING">class="warn"</TMPL_IF> <TMPL_IF NAME="STATE_CRITICAL">class="crit"</TMPL_IF> href="<TMPL_VAR NAME="URL">"><TMPL_VAR ESCAPE="HTML" NAME="NAME"></a></TMPL_LOOP> ]</TMPL_IF> - <ul> - <TMPL_LOOP NAME="GROUPS"><TMPL_UNLESS NAME="MULTIGRAPH"> - <li <TMPL_IF NAME="__LAST__">class="last"</TMPL_IF>> - <TMPL_IF NAME="NCATEGORIES"><span class="host"><TMPL_ELSE><span class="domain"></TMPL_IF><a href="<TMPL_VAR NAME="URL">"><TMPL_VAR ESCAPE="HTML" NAME="NAME"></a></span> - <TMPL_IF NAME="COMPARE"> :: [ - <a href="<TMPL_VAR NAME="R_PATH">/<TMPL_LOOP NAME="PATH"><TMPL_IF NAME="pathname"><TMPL_VAR ESCAPE="URL" NAME="PATHNAME">/</TMPL_IF></TMPL_LOOP>comparison-day.html">day</a> - <a href="<TMPL_VAR NAME="R_PATH">/<TMPL_LOOP NAME="PATH"><TMPL_IF NAME="pathname"><TMPL_VAR ESCAPE="URL" NAME="PATHNAME">/</TMPL_IF></TMPL_LOOP>comparison-week.html">week</a> - <a href="<TMPL_VAR NAME="R_PATH">/<TMPL_LOOP NAME="PATH"><TMPL_IF NAME="pathname"><TMPL_VAR ESCAPE="URL" NAME="PATHNAME">/</TMPL_IF></TMPL_LOOP>comparison-month.html">month</a> - <a href="<TMPL_VAR NAME="R_PATH">/<TMPL_LOOP NAME="PATH"><TMPL_IF NAME="pathname"><TMPL_VAR ESCAPE="URL" NAME="PATHNAME">/</TMPL_IF></TMPL_LOOP>comparison-year.html">year</a> ]</TMPL_IF> - <TMPL_IF NAME="NCATEGORIES">[ <TMPL_LOOP NAME="CATEGORIES"> - <a <TMPL_IF NAME="STATE_WARNING">class="warn"</TMPL_IF> <TMPL_IF NAME="STATE_CRITICAL">class="crit"</TMPL_IF> href="<TMPL_VAR NAME="URL">"><TMPL_VAR ESCAPE="HTML" NAME="NAME"></a> </TMPL_LOOP>]</TMPL_IF> - <ul> - <TMPL_LOOP NAME="GROUPS"><TMPL_UNLESS NAME="MULTIGRAPH"> - <li <TMPL_IF NAME="__LAST__">class="last"</TMPL_IF>> - <TMPL_IF NAME="NCATEGORIES"><span class="host"><TMPL_ELSE><span class="domain"></TMPL_IF><a href="<TMPL_VAR NAME="URL">"><TMPL_VAR ESCAPE="HTML" NAME="NAME"></a></span> - <TMPL_IF NAME="COMPARE"> :: [ - <a href="<TMPL_VAR NAME="R_PATH">/<TMPL_LOOP NAME="PATH"><TMPL_IF NAME="pathname"><TMPL_VAR ESCAPE="URL" NAME="PATHNAME">/</TMPL_IF></TMPL_LOOP>comparison-day.html">day</a> - <a href="<TMPL_VAR NAME="R_PATH">/<TMPL_LOOP NAME="PATH"><TMPL_IF NAME="pathname"><TMPL_VAR ESCAPE="URL" NAME="PATHNAME">/</TMPL_IF></TMPL_LOOP>comparison-week.html">week</a> - <a href="<TMPL_VAR NAME="R_PATH">/<TMPL_LOOP NAME="PATH"><TMPL_IF NAME="pathname"><TMPL_VAR ESCAPE="URL" NAME="PATHNAME">/</TMPL_IF></TMPL_LOOP>comparison-month.html">month</a> - <a href="<TMPL_VAR NAME="R_PATH">/<TMPL_LOOP NAME="PATH"><TMPL_IF NAME="pathname"><TMPL_VAR ESCAPE="URL" NAME="PATHNAME">/</TMPL_IF></TMPL_LOOP>comparison-year.html">year</a> ]</TMPL_IF> - <TMPL_IF NAME="NCATEGORIES">[ <TMPL_LOOP NAME="CATEGORIES"> - <a <TMPL_IF NAME="STATE_WARNING">class="warn"</TMPL_IF> <TMPL_IF NAME="STATE_CRITICAL">class="crit"</TMPL_IF> href="<TMPL_VAR NAME="URL">"><TMPL_VAR ESCAPE="HTML" NAME="NAME"></a> </TMPL_LOOP>]</TMPL_IF> - <ul> - <TMPL_LOOP NAME="GROUPS"><TMPL_UNLESS NAME="MULTIGRAPH"> - <li <TMPL_IF NAME="__LAST__">class="last"</TMPL_IF>> - <TMPL_IF NAME="NCATEGORIES"><span class="host"><TMPL_ELSE><span class="domain"></TMPL_IF><a href="<TMPL_VAR NAME="URL">"><TMPL_VAR ESCAPE="HTML" NAME="NAME"></a></span> - <TMPL_IF NAME="COMPARE"> :: [ - <a href="<TMPL_VAR NAME="R_PATH">/<TMPL_LOOP NAME="PATH"><TMPL_IF NAME="pathname"><TMPL_VAR ESCAPE="URL" NAME="PATHNAME">/</TMPL_IF></TMPL_LOOP>comparison-day.html">day</a> - <a href="<TMPL_VAR NAME="R_PATH">/<TMPL_LOOP NAME="PATH"><TMPL_IF NAME="pathname"><TMPL_VAR ESCAPE="URL" NAME="PATHNAME">/</TMPL_IF></TMPL_LOOP>comparison-week.html">week</a> - <a href="<TMPL_VAR NAME="R_PATH">/<TMPL_LOOP NAME="PATH"><TMPL_IF NAME="pathname"><TMPL_VAR ESCAPE="URL" NAME="PATHNAME">/</TMPL_IF></TMPL_LOOP>comparison-month.html">month</a> - <a href="<TMPL_VAR NAME="R_PATH">/<TMPL_LOOP NAME="PATH"><TMPL_IF NAME="pathname"><TMPL_VAR ESCAPE="URL" NAME="PATHNAME">/</TMPL_IF></TMPL_LOOP>comparison-year.html">year</a> ]</TMPL_IF> - <TMPL_IF NAME="NCATEGORIES">[ <TMPL_LOOP NAME="CATEGORIES"> - <a <TMPL_IF NAME="STATE_WARNING">class="warn"</TMPL_IF> <TMPL_IF NAME="STATE_CRITICAL">class="crit"</TMPL_IF> href="<TMPL_VAR NAME="URL">"><TMPL_VAR ESCAPE="HTML" NAME="NAME"></a></TMPL_LOOP> ]</TMPL_IF> - </TMPL_UNLESS></TMPL_LOOP> - </ul> - </TMPL_UNLESS></TMPL_LOOP> - </ul> - </li> - </TMPL_UNLESS></TMPL_LOOP> - </ul> - </li> - </TMPL_UNLESS></TMPL_LOOP> - </ul> - <TMPL_ELSE> - Warning: no hosts were configured for data collection. See the <a href="http://guide.munin-monitoring.org/en/latest/installation/configuration.html#add-some-nodes">Munin Guide</a> for details. - </TMPL_IF> - <div class="contentpusher"></div> - </div> - </div> - <TMPL_INCLUDE NAME="partial/footer.tmpl"> + <div id="header"> + <h1><a href="<TMPL_VAR NAME="R_PATH">"><span class="logo"></span></a> <span class="currentpage">Overview</span></h1> + </div> + <div id="main"> + <TMPL_INCLUDE NAME="partial/navigation.tmpl"> + <div id="content"> + <h2>Overview</h2> + <TMPL_IF NAME="GROUPS"> + <ul class="groupview"> + <TMPL_LOOP NAME="GROUPS"> + <TMPL_UNLESS NAME="MULTIGRAPH"> + <li <TMPL_IF NAME="__LAST__">class="last"</TMPL_IF>> + <TMPL_IF NAME="NCATEGORIES"><span class="host"><TMPL_ELSE><span class="domain"></TMPL_IF><a href="<TMPL_VAR NAME="URL">"><TMPL_VAR ESCAPE="HTML" NAME="NAME"></a></span> + <TMPL_IF NAME="COMPARE"> + :: [ + <a href="<TMPL_VAR NAME="R_PATH">/<TMPL_LOOP NAME="PATH"><TMPL_IF NAME="pathname"><TMPL_VAR ESCAPE="URL" NAME="PATHNAME">/</TMPL_IF></TMPL_LOOP>comparison-day.html">day</a> + <a href="<TMPL_VAR NAME="R_PATH">/<TMPL_LOOP NAME="PATH"><TMPL_IF NAME="pathname"><TMPL_VAR ESCAPE="URL" NAME="PATHNAME">/</TMPL_IF></TMPL_LOOP>comparison-week.html">week</a> + <a href="<TMPL_VAR NAME="R_PATH">/<TMPL_LOOP NAME="PATH"><TMPL_IF NAME="pathname"><TMPL_VAR ESCAPE="URL" NAME="PATHNAME">/</TMPL_IF></TMPL_LOOP>comparison-month.html">month</a> + <a href="<TMPL_VAR NAME="R_PATH">/<TMPL_LOOP NAME="PATH"><TMPL_IF NAME="pathname"><TMPL_VAR ESCAPE="URL" NAME="PATHNAME">/</TMPL_IF></TMPL_LOOP>comparison-year.html">year</a> + ] + </TMPL_IF> + <TMPL_IF NAME="NCATEGORIES"> + [ + <TMPL_LOOP NAME="CATEGORIES"> + <a <TMPL_IF NAME="STATE_WARNING">class="warn"</TMPL_IF> <TMPL_IF NAME="STATE_CRITICAL">class="crit"</TMPL_IF> href="<TMPL_VAR NAME="URL">"><TMPL_VAR ESCAPE="HTML" NAME="NAME"></a> + </TMPL_LOOP> ] + </TMPL_IF> + <ul> + <TMPL_LOOP NAME="GROUPS"> + <TMPL_UNLESS NAME="MULTIGRAPH"> + <li <TMPL_IF NAME="__LAST__">class="last"</TMPL_IF>> + <TMPL_IF NAME="NCATEGORIES"><span class="host"><TMPL_ELSE><span class="domain"></TMPL_IF><a href="<TMPL_VAR NAME="URL">"><TMPL_VAR ESCAPE="HTML" NAME="NAME"></a></span> + <TMPL_IF NAME="COMPARE"> + :: [ + <a href="<TMPL_VAR NAME="R_PATH">/<TMPL_LOOP NAME="PATH"><TMPL_IF NAME="pathname"><TMPL_VAR ESCAPE="URL" NAME="PATHNAME">/</TMPL_IF></TMPL_LOOP>comparison-day.html">day</a> + <a href="<TMPL_VAR NAME="R_PATH">/<TMPL_LOOP NAME="PATH"><TMPL_IF NAME="pathname"><TMPL_VAR ESCAPE="URL" NAME="PATHNAME">/</TMPL_IF></TMPL_LOOP>comparison-week.html">week</a> + <a href="<TMPL_VAR NAME="R_PATH">/<TMPL_LOOP NAME="PATH"><TMPL_IF NAME="pathname"><TMPL_VAR ESCAPE="URL" NAME="PATHNAME">/</TMPL_IF></TMPL_LOOP>comparison-month.html">month</a> + <a href="<TMPL_VAR NAME="R_PATH">/<TMPL_LOOP NAME="PATH"><TMPL_IF NAME="pathname"><TMPL_VAR ESCAPE="URL" NAME="PATHNAME">/</TMPL_IF></TMPL_LOOP>comparison-year.html">year</a> + ] + </TMPL_IF> + <TMPL_IF NAME="NCATEGORIES"> + [ + <TMPL_LOOP NAME="CATEGORIES"> + <a <TMPL_IF NAME="STATE_WARNING">class="warn"</TMPL_IF> <TMPL_IF NAME="STATE_CRITICAL">class="crit"</TMPL_IF> href="<TMPL_VAR NAME="URL">"><TMPL_VAR ESCAPE="HTML" NAME="NAME"></a> + + </TMPL_LOOP> + ] + </TMPL_IF> + <ul> + <TMPL_LOOP NAME="GROUPS"> + <TMPL_UNLESS NAME="MULTIGRAPH"> + <li <TMPL_IF NAME="__LAST__">class="last"</TMPL_IF>> + <TMPL_IF NAME="NCATEGORIES"><span class="host"><TMPL_ELSE><span class="domain"></TMPL_IF><a href="<TMPL_VAR NAME="URL">"><TMPL_VAR ESCAPE="HTML" NAME="NAME"></a></span> + <TMPL_IF NAME="COMPARE"> + :: [ + <a href="<TMPL_VAR NAME="R_PATH">/<TMPL_LOOP NAME="PATH"><TMPL_IF NAME="pathname"><TMPL_VAR ESCAPE="URL" NAME="PATHNAME">/</TMPL_IF></TMPL_LOOP>comparison-day.html">day</a> + <a href="<TMPL_VAR NAME="R_PATH">/<TMPL_LOOP NAME="PATH"><TMPL_IF NAME="pathname"><TMPL_VAR ESCAPE="URL" NAME="PATHNAME">/</TMPL_IF></TMPL_LOOP>comparison-week.html">week</a> + <a href="<TMPL_VAR NAME="R_PATH">/<TMPL_LOOP NAME="PATH"><TMPL_IF NAME="pathname"><TMPL_VAR ESCAPE="URL" NAME="PATHNAME">/</TMPL_IF></TMPL_LOOP>comparison-month.html">month</a> + <a href="<TMPL_VAR NAME="R_PATH">/<TMPL_LOOP NAME="PATH"><TMPL_IF NAME="pathname"><TMPL_VAR ESCAPE="URL" NAME="PATHNAME">/</TMPL_IF></TMPL_LOOP>comparison-year.html">year</a> + ] + </TMPL_IF> + <TMPL_IF NAME="NCATEGORIES"> + [ + <TMPL_LOOP NAME="CATEGORIES"> + <a <TMPL_IF NAME="STATE_WARNING">class="warn"</TMPL_IF> <TMPL_IF NAME="STATE_CRITICAL">class="crit"</TMPL_IF> href="<TMPL_VAR NAME="URL">"><TMPL_VAR ESCAPE="HTML" NAME="NAME"></a> + + </TMPL_LOOP>] + </TMPL_IF> + <ul> + <TMPL_LOOP NAME="GROUPS"> + <TMPL_UNLESS NAME="MULTIGRAPH"> + <li <TMPL_IF NAME="__LAST__">class="last"</TMPL_IF>> + <TMPL_IF NAME="NCATEGORIES"><span class="host"><TMPL_ELSE><span class="domain"></TMPL_IF><a href="<TMPL_VAR NAME="URL">"><TMPL_VAR ESCAPE="HTML" NAME="NAME"></a></span> + <TMPL_IF NAME="COMPARE"> + :: [ + <a href="<TMPL_VAR NAME="R_PATH">/<TMPL_LOOP NAME="PATH"><TMPL_IF NAME="pathname"><TMPL_VAR ESCAPE="URL" NAME="PATHNAME">/</TMPL_IF></TMPL_LOOP>comparison-day.html">day</a> + <a href="<TMPL_VAR NAME="R_PATH">/<TMPL_LOOP NAME="PATH"><TMPL_IF NAME="pathname"><TMPL_VAR ESCAPE="URL" NAME="PATHNAME">/</TMPL_IF></TMPL_LOOP>comparison-week.html">week</a> + <a href="<TMPL_VAR NAME="R_PATH">/<TMPL_LOOP NAME="PATH"><TMPL_IF NAME="pathname"><TMPL_VAR ESCAPE="URL" NAME="PATHNAME">/</TMPL_IF></TMPL_LOOP>comparison-month.html">month</a> + <a href="<TMPL_VAR NAME="R_PATH">/<TMPL_LOOP NAME="PATH"><TMPL_IF NAME="pathname"><TMPL_VAR ESCAPE="URL" NAME="PATHNAME">/</TMPL_IF></TMPL_LOOP>comparison-year.html">year</a> + ] + </TMPL_IF> + <TMPL_IF NAME="NCATEGORIES"> + [ + <TMPL_LOOP NAME="CATEGORIES"> + <a <TMPL_IF NAME="STATE_WARNING">class="warn"</TMPL_IF> <TMPL_IF NAME="STATE_CRITICAL">class="crit"</TMPL_IF> href="<TMPL_VAR NAME="URL">"><TMPL_VAR ESCAPE="HTML" NAME="NAME"></a> + </TMPL_LOOP> + ] + </TMPL_IF> + </li> + </TMPL_UNLESS> + </TMPL_LOOP> + </ul> + </li> + </TMPL_UNLESS> + </TMPL_LOOP> + </ul> + </li> + </TMPL_UNLESS> + </TMPL_LOOP> + </ul> + </li> + </TMPL_UNLESS> + </TMPL_LOOP> + </ul> + <TMPL_ELSE> + Warning: no hosts were configured for data collection. See the <a href="http://guide.munin-monitoring.org/en/latest/installation/configuration.html#add-some-nodes">Munin Guide</a> for details. + </TMPL_IF> + <div class="contentpusher"></div> + </div> + </div> + <TMPL_INCLUDE NAME="partial/footer.tmpl"> </body> </html> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/master/www/partial/footer.tmpl new/munin-2.0.71/master/www/partial/footer.tmpl --- old/munin-2.0.66/master/www/partial/footer.tmpl 2021-01-06 21:16:52.000000000 +0100 +++ new/munin-2.0.71/master/www/partial/footer.tmpl 2022-09-19 09:13:00.000000000 +0200 @@ -2,6 +2,6 @@ <TMPL_IF NAME="PEERS"> <p class="navigation"><TMPL_INCLUDE NAME="bottom_navigation.tmpl"></p> </TMPL_IF> -<p class="tagline">This page was generated by <a href="http://www.munin-monitoring.org/">Munin</a> version <TMPL_VAR NAME="MUNIN_VERSION"> at <TMPL_VAR NAME="TIMESTAMP">.</p> +<p class="tagline">This page was generated by <a href="https://munin-monitoring.org/">Munin</a> version <TMPL_VAR NAME="MUNIN_VERSION"> at <TMPL_VAR NAME="TIMESTAMP">.</p> </div> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/node/_bin/munin-asyncd.in new/munin-2.0.71/node/_bin/munin-asyncd.in --- old/munin-2.0.66/node/_bin/munin-asyncd.in 2021-01-06 21:16:52.000000000 +0100 +++ new/munin-2.0.71/node/_bin/munin-asyncd.in 2022-09-19 09:13:00.000000000 +0200 @@ -170,7 +170,7 @@ my $sock; PLUGIN: foreach my $plugin (@plugins) { # See if this plugin should be updated - my $plugin_rate = $spoolwriter->get_metadata("plugin_rates/$plugin") || 300; + my $plugin_rate = $spoolwriter->get_metadata("plugin_rates/$plugin") || $minrate; if ($when < ($last_updated{$plugin} || 0) + ($plugin_rate * $min_update_rate_threshold)) { # not yet, next plugin next; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/node/lib/Munin/Node/Service.pm new/munin-2.0.71/node/lib/Munin/Node/Service.pm --- old/munin-2.0.66/node/lib/Munin/Node/Service.pm 2021-01-06 21:16:52.000000000 +0100 +++ new/munin-2.0.71/node/lib/Munin/Node/Service.pm 2022-09-19 09:13:00.000000000 +0200 @@ -244,7 +244,7 @@ sub exec_service { - my ($self, $service, $arg) = @_; + my ($self, $service, @args) = @_; # XXX - Create the statedir for the user my $uid = $self->_resolve_uid($service); @@ -261,7 +261,7 @@ Munin::Node::OS::set_umask(); - my @command = grep defined, _service_command($self->{servicedir}, $service, $arg); + my @command = grep defined, _service_command($self->{servicedir}, $service, @args); print STDERR "# About to run '", join (' ', @command), "'\n" if $config->{DEBUG}; @@ -269,12 +269,12 @@ } -# Returns the command for the service and (optional) argument, expanding '%c' +# Returns the command for the service and (optional) arguments, expanding '%c' # as the original command (see 'command' directive in # <http://munin-monitoring.org/wiki/plugin-conf.d>). sub _service_command { - my ($dir, $service, $argument) = @_; + my ($dir, $service, @arguments) = @_; my @run; my $sconf = $config->{sconf}; @@ -282,14 +282,14 @@ if ($sconf->{$service}{command}) { for my $t (@{ $sconf->{$service}{command} }) { if ($t eq '%c') { - push @run, ("$dir/$service", $argument); + push @run, ("$dir/$service", @arguments); } else { push @run, ($t); } } } else { - @run = ("$dir/$service", $argument); + @run = ("$dir/$service", @arguments); } return @run; @@ -400,7 +400,7 @@ =item B<exec_service> - $service->exec_service($service, [$argument]); + $service->exec_service($service, [@arguments]); Replaces the current process with an instance of service $service in $directory, running with the correct environment and privileges. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/node/sbin/munin-node new/munin-2.0.71/node/sbin/munin-node --- old/munin-2.0.66/node/sbin/munin-node 2021-01-06 21:16:52.000000000 +0100 +++ new/munin-2.0.71/node/sbin/munin-node 2022-09-19 09:13:00.000000000 +0200 @@ -212,10 +212,6 @@ Audun Ytterdal, Jimmy Olsen, and Tore Anderson. -=head1 BUGS - -Please see L<http://munin-monitoring.org/report/1>. - =head1 COPYRIGHT Copyright (C) 2002-2006 Audun Ytterdal, Jimmy Olsen, and Tore Anderson / Linpro AS. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/node/sbin/munin-node-configure new/munin-2.0.71/node/sbin/munin-node-configure --- old/munin-2.0.66/node/sbin/munin-node-configure 2021-01-06 21:16:52.000000000 +0100 +++ new/munin-2.0.71/node/sbin/munin-node-configure 2022-09-19 09:13:00.000000000 +0200 @@ -659,10 +659,6 @@ Jimmy Olsen, Nicolai Langfeldt, Matthew Boyle -=head1 BUGS - -Please see L<http://munin-monitoring.org/report/1>. - =head1 COPYRIGHT Copyright (C) 2003-2006 Jimmy Olsen, Nicolai Langfeldt. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/node/sbin/munin-run new/munin-2.0.71/node/sbin/munin-run --- old/munin-2.0.66/node/sbin/munin-run 2021-01-06 21:16:52.000000000 +0100 +++ new/munin-2.0.71/node/sbin/munin-run 2022-09-19 09:13:00.000000000 +0200 @@ -123,7 +123,7 @@ $0 = $1; my @original_argv = @ARGV; - my ($plugin, $arg) = parse_args(); + my ($plugin, @args) = parse_args(); # Loads the settings from munin-node.conf. # Ensures that, where options can be set both in the config and in @@ -135,15 +135,15 @@ # Run directly or execute recursively via "systemd-run". if (($ignore_systemd_properties) || (! -d "/run/systemd/system")) { - return execute_plugin($plugin, $arg); + return execute_plugin($plugin, @args); } elsif (!check_systemd_run_permissions()) { print STDERR "# Skipping systemd properties simulation due to lack of permissions.\n" if $config->{DEBUG}; - return execute_plugin($plugin, $arg); + return execute_plugin($plugin, @args); } else { my $systemd_version = get_systemd_version(); if ((not defined $systemd_version) or ($systemd_version < $REQUIRED_SYSTEMD_VERSION)) { print STDERR "# Skipping systemd properties simulation due to required systemd version ($REQUIRED_SYSTEMD_VERSION)\n" if $config->{DEBUG}; - return execute_plugin($plugin, $arg); + return execute_plugin($plugin, @args); } else { my @munin_node_hardening_flags; my $parse_flags_success = 0; @@ -158,7 +158,7 @@ # Failed to retrieve systemd properties of munin-node service. # Probable causes: systemd is not installed/enabled or the # service unit does not exist. - return execute_plugin($plugin, $arg); + return execute_plugin($plugin, @args); } } } @@ -307,7 +307,7 @@ sub execute_plugin { - my ($plugin, $arg) = @_; + my ($plugin, @args) = @_; $services = Munin::Node::Service->new( servicedir => $servicedir, @@ -330,7 +330,7 @@ # no need for a timeout -- the user can kill this process any # time they want. - $services->exec_service($plugin, $arg); + $services->exec_service($plugin, @args); # Never reached, but just in case... print STDERR "# FATAL: Failed to exec.\n"; @@ -344,7 +344,7 @@ my $sconfdir = "$Munin::Common::Defaults::MUNIN_CONFDIR/plugin-conf.d"; my $sconffile; - my ($plugin, $arg); + my ($plugin, $arg, @extra_args); print_usage_and_exit() unless GetOptions( "config=s" => \$conffile, @@ -367,6 +367,8 @@ ($arg) = ($ARGV[1] =~ m/^(\w+)$/) or die "# ERROR: Invalid characters in argument '$ARGV[1]'.\n"; } + # all remaining arguments are handed over to the plugin without further checks + @extra_args = map {m/^(.*)$/} @ARGV[2..$#ARGV]; # Detaint service directory. FIXME: do more strict detainting? if ($servicedir) { @@ -385,7 +387,7 @@ paranoia => $paranoia, }); - return ($plugin, $arg); + return ($plugin, $arg, @extra_args); } @@ -520,10 +522,6 @@ Audun Ytterdal, Jimmy Olsen, Tore Anderson, Nicolai Langfeldt, Lars Kruse. -=head1 BUGS - -Please see L<http://munin-monitoring.org/report/1>. - =head1 COPYRIGHT Copyright (C) 2002-2009 Audun Ytterdal, Jimmy Olsen, Tore Anderson, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/plugins/lib/Munin/Plugin/Pgsql.pm new/munin-2.0.71/plugins/lib/Munin/Plugin/Pgsql.pm --- old/munin-2.0.66/plugins/lib/Munin/Plugin/Pgsql.pm 2021-01-06 21:16:52.000000000 +0100 +++ new/munin-2.0.71/plugins/lib/Munin/Plugin/Pgsql.pm 2022-09-19 09:13:00.000000000 +0200 @@ -48,6 +48,11 @@ wildcard per-database plugins. This can be overridden using the PGDATABASE variable, but this is usually a bad idea. +If you are using plugin for several postgres instances, you can customize +graph title with the environment variable PGLABEL. + +Warning and critical can be customized by setting "warning" and "critical" env variables per plugin. + =head2 Example [postgres_*] @@ -55,6 +60,10 @@ env.PGUSER postgres env.PGPORT 5433 + [postgres_connections_ALL] + env.warning :450 + env.critical :500 + =head1 WILDCARD MATCHING Wildcard plugins based on this module will match on whatever type of object @@ -144,6 +153,8 @@ if the plugin should be run on this machine. Must return a single row, two columns columns. The first one is a boolean field representing yes or no, the second one a reason for "no". + warning The warning low and/or high thresholds. + critical The critical low and/or high thresholds. graphdraw The draw parameter for the graph. The default is LINE1. graphtype The type parameter for the graph. The default is GAUGE. graphperiod The period for the graph. Copied directly to the config output. @@ -212,6 +223,8 @@ title => $args{title}, info => $args{info}, vlabel => $args{vlabel}, + warning => defined($ENV{'warning'}) ? $ENV{'warning'} : $args{warning}, + critical => defined($ENV{'critical'}) ? $ENV{'critical'} : $args{critical}, graphdraw => $args{graphdraw}, graphtype => $args{graphtype}, graphperiod => $args{graphperiod}, @@ -284,6 +297,8 @@ } print "$l.min $self->{graphmin}\n" if (defined $self->{graphmin}); print "$l.max $self->{graphmax}\n" if (defined $self->{graphmax}); + print "$l.warning $self->{warning}\n" if (defined $self->{warning}); + print "$l.critical $self->{critical}\n" if (defined $self->{critical}); $firstrow = 0; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/plugins/node.d/bind9.in new/munin-2.0.71/plugins/node.d/bind9.in --- old/munin-2.0.66/plugins/node.d/bind9.in 2021-01-06 21:16:52.000000000 +0100 +++ new/munin-2.0.71/plugins/node.d/bind9.in 2022-09-19 09:13:00.000000000 +0200 @@ -30,7 +30,7 @@ =over -=item * L<http://blog.larsstrand.org/2008/02/how-to-monitor-bind-with-munin.html> +=item * L<http://blog.larsstrand.no/2008/02/how-to-monitor-bind-with-munin.html> =item * BIND Administrator Reference Manual @@ -92,7 +92,7 @@ get_state; open(Q,"> $STATEFILE") or die; - foreach $k (keys %IN) { + foreach $k (sort keys %IN) { print "query_$k.value ",$IN{$k},"\n"; print Q "$k ",$IN{$k},"\n"; } @@ -108,20 +108,19 @@ print "graph_title DNS Queries by type graph_category dns graph_vlabel Queries / \${graph_period} -query_other.label Other -query_other.type DERIVE -query_other.min 0 -query_other.draw AREA "; get_state; - foreach $k (keys %IN) { + foreach $k (sort keys %IN) { print "query_$k.label $k query_$k.type DERIVE query_$k.min 0 -query_$k.draw STACK "; } + print "query_other.label Other +query_other.type DERIVE +query_other.min 0 +"; }; if (defined($ARGV[0]) and ($ARGV[0] eq 'config')) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/plugins/node.d/fail2ban.in new/munin-2.0.71/plugins/node.d/fail2ban.in --- old/munin-2.0.66/plugins/node.d/fail2ban.in 2021-01-06 21:16:52.000000000 +0100 +++ new/munin-2.0.71/plugins/node.d/fail2ban.in 2022-09-19 09:13:00.000000000 +0200 @@ -24,6 +24,10 @@ [fail2ban] user root +Warning or critical thresholds can be configured via environment +variables either globally ("warning" and "critical")) or separately for +each field ("foo_warning" or "foo_critical"). + =head1 INTERPRETATION This plugin shows a graph with one line per active fail2ban jail, each @@ -55,6 +59,7 @@ =cut +. "$MUNIN_LIBDIR/plugins/plugin.sh" ############################## # Configurable variables @@ -90,7 +95,8 @@ *'Currently banned'*) line="${line##*Currently banned:}" num="${line//[ $'\t']/}" - echo "${jail//[^0-9A-Za-z]/_}.value $num" + fieldname=$(clean_fieldname "$jail") + echo "${fieldname}.value $num" ;; esac done @@ -108,7 +114,9 @@ echo 'graph_total total' list_jails | while read -r jail; do - echo "${jail//[^0-9A-Za-z]/_}.label $jail" + fieldname=$(clean_fieldname "$jail") + echo "${fieldname}.label $jail" + print_thresholds "${fieldname}" warning critical done } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/plugins/node.d/haproxy_.in new/munin-2.0.71/plugins/node.d/haproxy_.in --- old/munin-2.0.66/plugins/node.d/haproxy_.in 2021-01-06 21:16:52.000000000 +0100 +++ new/munin-2.0.71/plugins/node.d/haproxy_.in 2022-09-19 09:13:00.000000000 +0200 @@ -76,29 +76,26 @@ print "graph_args --base 1000 -l 0\n"; print "graph_vlabel connections per \${graph_period}\n"; print "graph_category haproxy\n"; - my $fieldnum = 0; while ($content =~ /\n([^,]+),([^,]+),[^,]+,[^,]+,[^,]+,[^,]+,[^,]*,([^,]+),[^,]+,[^,]+,[^,]*,[^,]+,/g) { next if $2 eq "BACKEND"; - next if defined $backends{$2}; - $backends{$2} = 1; - print "s$2.label ", $2, "\n"; - print "s$2.type DERIVE\n"; - print "s$2.min 0\n"; - if ($fieldnum++) { - print "s$2.draw STACK\n"; - } else { - print "s$2.draw AREA\n"; - } + my $field_name = clean_fieldname($2); + next if defined $backends{$field_name}; + $backends{$field_name} = 1; + print "s$field_name.label ", $2, "\n"; + print "s$field_name.type DERIVE\n"; + print "s$field_name.min 0\n"; + print "s$field_name.draw AREASTACK\n"; } exit 0; } while ($content =~ /\n([^,]+),([^,]+),[^,]+,[^,]+,[^,]+,[^,]+,[^,]*,([^,]+),[^,]+,[^,]+,[^,]*,[^,]+,/g) { next if $2 eq "BACKEND"; - if (defined ($2)) { - $backends{$2} += $3; + my $field_name = clean_fieldname($2); + if (defined ($field_name)) { + $backends{$field_name} += $3; } else { - $backends{$2} = $3; + $backends{$field_name} = $3; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/plugins/node.d/hddtemp_smartctl.in new/munin-2.0.71/plugins/node.d/hddtemp_smartctl.in --- old/munin-2.0.66/plugins/node.d/hddtemp_smartctl.in 2021-01-06 21:16:52.000000000 +0100 +++ new/munin-2.0.71/plugins/node.d/hddtemp_smartctl.in 2022-09-19 09:13:00.000000000 +0200 @@ -298,7 +298,12 @@ sub device_for_drive { my ($drive) = @_; - my $dev = $drive =~ /(.*)(?:_\d+)$/ ? $1 : $drive; + # The purpose of the following regular expression (removing a numeric suffix starting with an + # underscore) is a mystery. But it is probably meant to detect a partition and select the + # parent block device in such a case. + # In order to avoid misinterpreting a trailing serial number as such a partition number, we + # limit the number of numeric characters after the underscore to just one or two. + my $dev = $drive =~ /(.*)(?:_\d{1,2})$/ ? $1 : $drive; my $fulldev = '/dev/'; $fulldev .= 'rdsk/' if $^O eq 'solaris'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/plugins/node.d/http_loadtime.in new/munin-2.0.71/plugins/node.d/http_loadtime.in --- old/munin-2.0.66/plugins/node.d/http_loadtime.in 2021-01-06 21:16:52.000000000 +0100 +++ new/munin-2.0.71/plugins/node.d/http_loadtime.in 2022-09-19 09:13:00.000000000 +0200 @@ -11,20 +11,27 @@ The following environment variables are used by this plugin target - comma separated URL(s) to fetch (default: "http://localhost/") + requisites - if true also loads images and stylesheets referenced in the page as well, see wget --page-requisites + (default: "false") + cookies - if true saves and loads cookies to and from munin plugin state directory, this can be used for services that + show session statistics to only use one session per http_loadtime uri configuration (default: "false") + example: [http_loadtime] env.target http://localhost.de,http://localhost.de/some-site.html env.requisites true + env.cookies true env.warning 5 env.critical 30 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 +=head1 AUTHORS Unknown authors (2013) Axel Huebl +(2021) Andreas Perhab <[email protected]> =head1 LICENSE @@ -41,6 +48,7 @@ target=${target:-"http://localhost/"} requisites=${requisites:-"false"} +cookies=${cookies:-"false"} urls=$(echo "$target" | tr ',' '\n') @@ -54,6 +62,21 @@ echo "$1" | sed 's/[:/.-]/_/g' } +request_url_with_args_from_env() { + local uri + uri=$1 + if [ "$requisites" = "true" ]; then + set -- --page-requisites "$@" + fi + if [ "$cookies" = "true" ]; then + local cookies_file + cookies_file="$MUNIN_PLUGSTATE/http_loadtime/$(escapeUri "$uri").cookies.txt" + mkdir -p "$(dirname "$cookies_file")" + set -- --load-cookies "$cookies_file" --save-cookies "$cookies_file" --keep-session-cookies "$@" + fi + request_url "$@" +} + if [ "$1" = "autoconf" ]; then result="yes" @@ -100,11 +123,7 @@ for uri in $urls do start=$(date +%s.%N) - if [ "$requisites" = "true" ]; then - request_url --page-requisites "$uri" - else - request_url "$uri" - fi + request_url_with_args_from_env "$uri" loadtime=$(echo "$start" "$(date +%s.%N)" | awk '{ print($2 - $1); }') echo "$(escapeUri "$uri").value $loadtime" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/plugins/node.d/mailman.in new/munin-2.0.71/plugins/node.d/mailman.in --- old/munin-2.0.66/plugins/node.d/mailman.in 2021-01-06 21:16:52.000000000 +0100 +++ new/munin-2.0.71/plugins/node.d/mailman.in 2022-09-19 09:13:00.000000000 +0200 @@ -61,6 +61,7 @@ if($ARGV[0] and $ARGV[0] eq "config") { print "graph_title Mailman usage\n"; print "graph_args --base 1000\n"; + print "graph_category mail\n"; print "posts.label posts per minute\n"; print "posts.type DERIVE\n"; print "posts.min 0\n"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/plugins/node.d/memcached_.in new/munin-2.0.71/plugins/node.d/memcached_.in --- old/munin-2.0.66/plugins/node.d/memcached_.in 2021-01-06 21:16:52.000000000 +0100 +++ new/munin-2.0.71/plugins/node.d/memcached_.in 2022-09-19 09:13:00.000000000 +0200 @@ -15,6 +15,7 @@ # # config # autoconf +# suggest # # Configurable variables # @@ -25,12 +26,9 @@ # Slightly based on the original version by Joshua Thijssen # <[email protected]> # -# Included in trunk for 1.4 by Nicolai Langfeldt. Set family to contrib -# and disabled autoconf due to lack of "suggest". -# # Magic markers: #%# family=contrib -#%# capabilities=noautoconf +#%# capabilities=autoconf use strict; my $ret = undef; if (! eval "require Cache::Memcached;") { @@ -41,17 +39,29 @@ if ( exists $ARGV[0] and $ARGV[0] eq "autoconf" ) { if ($ret) { print "no ($ret)\n"; - exit 0; + } else { + use Net::Ping; + my $p = Net::Ping->new(); + $p->port_number($PORT); + if ($p->ping($HOST, 1)) { + print "yes\n"; + exit 0; + } + print "no (cannot connect to $HOST on port $PORT)\n"; } -# Todo: we can always connect to a memcache server without any errors so I cannot really -# find a way to detect the presence of a memcache instance. Maybe a forced write/read/delete -# but there should be a better way somewhere... - print "yes\n"; + exit 0; +} + +if (exists $ARGV[0] and $ARGV[0] eq "suggest") { + print "bytes\n"; + print "counters\n"; + print "rates\n"; exit 0; } if($ret) { - print "no ($ret)\n"; + # refuse to execute "config" or "fetch" due to a missing requirement + print "memcached_ plugin fails to run: $ret\n"; exit 1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/plugins/node.d/multips.in new/munin-2.0.71/plugins/node.d/multips.in --- old/munin-2.0.66/plugins/node.d/multips.in 2021-01-06 21:16:52.000000000 +0100 +++ new/munin-2.0.71/plugins/node.d/multips.in 2022-09-19 09:13:00.000000000 +0200 @@ -28,7 +28,7 @@ This plugin simply counts the total number of processes matching the configured regular expressions. The regular expressions are -interpreted by "grep" (and not egrep or perl). +interpreted by "grep" (and not grep -E or perl). =head1 MAGIC MARKERS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/plugins/node.d/ntp_.in new/munin-2.0.71/plugins/node.d/ntp_.in --- old/munin-2.0.66/plugins/node.d/ntp_.in 2021-01-06 21:16:52.000000000 +0100 +++ new/munin-2.0.71/plugins/node.d/ntp_.in 2022-09-19 09:13:00.000000000 +0200 @@ -53,15 +53,17 @@ use English qw( -no_match_vars ); use strict; use warnings; +# work around "strict" check for this variable exported by "Net::IP" +my $ip_identical; eval { + no warnings "once"; require Net::DNS; Net::DNS->import(); require Net::IP; Net::IP->import(); + $ip_identical = $Net::IP::IP_IDENTICAL; }; my $has_requirements = $EVAL_ERROR ? 0 : 1; -# work around "strict" check for this variable exported by "Net::IP" -my $IP_IDENTICAL unless $has_requirements; if ($ARGV[0] and $ARGV[0] eq "autoconf") { @@ -172,7 +174,7 @@ ($srcadr) = new Net::IP($srcadr); ADDRS: foreach my $addr (@addresses) { - if (defined($srcadr->overlaps($addr)) and $srcadr->overlaps($addr) == $IP_IDENTICAL) { + if (defined($srcadr->overlaps($addr)) and $srcadr->overlaps($addr) == $ip_identical) { $matched = 1; last ASSOCS; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/plugins/node.d/ntp_offset.in new/munin-2.0.71/plugins/node.d/ntp_offset.in --- old/munin-2.0.66/plugins/node.d/ntp_offset.in 2021-01-06 21:16:52.000000000 +0100 +++ new/munin-2.0.71/plugins/node.d/ntp_offset.in 2022-09-19 09:13:00.000000000 +0200 @@ -37,6 +37,7 @@ =cut +. "$MUNIN_LIBDIR/plugins/plugin.sh" nodelay=${nodelay:-} @@ -87,6 +88,9 @@ case $nodelay in 1) echo "delay.graph no";; esac + print_thresholds delay + print_thresholds offset + print_thresholds critical } do_ () { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/plugins/node.d/postfix_mailqueue.in new/munin-2.0.71/plugins/node.d/postfix_mailqueue.in --- old/munin-2.0.66/plugins/node.d/postfix_mailqueue.in 2021-01-06 21:16:52.000000000 +0100 +++ new/munin-2.0.71/plugins/node.d/postfix_mailqueue.in 2022-09-19 09:13:00.000000000 +0200 @@ -52,7 +52,7 @@ =head1 CONFIGURATION By default "postconf -h queue_directory" is used to determine the -spool directory. Is postconf is not available in the $PATH then +spool directory. If postconf is not available in the $PATH then /var/spool/postfix is assumed. This can be overridden by the "spooldir" environment variable like so: @@ -81,11 +81,13 @@ =cut -# atempt to get spooldir via postconf, but environment overrides. - +# Attempt to get spooldir via postconf, but environment overrides. # Remember that postconf is not available unless postfix is. -POSTCONFSPOOL="$(postconf -h queue_directory 2>/dev/null || echo /var/spool/postfix)" -SPOOLDIR=${spooldir:-$POSTCONFSPOOL} +if [ -n "${spooldir}" ]; then + SPOOLDIR=${spooldir} +else + SPOOLDIR="$(postconf -h queue_directory 2>/dev/null || echo /var/spool/postfix)" +fi . "$MUNIN_LIBDIR/plugins/plugin.sh" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/plugins/node.d/postgres_querylength_.in new/munin-2.0.71/plugins/node.d/postgres_querylength_.in --- old/munin-2.0.66/plugins/node.d/postgres_querylength_.in 2021-01-06 21:16:52.000000000 +0100 +++ new/munin-2.0.71/plugins/node.d/postgres_querylength_.in 2022-09-19 09:13:00.000000000 +0200 @@ -65,11 +65,17 @@ info => 'Most long-running queries and transactions', vlabel => 'Age (seconds)', basequery => [ - "SELECT 'query',COALESCE(max(extract(epoch FROM CURRENT_TIMESTAMP-query_start)),0) FROM pg_stat_activity WHERE state NOT LIKE 'idle%' %%FILTER%% + "SELECT 'query',COALESCE(max(extract(epoch FROM CURRENT_TIMESTAMP-query_start)),0) FROM pg_stat_activity WHERE (state NOT LIKE 'idle%' AND xact_start IS NOT NULL) %%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, + 9.6, + "SELECT 'query',COALESCE(max(extract(epoch FROM CURRENT_TIMESTAMP-query_start)),0) FROM pg_stat_activity WHERE state 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.4, "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%%", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/plugins/node.d/snmp__cpuload.in new/munin-2.0.71/plugins/node.d/snmp__cpuload.in --- old/munin-2.0.66/plugins/node.d/snmp__cpuload.in 2021-01-06 21:16:52.000000000 +0100 +++ new/munin-2.0.71/plugins/node.d/snmp__cpuload.in 2022-09-19 09:13:00.000000000 +0200 @@ -85,7 +85,7 @@ print "host_name $host\n" unless ($host eq 'localhost'); print <<'EOC'; -graph_title CPU usage in percent +graph_title CPU usage graph_category system graph_args --upper-limit 100 -l 0 graph_vlabel % diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/plugins/node.d/snmp__df.in new/munin-2.0.71/plugins/node.d/snmp__df.in --- old/munin-2.0.66/plugins/node.d/snmp__df.in 2021-01-06 21:16:52.000000000 +0100 +++ new/munin-2.0.71/plugins/node.d/snmp__df.in 2022-09-19 09:13:00.000000000 +0200 @@ -47,13 +47,10 @@ =cut use strict; -use Net::SNMP; +use Munin::Plugin::SNMP; my $MAXLABEL = 20; -my $host = $ENV{host} || undef; -my $port = $ENV{port} || 161; -my $community = $ENV{community} || "public"; my $iface = $ENV{interface} || undef; my $response; @@ -66,21 +63,6 @@ exit 0; } -if ($0 =~ /^(?:|.*\/)snmp_([^_]+)_df$/) -{ - $host = $1; - if ($host =~ /^([^:]+):(\d+)$/) - { - $host = $1; - $port = $2; - } -} -elsif (!defined($host)) -{ - print "# Debug: $0 -- $1\n" if $Munin::Plugin::SNMP::DEBUG; - die "# Error: couldn't understand what I'm supposed to monitor."; -} - # Partition level my $hrFSIndex = "1.3.6.1.2.1.25.3.8.1.1."; # Should be more than 0 my $hrFSMountPoint = "1.3.6.1.2.1.25.3.8.1.2."; # Used to look up filesystem @@ -93,16 +75,7 @@ my $hrStorageUsed = "1.3.6.1.2.1.25.2.3.1.6."; # Data point 2 -my ($session, $error) = Net::SNMP->session( - -hostname => $host, - -community => $community, - -port => $port - ); - -if (!defined ($session)) -{ - die "Croaking: $error"; -} +my $session = Munin::Plugin::SNMP->session(); # Take a look at the partitions... my %partitions; @@ -188,6 +161,7 @@ if (defined $ARGV[0] and $ARGV[0] eq "config") { + my ($host) = Munin::Plugin::SNMP->config_session(); print "host_name $host\n" unless $host eq 'localhost'; print "graph_title Disk usage in percent\n"; print "graph_args --upper-limit 100 -l 0\n"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/plugins/node.d/snmp__df_ram.in new/munin-2.0.71/plugins/node.d/snmp__df_ram.in --- old/munin-2.0.66/plugins/node.d/snmp__df_ram.in 2021-01-06 21:16:52.000000000 +0100 +++ new/munin-2.0.71/plugins/node.d/snmp__df_ram.in 2022-09-19 09:13:00.000000000 +0200 @@ -45,14 +45,10 @@ =cut use strict; -use Net::SNMP; +use Munin::Plugin::SNMP; my $MAXLABEL = 20; -my $host = $ENV{host} || undef; -my $port = $ENV{port} || 161; -my $community = $ENV{community} || "public"; - my $response; if (defined $ARGV[0] and $ARGV[0] eq "snmpconf") @@ -63,21 +59,6 @@ exit 0; } -if ($0 =~ /^(?:|.*\/)snmp_([^_]+)_df_ram$/) -{ - $host = $1; - if ($host =~ /^([^:]+):(\d+)$/) - { - $host = $1; - $port = $2; - } -} -elsif (!defined($host)) -{ - print "# Debug: $0 -- $1\n" if $Munin::Plugin::SNMP::DEBUG; - die "# Error: couldn't understand what I'm supposed to monitor."; -} - # Disk level my $hrDeviceType = "1.3.6.1.2.1.25.3.2.1.2."; # Should be iso.3.6.1.2.1.25.3.1.6 (DiskStorage) my $hrDiskStorageRemoveble = "1.3.6.1.2.1.25.3.6.1.3."; # Should be false (2). @@ -95,16 +76,7 @@ my $hrStorageUsed = "1.3.6.1.2.1.25.2.3.1.6."; # Data point 2 -my ($session, $error) = Net::SNMP->session( - -hostname => $host, - -community => $community, - -port => $port - ); - -if (!defined ($session)) -{ - die "Croaking: $error"; -} +my $session = Munin::Plugin::SNMP->session(); # First we want to find the harddisks... my $correct_capacity = get_by_regex ($session, $hrDiskStorageCapacity, "[1-9]"); @@ -170,8 +142,9 @@ if (defined $ARGV[0] and $ARGV[0] eq "config") { + my ($host) = Munin::Plugin::SNMP->config_session(); print "host_name $host\n" unless $host eq 'localhost'; - print "graph_title Memory usage in percent\n"; + print "graph_title Memory usage\n"; print "graph_args --upper-limit 100 -l 0\n"; print "graph_vlabel %\n"; print "graph_category system\n"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/plugins/node.d.freebsd/df_inode.in new/munin-2.0.71/plugins/node.d.freebsd/df_inode.in --- old/munin-2.0.66/plugins/node.d.freebsd/df_inode.in 2021-01-06 21:16:52.000000000 +0100 +++ new/munin-2.0.71/plugins/node.d.freebsd/df_inode.in 2022-09-19 09:13:00.000000000 +0200 @@ -13,7 +13,7 @@ #%# family=auto #%# capabilities=autoconf -EXCLUDEDFS="-t noprocfs,devfs,fdescfs,linprocfs,linsysfs,sysfs,nfs,nullfs,cd9660" +EXCLUDEDFS="-t noprocfs,devfs,fdescfs,linprocfs,linsysfs,sysfs,nfs,nullfs,cd9660,msdosfs" if [ $(uname -s) = "GNU/kFreeBSD" ]; then # Debian ships df from GNU coreutils diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/plugins/node.d.linux/fw_packets.in new/munin-2.0.71/plugins/node.d.linux/fw_packets.in --- old/munin-2.0.66/plugins/node.d.linux/fw_packets.in 2021-01-06 21:16:52.000000000 +0100 +++ new/munin-2.0.71/plugins/node.d.linux/fw_packets.in 2022-09-19 09:13:00.000000000 +0200 @@ -6,7 +6,7 @@ =head1 NAME -fw_packets - Plugin to monitor the throuhgput of a firewall +fw_packets - Plugin to monitor the throughput of a firewall =head1 CONFIGURATION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/plugins/node.d.linux/iostat.in new/munin-2.0.71/plugins/node.d.linux/iostat.in --- old/munin-2.0.66/plugins/node.d.linux/iostat.in 2021-01-06 21:16:52.000000000 +0100 +++ new/munin-2.0.71/plugins/node.d.linux/iostat.in 2022-09-19 09:13:00.000000000 +0200 @@ -167,9 +167,9 @@ my $tmpnam = $2; my $major = $1; if ($tmpnam =~ /\d+$/ and !$include_numbered) { - # Special case for devices like cXdXpX, - # like the cciss driver - next unless $tmpnam =~ /\/c\d+d\d+$/ + # Special case for devices like cXdXpX, like the cciss driver, + # or nvmeXnXpX for nvme. + next unless ($tmpnam =~ /\/c\d+d\d+$/ || $tmpnam =~ /nvme\d+n\d+$/) } next unless grep { $_ } @fields; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/plugins/node.d.linux/netstat.in new/munin-2.0.71/plugins/node.d.linux/netstat.in --- old/munin-2.0.66/plugins/node.d.linux/netstat.in 2021-01-06 21:16:52.000000000 +0100 +++ new/munin-2.0.71/plugins/node.d.linux/netstat.in 2022-09-19 09:13:00.000000000 +0200 @@ -65,8 +65,9 @@ if [ "$1" = "config" ]; then - echo 'graph_title Netstat' - echo 'graph_args --base 1000 --logarithmic' + echo 'multigraph netstat' + echo 'graph_title Netstat, combined' + echo 'graph_args --units=si -l 1 --base 1000 --logarithmic' echo 'graph_vlabel TCP connections' echo 'graph_category network' echo 'graph_period second' @@ -101,10 +102,25 @@ print_critical resets echo 'established.label established' echo 'established.type GAUGE' - echo 'established.max 50000' echo 'established.info The number of currently open connections.' print_warning established print_critical established + + echo '' + + echo 'multigraph netstat_established' + echo 'graph_title Netstat, established only' + echo 'graph_args --lower-limit 0' + echo 'graph_vlabel TCP connections' + echo 'graph_category network' + echo 'graph_period second' + echo 'graph_info This graph shows the TCP activity of all the network interfaces combined.' + echo 'established.label established' + echo 'established.type GAUGE' + echo 'established.info The number of currently open connections.' + print_warning established + print_critical established + exit 0 fi @@ -112,9 +128,16 @@ # openings' string from plural connections to singular. The match hereby is for # both cases. # +echo 'multigraph netstat' "$NETSTAT_CMD" -s | awk ' /active connection(s)? ope/ { print "active.value " $1 } /passive connection ope/ { print "passive.value " $1 } /failed connection/ { print "failed.value " $1 } /connection resets/ { print "resets.value " $1 } /connections established/ { print "established.value " $1 }' + +echo + +echo 'multigraph netstat_established' +"$NETSTAT_CMD" -s | awk ' +/connections established/ { print "established.value " $1 }' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/plugins/node.d.linux/proc.in new/munin-2.0.71/plugins/node.d.linux/proc.in --- old/munin-2.0.66/plugins/node.d.linux/proc.in 2021-01-06 21:16:52.000000000 +0100 +++ new/munin-2.0.71/plugins/node.d.linux/proc.in 2022-09-19 09:13:00.000000000 +0200 @@ -327,7 +327,7 @@ my $procuid = getpwnam($procuser[$i]); # may return undef STATLINE: - foreach my $line(`fgrep -h '($procname[$i])' /proc/[0-9]*/stat`) { + foreach my $line(`grep -Fh '($procname[$i])' /proc/[0-9]*/stat`) { my ($pid) = $line =~ /^(\d+)/; my $cmduid = (lstat("/proc/$pid"))[4]; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/munin-2.0.66/plugins/plugin.sh.in new/munin-2.0.71/plugins/plugin.sh.in --- old/munin-2.0.66/plugins/plugin.sh.in 2021-01-06 21:16:52.000000000 +0100 +++ new/munin-2.0.71/plugins/plugin.sh.in 2022-09-19 09:13:00.000000000 +0200 @@ -191,16 +191,4 @@ esac } - - -# janl_: can I in a shell script save STDOUT so I can restore it after -# a "exec >>somefile"? -# james: exec 2>&4 etc. -# janl_: this saves handle 2 in handle 4? -# james: yes, that's basically the same as dup -# james: dup2, even -# janl_: so... ... "exec 4>&2" to restore? -# james: Actually you can do: exec 4>&2- ... which closes 4 afterwards ... -# I think that's historical behaviour and not a newish extension - # vim: ft=sh sw=4 ts=4 et
