--- munin-1.2.6.orig/debian/munin-node.README.Debian +++ munin-1.2.6/debian/munin-node.README.Debian @@ -0,0 +1,58 @@ +Debian-specific information regarding the Munin node +==================================================== + + About the plugins + ----------------- + + The node will scan the directory /etc/munin/plugins for executable + files (or symlinks to such files), and will treat the results as the + authoritative list of plugins to run. The maintainer scripts will have + created a default set of enabled plugins, attuned to your system. + You'll find more plugins in /usr/share/munin/plugins, which you can + enable by creating symlinks into /etc/munin/plugins as appropriate. + + Creating your own plugins is very easy. Read the rest of the included + documents, take a look at the provided plugins, and write your own. + Please use Latin-1 as file encoding since munin expects only Latin-1 + characters. Place it in /etc/munin/plugins/, and restart the client. + The core process will automatically notice the new service, and start + graphing it. + + Locally modified plugins + ------------------------ + + If you wish to change the behaviour of the provided plugins, you are + strongly encouraged to make a copy of the plugin as installed in + /usr/share/munin/plugins/, and place it in /etc/munin/plugins/. Then, + make your modifications in the copy. I strenously stress that it is + discouraged to make local modifications directly in plugins found in the + /usr/share/munin/plugin/ directories, as these files are managed by + dpkg - changes may very well be overwritten on upgrades. Also, such + changes will likely break intrusion detection systems which relies + on dpkg's database for reference. + + It is worth noting that many things can be overrided in the core process' + configuration file, so it is quite possible that a modification is not + necessary. + + Suggestions? Impressions? Questions? Fanmail? Love letters? Murder threats? + --------------------------------------------------------------------------- + + We've got a mailing list. You'll find subscription information at + . All feedback + are welcome. + + If you feel like sending us things that can't be represented in binary (for + example beautiful women fluent in assembly, bacillus anthracis, cash, + explosives, and so on), take contact off-list, and we'll find a way of + arranging the logistics. + + Find the upstream source + ------------------------ + This Debian package uses the upstream tarball located here: + http://sourceforge.net/projects/munin . + + It also uses quilt to apply some debian specific patches located in + ./debian/patches/ + +Enjoy! :-) --- munin-1.2.6.orig/debian/Makefile.config +++ munin-1.2.6/debian/Makefile.config @@ -0,0 +1,21 @@ +# This file overrides variables used by the makefile, so it's behaviour +# becomes suitable for building Debian packages. + +PREFIX = $(DESTDIR)/usr +CONFDIR = $(DESTDIR)/etc/munin +HTMLDIR = $(DESTDIR)/var/www/munin +DBDIR = $(DESTDIR)/var/lib/munin + +CGIDIR = $(DESTDIR)/usr/lib/cgi-bin + +LIBDIR = $(PREFIX)/share/munin + +HOSTNAME = localhost.localdomain + +PERLLIB = $(DESTDIR)$(shell $(PERL) -V:vendorlib | cut -d= -f2 | sed "s/[\';]//g") + +CHECKUSER = \# +CHECKGROUP = \# +CHOWN = \# +CHMOD = \# +CHGRP = \# --- munin-1.2.6.orig/debian/plugins.conf +++ munin-1.2.6/debian/plugins.conf @@ -0,0 +1,75 @@ +# This file is used to configure how the plugins are invoked. +# Place in /etc/munin/plugin-conf.d/ or corresponding directory. +# +# PLEASE NOTE: Changes in the plugin-conf.d directory are only +# read at munin-node startup, so restart at any changes. +# +# user # Set the user to run the plugin as. +# group # Set the group to run the plugin as. +# command # Run instead of the plugin. %c expands to +# what would normally be run. +# env. # Sets in the plugin's environment, see the +# individual plugins to find out which variables they +# care about. + +[apt] +user root + +[courier_mta_mailqueue] +group daemon + +[courier_mta_mailstats] +group adm + +[courier_mta_mailvolume] +group adm + +[cps*] +user root + +[exim_mailqueue] +group mail, (Debian-exim) + +[exim_mailstats] +group mail, adm + +[fw_conntrack] +user root + +[fw_forwarded_local] +user root + +[hddtemp_smartctl] +user root + +[if_*] +user root + +[if_err_*] +user nobody + +[ip_*] +user root + +[mysql*] +user root +env.mysqlopts --defaults-extra-file=/etc/mysql/debian.cnf + +[postfix_mailqueue] +user (postfix) + +[postfix_mailstats] +group adm + +[postfix_mailvolume] +group adm +env.logfile mail.log + +[smart_*] +user root + +[vlan*] +user root + +[ejabberd] +user root --- munin-1.2.6.orig/debian/munin-node.postrm +++ munin-1.2.6/debian/munin-node.postrm @@ -0,0 +1,42 @@ +#! /bin/sh + +set -e + +# workaround for bug #198522 +delete_dir_if_empty() { + if [ ! -d "$1" ]; then + return 0; + fi + rmdir --ignore-fail-on-non-empty $1; +} + +if [ "$1" = "purge" ]; then + # delete dangling symlinks + test -d /etc/munin/plugins/ && for plugin in $(find /etc/munin/plugins/ -type l); do + if [ ! -e $(readlink $plugin) ]; then + rm $plugin + fi + done + + rm -f /var/lib/munin/plugin-state/*.state + rm -f /var/log/munin/munin-node.log* + + dpkg-statoverride --remove /var/lib/munin/plugin-state + + # These are shared with munin, so only remove them if munin + # isn't installed (or already purged). + status=$(dpkg --get-selections munin) + if [ -z "$status" ] || [ "${status%purge}" != "$status" ]; then + dpkg-statoverride --remove /var/log/munin + dpkg-statoverride --remove /var/lib/munin + fi + + delete_dir_if_empty /var/lib/munin/plugin-state + delete_dir_if_empty /var/lib/munin + delete_dir_if_empty /var/log/munin + delete_dir_if_empty /etc/munin/plugin-conf.d + delete_dir_if_empty /etc/munin/plugins + delete_dir_if_empty /etc/munin +fi + +#DEBHELPER# --- munin-1.2.6.orig/debian/munin-node.postinst +++ munin-1.2.6/debian/munin-node.postinst @@ -0,0 +1,65 @@ +#! /bin/sh + +set -e + +prevver="$2" + +add_munin_system_user() { + if ! getent passwd munin >/dev/null; then + adduser --group --system --no-create-home --home /var/lib/munin munin + fi + # workaround bug (#531021) in xen-tools + if ! getent group munin >/dev/null; then + addgroup --system munin + adduser munin munin + fi +} + +fixperms() { + dpkg-statoverride --list /var/log/munin >/dev/null || \ + dpkg-statoverride --update --add munin adm 0750 /var/log/munin + dpkg-statoverride --list /var/lib/munin >/dev/null || \ + dpkg-statoverride --update --add munin munin 0755 /var/lib/munin + dpkg-statoverride --list /var/lib/munin/plugin-state >/dev/null || \ + dpkg-statoverride --update --add munin munin 0775 /var/lib/munin/plugin-state +} + +init_plugins() { + TMPFILE=`mktemp /tmp/munin-node.configure.XXXXXXXXXX` + if [ "$prevver" ]; then + echo -n "Initializing new plugins.." + munin-node-configure --shell --newer "${prevver%-*}" > $TMPFILE || rm -f $TMPFILE + if [ -f $TMPFILE ] ; then + sh < $TMPFILE + else + echo "failed." + fi + else + echo -n "Initializing plugins.." + munin-node-configure --shell > $TMPFILE || rm -f $TMPFILE + if [ -f $TMPFILE ] ; then + sh < $TMPFILE + else + echo "failed." + fi + fi + echo "done." + rm -f $TMPFILE +} + +case "$1" in + configure) + add_munin_system_user + fixperms + init_plugins + ;; + abort-upgrade|abort-deconfigure|abort-remove) + : + ;; + *) + echo "Called with unknown argument $1, bailing out." + exit 1 + ;; +esac + +#DEBHELPER# --- munin-1.2.6.orig/debian/munin-node.logrotate +++ munin-1.2.6/debian/munin-node.logrotate @@ -0,0 +1,9 @@ +/var/log/munin/munin-node.log { + daily + missingok + rotate 7 + compress + copytruncate + notifempty + create 640 root adm +} --- munin-1.2.6.orig/debian/munin.postrm +++ munin-1.2.6/debian/munin.postrm @@ -0,0 +1,44 @@ +#! /bin/sh + +set -e + +# workaround for bug #198522 +delete_dir_if_empty() { + if [ ! -d "$1" ]; then + return 0; + fi + rmdir --ignore-fail-on-non-empty $1; +} + +if [ "$1" = "purge" ]; then + + echo "The generated web site or accumulated data won't be removed." + + rm -f /var/lib/munin/datafile + rm -f /var/lib/munin/limits + rm -f /var/lib/munin/*.stats + rm -f /var/lib/munin/*/*.ok + + rm -f /var/log/munin/munin-update.log* + rm -f /var/log/munin/munin-graph.log* + rm -f /var/log/munin/munin-html.log* + rm -f /var/log/munin/munin-limits.log* + + dpkg-statoverride --remove /var/www/munin + + # These are shared with munin-node, so only remove them if munin-node + # isn't installed (or already purged). + status=$(dpkg --get-selections munin-node) + if [ -z "$status" ] || [ "${status%purge}" != "$status" ]; then + dpkg-statoverride --remove /var/log/munin + dpkg-statoverride --remove /var/lib/munin + fi + + delete_dir_if_empty /var/www/munin + delete_dir_if_empty /var/lib/munin + delete_dir_if_empty /var/log/munin + delete_dir_if_empty /etc/munin/templates + delete_dir_if_empty /etc/munin +fi + +#DEBHELPER# --- munin-1.2.6.orig/debian/rules +++ munin-1.2.6/debian/rules @@ -0,0 +1,73 @@ +#! /usr/bin/make -f + +export DH_VERBOSE= + +MAKEOPTS = CONFIG=debian/Makefile.config INSTALL_PLUGINS="auto manual snmpauto contrib" + +include /usr/share/quilt/quilt.make + +buildpackages=munin munin-node munin-plugins-extra + +# generate -pfoo commandline for debhelper +dhbuildpackages=$(addprefix -p,$(buildpackages)) + +build: build-stamp +build-stamp: $(QUILT_STAMPFN) + dh_testdir + dh_installdirs + + $(MAKE) build $(MAKEOPTS) + $(MAKE) build-doc $(MAKEOPTS) + $(MAKE) build-man $(MAKEOPTS) + + $(MAKE) install-main $(MAKEOPTS) \ + DESTDIR=debian/munin + + $(MAKE) install-node install-node-plugins $(MAKEOPTS) \ + DESTDIR=debian/munin-node + + install -m0644 debian/plugins.conf \ + $(CURDIR)/debian/munin-node/etc/munin/plugin-conf.d/munin-node + + mkdir -p $(CURDIR)/debian/munin-plugins-extra/usr/share/munin/plugins + for file in `find debian/munin-node/usr/share/munin/plugins -type f`; do \ + if ! grep -q "#%# family=\(auto\|manual\|snmpauto\)" $$file \ + && [ "`basename $$file`" != "plugins.history" ] && [ "`basename $$file`" != "plugin.sh" ]; then \ + mv $$file $(CURDIR)/debian/munin-plugins-extra/usr/share/munin/plugins; \ + fi; \ + done + + rmdir $(CURDIR)/debian/munin/var/run/munin + rmdir $(CURDIR)/debian/munin-node/var/run/munin + + touch build-stamp + +clean: unpatch + dh_testdir + dh_clean + $(MAKE) clean + +binary: binary-indep + +binary-arch: + +binary-indep: build-stamp + dh_testdir $(dhbuildpackages) + dh_testroot $(dhbuildpackages) + dh_installdocs $(dhbuildpackages) + dh_installchangelogs $(dhbuildpackages) ChangeLog + dh_installman $(dhbuildpackages) + dh_installinit --error-handler=true $(dhbuildpackages) -- "defaults 98 20" + dh_installcron $(dhbuildpackages) + dh_installlogrotate $(dhbuildpackages) + dh_installdebconf $(dhbuildpackages) + dh_link $(dhbuildpackages) + dh_fixperms $(dhbuildpackages) + dh_compress $(dhbuildpackages) + dh_perl $(dhbuildpackages) + dh_installdeb $(dhbuildpackages) + dh_gencontrol $(dhbuildpackages) + dh_md5sums $(dhbuildpackages) + dh_builddeb $(dhbuildpackages) + +.PHONY: build clean binary binary-arch binary-indep --- munin-1.2.6.orig/debian/changelog +++ munin-1.2.6/debian/changelog @@ -0,0 +1,866 @@ +munin (1.2.6-12) unstable; urgency=low + + * Fix bashisms in several plugins in munin-plugins-extra, thanks to + Raphael Geissert for the bug and the patch. (Closes: #530147) + * Fix hardcode upsname in nut_misc and nut_volts plugins, thanks to Joey + Hess for the bug and Stig Sandbeck Mathisen for the patch. + (Closes: #521355) + * munin.postinst and munin-node.postinst: workaround bug in xen-tools + (#531021) by creating the munin group if it doesn't exist. + (Closes: #501189) + * Add patch to linux cpu plugin to output correct graph if HZ value != 100, + thanks to Valentin Vidic for the patch. (Closes: #500226) + * Add patch to acpi plugin to call acpi without -B as requiered by acpi in + lenny and newer, thanks to Joey Hess. (Closes: #523239) + * Include ejabberd plugin in munin-plugins-extra. Thanks to Christian Dröge + for the plugin. (Closes: #505684) + * Include various plugins for asterisk in munin-plugins-extra. Thanks to + Rodolphe Quiedeville and Jan Prunk for the plugins. (Closes: #510307) + + -- Holger Levsen Fri, 29 May 2009 14:31:23 +0200 + +munin (1.2.6-11) unstable; urgency=low + + [ Stig Sandbeck Mathisen ] + * Activate 460-netstat-regex.patch (Closes: #526688) + + [ Matthias Schmitz ] + * Add munin(8) manpage. (Closes: #517952) + + [ Holger Levsen ] + * node/munin-run.in: fix typo in manpage. (Closes: #514559) + * Add suggests to net-tools for munin-node as netstat is a common plugin. + * Create /var/run/munin unconditionally in munin-nodes initscript, + remove the code in maintainer scripts and daily cronjob dealing with it. + (Closes: 518389) (by the code removal.) + * Bump Standards-version to 3.8.1. + * Bump debhelper compat level to 5, use versioned build-depends on + debhelper, add ${misc:Depends} to binary packages depends. + * Fix typo in apache plugins. (Closes: #519642) + * Fix typo in if plugins. (Closes: #523765) + * Apply patch from http://munin.projects.linpro.no/ticket/627 to support + bind 9.5 (and 9.3) in the bind9_rdnc plugin. (Closes: #522868) + Thanks to K.Kano for the patch and Thorsten Tüllmann for filing the bug in + the Debian BTS. + + -- Holger Levsen Thu, 28 May 2009 20:42:05 +0200 + +munin (1.2.6-10) unstable; urgency=low + + * munin-html: create needed directories if they don't exist. Normally this + is done in munin-graph, but that's not used in cgi mode. Thanks to Peter + Palfrader for the bugreport with patch! (Closes: #514634) + * node.d.linux/netstat.in: fix regex to only match openened connections, + thanks to Paul Slootman for 460-netstat-regex.patch. (Closes: #507069) + + -- Holger Levsen Sat, 28 Feb 2009 19:54:14 +0100 + +munin (1.2.6-9) unstable; urgency=low + + [ Matthias Schmitz ] + * 420-munin-limits.excessive-notifications.patch: Make the number of state + transitions (from or to unknown) configurable before a notification will + be send, now set to 3. Thanks to Steve Wilson for the patch. + (Closes: #501214) + * Add a stderr/stdout redirection to iostat plugin. (Closes: #512407) + * munin-cgi-graph: better check of semget() return value. + Thanks to Rafał Kupka! (Closes: #512572) + + [ Holger Levsen ] + * apc_nis plugin: Set line_volt.max to 300 (instead of 200) to correctly + deal with 220V installations. Thanks to Tim Bagot for reporting this! + (Closes: #511781) + + -- Holger Levsen Wed, 04 Feb 2009 20:05:53 +0100 + +munin (1.2.6-8) unstable; urgency=low + + [ Matthias Schmitz ] + * Added missing dashes to the http connector in tomcat_threads, + tomcat_volumes and tomcat_access. Thanks to Markus Fischer! + (Closes: #500304) + * With rrdtool >= 1.3 the column alignment in the graph legend only works + with a monospace font. Remove fix path to legend font in munin-graph and + substitute it with fontconfig name 'monospace'. (Closes: #499033) + * Remove the 'autoconf' magic marker from the postgres_* plugins. + (Closes: #503294, #503403) + + [ Holger Levsen ] + * munin-node.postinst: only execute $TMPFILE if munin-node-configure (which + creates it) exited without errors. (Closes: #503913) + * node/munin-node.conf.pod: fix error from pod2man spotted by lintian. + + -- Holger Levsen Sat, 08 Nov 2008 14:31:13 +0000 + +munin (1.2.6-7) unstable; urgency=low + + * Add trivial patch from Guido Günther to munin-node to allow colons in + plugin names, to enable support for IPv6 addresses. (Closes: #499391) + * Remove 'white-space: nowrap;' from style.css, this avoids too wide html + pages in large Munin installations. (Closes: #500080) + + -- Matthias Schmitz Wed, 24 Sep 2008 23:12:20 +0200 + +munin (1.2.6-6) unstable; urgency=low + + [ Matthias Schmitz ] + * Since version 1.3.x rrdtool / librrds uses libpango which needs its input + utf8 encoded. Because all munin plugins are latin1 munin-graph now encodes + the strings into utf8 before feeding them to librrds. (Closes: #494547) + Also mention the need for latin-1 encoded plugins in + munin-node.README.Debian. + * Included postgresql plugins. (Closes: #320079) Add libdbd-pg-perl + to munin-node suggests. + * Make munin-node suggests of smartmontools versioned to >=5.37-6~bpo40+1 + because this version contains fixes for CCISS controllers needed by + plugin hddtemp_smartctl, to help backporters. (Closes: #488357) + + [ Holger Levsen ] + * Add libnet-netmask-perl to munin-plugins-extra suggests. (Closes: #494095) + * Add trivial patch from Guido Günther to munin-run to allow colons in + plugin names, to enable support for IPv6 addresses. (Closes: #499391) + + -- Holger Levsen Fri, 19 Sep 2008 15:29:38 +0000 + +munin (1.2.6-5) unstable; urgency=low + + [ Matthias Schmitz ] + * The plugin nfsd will not longer try to read values from a not longer + existent /proc/net/rpc/nfsd. (Closes: #490882, #473854) + * munin-run will now print its usage if its called without a plugin + parameter. (Closes: #416478) + * node.d/postfix_mailqueue: redirect the 'which' output to /dev/null to + avoid an unnecessary error message. (Closes: #495004) + * node.d/exim_mailstats: cut out the pid from the logfile lines if + log_selector=+pid is used (Closes: #440622) + * munin-node: Add an entry to /etc/munin/plugin-conf.d/munin-node to let the + plugin fw_forwarded_local run as root. (Closes: #411869) + * node.d.linux/fw_conntrack: Add 'graph_args -l 0' to plugin so that the + graph scale always starts from zero and completely shows the area of the + established connections. (Closes: #490093) + + [ Holger Levsen ] + * Fix typos in node/Plugin.pm, thanks to Joey Schulze. (Closes: #495003) + + -- Holger Levsen Sun, 24 Aug 2008 17:35:34 +0000 + +munin (1.2.6-4) unstable; urgency=medium + + * Install munin-node gracefully (ie. inside a chroot, where port 4949 is + bound to another munin-node already) : munin-node.postinst: don't exit + postinst with error if just munin-node-configure fails. debian/rules: use + dh_installinit with --error-handler=true. (Closes: #491130) + * munin-node: if_ and if_err_ plugins: add msh|venet|veth to the regex of + detected interfaces. (Closes: #489505) + * munin-node: postfix_mailqueue plugin: use postconf to detect postfix's + spooldir. (Closes: #383397) + * munin-plugins-extra: include vserver plugins (Closes: #489737), thanks to + Micah Anderson for maintaining them. Make them use /bin/bash instead of + /bin/sh as they don't work with dash yet. + * munin-node: depend on gawk. (Closes: #491559) + * munin-node: add versioned dependency on lsb-base. (Closes: #469311) + * munin-node-configure: don't treat empty suggests as errors. + (Closes: #491475, #489502) + * munin-node: sensors plugin: don't output errors on autoconf and suggest if + no sensors binary is installed. (Closes: #491473) + * munin-plugins-extra: fix typo in courier plugin. (Closes: #491463) + + -- Holger Levsen Thu, 17 Jul 2008 16:33:05 +0000 + +munin (1.2.6-3) unstable; urgency=low + + [ Holger Levsen ] + * Add liblwp-useragent-determined-perl to suggests for the munin-node + package as its needed for the apache_accesses plugin. + + [ Matthias Schmitz ] + * Fix typo in munin-node postinst. (Closes: #489591) + * Fixed POD typo in Plugin.pm (Closes: #488700) + + -- Matthias Schmitz Mon, 07 Jul 2008 13:31:32 +0200 + +munin (1.2.6-2) unstable; urgency=low + + [ Matthias Schmitz ] + * Fix the exim detection in exim_mailqueue with the patch from Damyan + Ivanov, thanks! Closes: #486865 + * Replace the wrong filehandle close in exim_mailstats through tail_close(). + Closes: #486868 + * Remove the "-w" from the hash bang line of ntp_offset since nether dash + nor bash (or ksh) knows this parameter. Closes: #486887 + * Change maintainer mail back to munin-deb-maint@linpro.no + * To become compatible with Nagios substitute "%" by "percent" in graph + title of plugins df and df_inode. Thanks Andreas Beckmann, Closes: #472239 + * The plugin smart_ will not longer spin up disks in standby mode. Added "-n + standby" to the smartctl call. In plugin hddtemp_smartctl this issue was + already fixed upstream. Closes: #409462 + * Included plugin 'ups_'. Thanks Andras Korn! Closes: #305917 + * Set default logfile to mail.conf for postfix_mailvolume in plugins.conf + since Debian's postfix logs there. In the plugin postfix_mailstats this + issue was already fixed upstream. Closes: #461302 + * Added detection of slashes in plugin ip_'s suggest mode. + Closes: #464881, #411643, #402881 + * Included plugin 'openvpn'. Closes: #354447 + * Build the binary package 'munin-plugins-extra' with user contributed + plugins (again) by default. Though previously this package was called + 'munin-plugins-contrib'. It was renamed to avoid confusion about the term + 'contrib' which is used in Debian with a different meaning. + + [ Holger Levsen ] + * Bump Standards-Version to 3.8.0, add Homepage and Vcs-* pseudo-headers. + * Add README.source and convert it to svn-buildpackage. Thanks to Patrick + Winnertz for help on this and writing the pbuilder part of README.source. + * Add error checking to postinst, so the postinst (and with it dpkg) doesn't + fail if munin-node-configure fails, for example if /proc is not mounted. + * Provide entry about the munin-plugins-extra package in NEWS file. + * Add suggests to logtail for munin-plugins-extra, as some of those plugins + need it. + * Remove the buggy and unneeded logtail version detection code in the + amavis and courier plugins as described in #298895 and #297628. (The bugs + were closed in the BTS when the now called 'munin-plugins-extra' package + wasn't build on default anymore.) + * Adjust the default path for the mail logfile as suggested in #296533. + (Same here, bug was closed in the BTS when this binary package wasn't + build on default anymore.) + + -- Matthias Schmitz Tue, 01 Jul 2008 19:06:20 +0200 + +munin (1.2.6-1) unstable; urgency=low + + [ Matthias Schmitz ] + * new upstream release (Closes: #440003, #310915, #387283, #307963, #241824, + #307966, #311727, #336618, #307962, #307997, #385058, #385358, #332285, + #403341, #373970, #398027, #385291, #436002, #440622, #463721, #406479, + #454260, #484068, #472207, #485830) + - introduce the munindoc command + - introduce Munin::Plugin.pm and plugin.sh with utility functions for + perl/shell plugins + - new plugins: ntp_offset + * Added tomcat_* plugins from Munin 1.3.4, Closes: #484097 + + [ Holger Levsen ] + * Add Matthias and myself to uploaders. + * Change maintainer mail address. + * Fix formatting errors in debian/NEWS. + * Bump standards version to 3.7.3, no changes needed. + * Remove versioned dependencies/suggests on python, perl-modules and + debhelper as they are all fullfilled even in oldstable. + * Update debian/copyright to reflect that munin is under the GPL2. + * debian/rules: Don't ignore failures in the clean target. + * Move debhelper and quilt to Build-Depends:. + + -- Holger Levsen Sun, 11 May 2008 22:42:14 +0200 + +munin (1.2.5-2) unstable; urgency=low + + * apply patch that reads the default file, closes: #370347 + + * control: add Loic Dachary (OuoU) to Uploaders + + * control: standard version 3.7.2 + + -- Loic Dachary (OuoU) Tue, 07 Aug 2007 14:54:11 +0000 + +munin (1.2.5-1) unstable; urgency=low + + * New upstream release. + - Replace calls to net_write() with print(), closes: #388789. + - Replace calls to Net::Domain::hostfqdn() with a combination of + Sys::Hostname::hostname() and gethostbyname(), closes: #307462, + closes: #390815. + - Handle errors opening the stats file in munin-update, closes: #329204. + - Improves the default fonts in RRDtool 1.2, which caused some labels to + line-wrap, reducing readability. Closes: #361585. + - munin-node-configure-snmp now handles errors better, closes: #320455. + - Plugin generic/multips is now sorted under Processes, closes: #312521. + - Plugin linux/apt_all now correctly counts held packages, and also + considers the distribution "stable", closes: #314610. + + * debian/control, debian/rules, debian/NEWS: + - Add support for building a package containing the contrib plugins, + closes: #306861. Patch from Marc Haber, thanks! + + * debian/munin-node.init, debian/munin.cron.d: + - Recreate /var/run/munin on boot if it is absent. This is a work-around + for brain-damage in Ubuntu, where this directory goes AWOL every time + the machine is booted. Closes: #380434. + + * debian/control: + - The link to the example installation was broken, instead point to the + home page where there'll always be a link to a live one. + + * debian/munin-node.init: + - Handle pidofproc() supplying the correct return code in the situation + where the daemon is dead while the pid file exists. This was a bug + in lsb-base (#381684) up to and including version 3.1-10. + - Add LSB run-time dependency information. + + * debian/munin.cron.d: + - Change the time of the daily forced munin-limits run so it doesn't + start at the same time as the munin-cron process, which appeared to + cause a race condition that made munin-limits report all values as 0. + + * debian/plugins.conf: + - Run the ip_ plugin as the root user, closes: #373768. + + * debian/copyright: + - The new upstream release bundles Bitstream Vera Mono, include its + license. + + -- Tore Anderson Tue, 17 Oct 2006 14:39:05 +0200 + +munin (1.2.4-1) unstable; urgency=low + + * New upstream release. + - Plugin linux/iostat now supports c#d#p#-named devices, closes: #309263. + - Plugin generic/postfix_mailvolume should now correctly detect a + Postfix installation, closes: #341265, #306591. + + * debian/munin-node.init, debian/control: + - Fix killproc() call, whose interface changed in lsb-base 3.0-10. + Version the dependency accordingly. Closes: #339952. + + * server/munin-cron.in, server/munin-graph.in, server/munin-limits.in: + - Reverted to unmodified upstream versions, as the patches applied to + 1.2.3 has been merged into the upstream tree. + + -- Tore Anderson Tue, 13 Dec 2005 18:21:59 +0100 + +munin (1.2.3-3) unstable; urgency=medium + + * debian/munin.preinst (removed), debian/munin.postinst, debian/munin.postrm, + debian/munin-node.preinst (removed), debian/munin-node.postinst: + - Remove all code that handled upgrades from versions earlier than + 1.2.3-1. In a way this closes: #308008. + + * debian/munin.postrm, debian/munin-node.postrm: + - Replace "test -o" bashism with "||". + + * debian/munin-node.cron.d: + - Update APT's package index files periodically if the apt_all plugin + enabled, too. Patch by Tommi Virtanen, thanks! Closes: #317278. + + * debian/control: + - Remove conflict declarations on the old LRRD packages. + - Make munin-node suggest ethtool, closes: #311603. + - Make Munin depend on rrdtool instead of merely suggesting it. This is + a workaround for bug #323975 and its duplicates. + - Add a dependency on adduser for both packages. + - Increment standards-version to 3.6.2.1, no changes required. + + * debian/munin-node.init, debian/control: + - Reimplemented Munin-Node's init script using LSB functions. + Closes: #326912, #326913. + - Add a dependency on lsb-base for Munin-Node. + + * server/munin-graph.in, debian/control: + - Replaced the patch from 1.2.3-2 with the upstream one from SVN revision + 954. This re-enables support for RRDtool 1.0, so the versioned + dependency on librrds-perl is dropped. + + * server/munin-cron.in: + - Swallow bogus output from RRDtool, closes: #326061. This is a + (hopefully temporary) workaround for bug #325353. + + -- Tore Anderson Sat, 10 Sep 2005 10:58:08 +0200 + +munin (1.2.3-2) unstable; urgency=low + + * server/munin-graph.in: + - Gave up waiting for the new upstream release, and applied Robert + Loomans' patch to make Munin support RRDtool 1.2, closes: #324605, + closes: #325280. Thanks, Robert! Note that this breaks compability + with RRDtool 1.0. Sarge users should wait for the new upstream release + which will support both RRDtool 1.0 and 1.2. + + * debian/control: + - Made the munin package depend on librrds-perl in versions 1.2 or above. + + -- Tore Anderson Wed, 31 Aug 2005 09:11:47 +0200 + +munin (1.2.3-1) unstable; urgency=medium + + * New upstream release, targeted at Sarge. + - Plugin linux/sensors_ now handles yet another form of output from the + sensors(1) utility, closes: #300690. + - Plugin generic/postfix_mailstats now shouldn't include rejects from + the cleanup daemon in the total count, closes: #302220. + - Munin-update no longer emits Perl warnings to stdout, closes: #302502. + + * server/munin-limits.in, debian/NEWS: + - Apply patch from trunk which redirects all stdout and stderr from the + program being run to the log, closes: #301196. The references to this + functionality has been corrected in the NEWS file, and also in the + example config file. + + * debian/control: + - Increment standards-version to 3.6.1.1, no changes required. + + * debian/munin.docs: + - Include README-apache-cgi. + + -- Tore Anderson Sun, 03 Apr 2005 02:33:26 +0200 + +munin (1.2.2-3) unstable; urgency=high + + * node/munin-node.in: + - Fix mis-merge of the optional user patch, restoring per-plugin + group setting. Thanks to Andras Korn for reporting and + Robert Loomans for patch (Closes: #299589). + + * node/munin-node.in, node/munin-run.in: + - Allow root for the per-plugin group directive. + + * Fix autoconf for the linux/nfs* plugins. + + -- Dagfinn Ilmari Mannsaker Wed, 16 Mar 2005 20:45:15 +0100 + +munin (1.2.2-2) unstable; urgency=low + + * node/munin-node.in, node/munin-run.in: + - Allow plugins to specify users to run as if present, while falling + gracefully back on the default user if the specified user doesn't + exists. Patch grabbed from upstream CVS. + + * debian/plugins.conf: + - Run the postfix_mailqueue plugin as the postfix user only if it exists. + + -- Tore Anderson Sun, 13 Mar 2005 13:55:36 +0100 + +munin (1.2.2-1) unstable; urgency=low + + * New upstream release. + - Plugin linux/irqstats now handles blank lines in /proc/interrupts, + closes: #296452. + - Plugins generic/apache_* could in some cases cause spurious spikes, + this has now been fixed. Closes: #296454, #296645. + - Plugin linux/df_inode now handles devices with hyphens in their names + correctly, closes: #298442. + - Plugin generic/exim_mailstats now graphs rejects, closes: #295799. + - Earlier versions of munin-update could in some cases complain about + "nested quantifiers in regex", now fixed. Closes: #296575. + - Fixes some broken HTML in the templates, closes: #296676. + - Updates over very slow connections are now handled more gracefully, + closes: #298108. + + * debian/rules, debian/plugins.conf, debian/NEWS: + - Do not include contrib plugins in the munin-node package anymore. + Sort-of closes: #296533, #297451, #297628, #297904, #298895. + + * debian/rules, debian/munin-node.postinst: + - Delay startup of the node significantly, as it may require other + monitored services (e.g. ntpd) to be already running. Also change the + startup time if the package is being upgraded, if the current init + configuration is the old package's defaults. Closes: #298793, thanks + to Stephen Gran for noticing. + + * debian/plugins.conf: + - Run the Courier-MTA and Postfix plugins with necessary additional + privileges so they work out of the box, closes: #297654, #296985. + Thanks to Charles Fry and Juraj Bednar for pointing this out. + - The smart_ plugin is now run as root (which is necessary). + + * debian/control: + - Suggest acpi over lm-sensors, and not the other way around as it was + earlier. Both the acpi and sensors_ plugins achieve the same thing, + but the former is auto while the latter is manual. + - Remove the hddtemp suggestion and replace it with smartmontools, + closes: #296361. The hddtemp* plugins was replaced with + hddtemp_smartctl in 1.2.0. + - Suggest python (>= 2.2), used by the smart_ plugin. + - A few minor rewrites in the descriptions. + + * debian/munin-node.manpages: + - Include munin-node-configure-snmp(8). + + * server/munin-limits.in: + - Reverted to upstream version, as the patched required in 1.2.0-1 have + been merged. + + -- Tore Anderson Sun, 13 Mar 2005 00:28:49 +0100 + +munin (1.2.0-1) unstable; urgency=low + + * New upstream release, closes: #264878, #293499, #290099: + - Many plugins have changed type from COUNTER to DERIVE, to avoid + spurious spikes when the counters are mistakenly assumed to have + wrapped. This change may cause empty graphs to occur, take care to + read NEWS.Debian before upgrading the "munin-node" package! + Closes: #225623, #233762. + - Munin-update no longer truncates long field names, closes: #256370. + This may in some cases cause empty graphs, please read NEWS.Debian for + more information before upgrading the "munin" package. + - Replaces the old Nagios-specific integration with a much more generic + framework for sending alerts to wherever you want. As a side effect, + this closes: #291168. + - Corrects an erroneous commented example in munin.conf, closes: #294060. + - The munin-node.conf setting default_plugin_user now actually works as + advertised, closes: #295366, #295367. + - Plugin generic/bind9 now source its configuration from %ENV, + closes: #268142, #272049. + - Plugin generic/amavis now autodetects how to correctly invoke logtail, + closes: #284638, #288395. + - Plugin generic/squid_cache now correctly calculates cache size when + using multiple cache directories, closes: #288579. + - Plugin generic/postfix_mailstats now defaults to reading from a more + correct log file, closes: #291720. + - Plugin generic/postfix_mailstats now correctly identifies the reject + code as newer Postfix versions logs them, closes: #292110. + - Plugin generic/postfix_mailvolume now has a improved graph_title (that + is not the same as the title of generic/postfix_mailstats). + Closes: #292083. + - Plugin generic/named now defaults to reading from a more correct log + file, closes: #291849. + - Plugin linux/fw_forwarded_local now correctly reports 0 instead of + NaN in some situations, closes: #284673. + - Plugin linux/iostat now ingores devices that have had no I/O operations + whatsoever and thus are assumed to be unused, closes: #267195. + - New plugin: linux/forks. Closes: #225638. + - New plugin: linux/uptime. Closes: #283622. + - New plugin: linux/irqstats. Closes: #224990. + - New plugin: generic/courier_. Closes: #291854. + - New plugin: generic/perdition. Closes: #291855. + + * debian/NEWS: + - Document the changes that may lead to data loss when upgrading from + Munin 1.0.x, and also write a bit about the new munin-limits framework. + + * debian/control: + - Add dependency on perl-modules (>= 5.8.0) | libparse-recdescent-perl + for the main munin package, as munin-limits requires Text::Balanced. + - Add libdate-manip-perl as a recommended package for the munin package, + as the new CGI functionality depends on it. + - Change libnet-snmp-perl to be a recommended package for munin-node + instead of only suggested, as the new munin-node-configure-snmp + requires it. + + * debian/Makefile.config: + - Install the new CGI in /usr/lib/cgi-bin/, as mandated by the Debian + Policy Manual. + + * debian/munin.cron.d, debian/munin.manpages, debian/munin.logrotate, + debian/munin.postrm: + - The new upstream release includes "munin-limits", which supersede + "munin-nagios". Update the installed manual pages, cron jobs, + logrotate configuration, and purge script accordingly. + + * debian/plugins.conf: + - Plugin linux/fw_conntrack is now run as root as this file recently has + changed to not be world readable, closes: #291226. + - Plugin linux/if_ is now run as root in order to probe the speed of the + network interface. + + * debian/munin.postinst, debian/munin-node.postinst, debian/munin.postrm, + debian/munin-node.postrm: + - Use dpkg-statoverride to handle the permissions on the data and log + directories. + + * server/munin-limits.in: + - Change lock file directory to match that of munin-update, munin-graph, + and munin-html (grabbed from upstream CVS). + - Fix a string comparsions where the "==" operator was used instead of + "eq" (grabbed from upstream CVS). + + * debian/munin.postinst: + - Only change user and group ownership on the data files from "lrrd" to + "munin" when the package is first installed, not on every upgrade. + + -- Tore Anderson Mon, 21 Feb 2005 00:16:25 +0100 + +munin (1.0.5-1) unstable; urgency=low + + * New upstream release: + - Expands @@ macros in man pages, closes: #286399. + - Fixes bug in munin-run %ENV untainting, closes: #285173. + - Fixes template variable escaping and other XHTML errors, closes: #287435 + (based on patch by Tommi Virtanen ). + - hddtemp plugin calls hddtemp -n to avoid having to parse its output, + closes: #282021. + * Add Suggests: for programs and perl modules needed by plugins but not + the services they monitor, closes: #272148, #270090. + + -- Dagfinn Ilmari Mannsaker Wed, 5 Jan 2005 23:47:16 +0100 + +munin (1.0.4-1) unstable; urgency=low + + * New upstream release. + + -- Tore Anderson Sun, 5 Dec 2004 16:54:19 +0100 + +munin (1.0.3-1) unstable; urgency=low + + * New upstream release: + - Fixes typo in linux/fw_forwarded_local, closes: #275535. + - Fixes typo in linux/fw_packets, closes: #275537. + - Plugin generic/acpi now autodetects correctly even if the acpi version + does not contain the acpi_available program, closes: #275538. + + * debian/plugins.conf: + - Run the spamstats plugin with the group adm, closes: #278765. + - Sorted the entries alphabetically. + + -- Tore Anderson Mon, 1 Nov 2004 21:56:41 +0100 + +munin (1.0.2-1) unstable; urgency=low + + * New upstream release, fixing the follwing: + - munin-graph spews uninitialized value in concatenation [precedence + error], thanks to Don Armstrong (Closes: #267185). + * Run the hddtemp plugins as root, write access to the device isn't + enough. + + -- Dagfinn Ilmari Mannsaker Wed, 1 Sep 2004 09:32:42 +0200 + +munin (1.0.1-1) unstable; urgency=low + + * New upstream release, fixing the following: + - [munin-graph/1.0] multiple .negative options is broken, + thanks to Andre TOmt (Closes: #250982). + - [plugin:hddtemp2/1.0] Must run under "C" locale (Closes: #253497). + - munin-node: LANG-dependant behaviour changes (Closes: #255312). + - [plugin:sensors_temp/1.0] Omits temperature values without + max and/or hysteresis value(s), thanks to Elmar Hoffmann + (Closes: #256380). + - [plugin:sensors_volt/1.0] Omits negative voltages, thanks to Elmar + Hoffmann (Closes: #256734). + - [plugin:ipac_ng/1.0] Syntax error, thanks to Stefani + Banerian (Closes: #264714). + - [plugin:hddtemp2/1.0] Ignores env.ignore (it's not supposed + to, really! :), thanks to Michel Meyers (Closes: #265022). + - munin-node: plugin iostat_ios has improper magic file + marker, thanks to Micah Anderson (Closes: #262708). + * Set Maintainer: to the Munin team address. + * Add Tore Anderson and myself to Uploaders: + * Make the hddtemp plugins run as group "disk" to ensure access to the + disks. + + -- Dagfinn Ilmari Mannsaker Wed, 18 Aug 2004 20:55:27 +0200 + +munin (1.0.0-1) unstable; urgency=low + + * New upstream release. + + -- Tore Anderson Sun, 18 Jul 2004 13:19:31 +0200 + +munin (0+1.0.0pre5-1) unstable; urgency=low + + * New upstream release: + - Apache plugins' autoconf routines should be fixed, closes: #236144. + - The node now applies plugin user settings at startup, closes: #236694. + - Fixed link rot in the templates, closes: #236792. + - graph_scale improved to use rrdgraph --units-exponent, closes: #236834. + - Improves the labels of the Apache plugins, closes: #238594. + - Improved sensors_* plugins to better cope with various output from + /usr/bin/sensors, closes: #245289. + - Adds new plugin for NFS statistics, closes: #223775. + + * debian/rules: + - Include "contrib" plugins as well as "auto" and "manual" in the + munin-node package, closes: #236939, #236972, #245104. + + * Makefile: + - Ignore the return value of htmldoc, as it's begun returning non-zero + if it encountered a non-fatal error in the document. + + -- Tore Anderson Fri, 21 May 2004 20:51:19 +0200 + +munin (0+1.0.0pre3-1) unstable; urgency=low + + * New upstream release, closes: #231049: + - Project renamed from "LRRD" to "Munin". Almost every file in the + debian directory has changed both name and content due to this, and + the changes related to this are far too numerous to detail here. + - iostat plugin now works on Linux 2.6, closes: #224113. + - mysql_queries now appends ".value" to the fields, closes: #224118. + - Munin-node now ignores config files names suggesting they're backup + files of some sort (such as "foo.dpkg-old"), closes: #224265. + - Munin-node now doesn't attempt to drop privileges using setuid() and + setgid() if it's not running as root to begin with, closes: #224300. + - Untaint %ENV unconditionally; let the admin shoot himself in the foot + if he wants to, closes: #224838, #224878. + - Munin-update now allows any character in service names (although it + translates exotic ones to "_"), closes: #224859. + - Munin-graph now handles bogus input from plugins more gracefully, + closes: #224942. + - Munin-update doesn't any longer complain on stderr if a node times out + in mid-transfer, closes: #227650. + - Incorporates Mike Fedyk's many improvements to the memory plugin, + closes: #223346. + - The iostat graph is now mirrored over the X axis, making it much + easier to read, closes: #223373. + - Fix buggy HTML in the service view, closes: #230322. + - Limit the maximum values from the vmstat plugin to 500000, to avoid + spurious peaks to sneak in, closes: #225489, #225626. + - Further improvements to related to timeout handling, closes: #224480. + + * debian/plugins.conf: + - Run the Exim mailstats plugin in the groups "mail" and "adm", to + ensure we can read the log files we need, closes: #225988. + - Run the Exim mailqueue plugin with "Debian-exim" as a supplementary + group if it exists, closes: #229860. + + * debian/munin-node.init: + - Use a full string match instead of a substring match when looking + in the process table for running Munin-node processes, closes: #224486. + - Remove $( Thu, 05 Feb 2004 19:15:14 +0100 + +lrrd (0.9.9r5-1) unstable; urgency=low + + * New upstream release: + - Allows for customizing which port to connect to when the server is + talking to its clients, closes: #214114. + - Makes it possible to change the plugins' environment arbitrarily, + sort-of closes: #214277. + - Relaxes the paranoia regarding the plugins' ownership and permission + modes somewhat, closes: #214186, #216401. + - Further impovements to the error-handling logic in lrrd-server, which + hopefully closes: #215739, #222674, #222821. + - Removed the spurious use of Config::General in lrrd-client, + closes: #216176. + - Includes Andras Korn's psu_ wildcard plugin, which counts the number + of processes owned by specific users, closes: #214210. Thanks, Andras! + - The number of context switches per second is now graphed by the + interrupts plugin, closes: #222838. Thanks, Mike Fedyk! + - Corrected field names in the vmstat plugin, closes: #222841. Thanks + again, Mike Fedyk! + + * debian/control: + - Drop dependency on libconfig-general-perl for lrrd-server, as this + configuration file format is now deprecated. + - Change priority to extra, due to the dependency on librrds-perl. + + * debian/rules: + - Polished slightly. + + * debian/lrrd-client.dirs: + - Removed unecessary entry /var/run/lrrd, which is installed from the + Makefile. + + * debian/lrrd-client.init: + - Rewritten, now sports improved error handling and intrinsic distrust of + start-stop-daemon's return values, closes: #202190. + + * debian/lrrd-server.cron.d: + - Check if the binaries we're about to run exist and are executable + before running them, closes: #221691. + + * debian/lrrd-client.postinst, debian/lrrd-server.postinst: + - If we're updating from the packages which didn't create the lrrd system + group, try to make the GID the same as the already existing lrrd users' + UID, if it's available. + + * debian/lrrd-client.postinst: + - Rewritten as a shell script. + - Initial plugin setup now relies on lrrd-client-configure instead of an + internal function to to initialize plugins. This also ensures that + automatic plugins later added to the package will be enabled on + upgrades. + - The plugins' state files was inappropriately placed in /var/run, move + them to /var/lib if any exist in the former location. + + * debian/lrrd-server.postinst: + - Actually check how we're called, don't blindly assume we're + configuring. + + * debian/lrrd-server.postrm, debian/lrrd-client.postrm: + - Better handling of empty dirs after purge. (This is workaround for + dpkg bug #198522). + + * debian/lrrd-server.postrm: + - Remove some ucf stuff I had forgotten about. + + * debian/plugins.conf: + - Updated to the new syntax for passing options to the plugins. + + * debian/Makefile.config: + - Now only contains overrides to the upstream defaults, instead of being + a full replacement for upstream's Makefile.config. + - PLUGSTATE changed from /var/run/lrrd to /var/lib/lrrd/plugin-state, as + these files should persist after reboots. + + -- Tore Anderson Fri, 28 Nov 2003 23:30:27 +0100 + +lrrd (0.9.8-1) unstable; urgency=low + + * New upstream release: + - Fixes several situations where the server would stop gathering data, + closes: #202191, #202637, #209329, #203173. + - The client will now drop privileges if possible, closes: #201726. + - Makes the MySQL plugins more configurable, and uses floats instead of + integers in the ISAM space plugin, closes: #202639, #202643. + - Adds support for Linux 2.6 in the memory plugins, closes: #205019. + - Better handling of unreachable nodes, closes: #205999. + * debian/control: + - Standards-Version 3.6.1.0, no changes required. + - Change my email address. + - Drop dependency on ucf. + - Add dependency on libstorable-perl, as required by the new upstream + release. + * debian/Makefile.config, debian/rules: + - Updated for the new upstream release. + * debian/lrrd-client.postinst: + - Use lrrd-run instead of invoking the plugins directly, to ensure their + autoconf values are correct. + * debian/lrrd-server.postinst: + - Stop using ucf to handle /etc/lrrd/server.conf, instead ship is as a + dpkg conffile. This is made possible by using the new configuration + setting 'use_default_name'. + * debian/lrrd-client.postinst, debian/lrrd-server.postinst: + - Add the system group lrrd as well as a system user, and ensure that all + data directories are owned and writeble by these. + * debian/plugins.conf (new): + - Includes configuration settings for the plugins. + * debian/lrrd-client.docs (new), debian/lrrd-server.docs (new): + - Include the LRRD documentation, closes: #203647, #203748. + * Makefile: + - Generate the lrrd-run manual page from the correct POD file. + - Disable cleaning the debian/ tree in the clean target. + + -- Tore Anderson Sat, 04 Oct 2003 16:40:45 +0200 + +lrrd (0.9.7-2) unstable; urgency=low + + * Correct path to lrrd-nagios in /etc/cron.d/lrrd-server, closes: #202803. + * Use Net::Domain instead of /bin/hostname when generating server.conf, + to ensure the hostname matches the client's, closes: #203960. + * Do not determine the hostname and domain during build. + + -- Tore Anderson Sat, 09 Aug 2003 23:09:21 +0200 + +lrrd (0.9.7-1) unstable; urgency=low + + * New upstream release. + - Massive changes in build system, update debian/rules accordingly. + - The server will now ignore unreachable nodes, and should thus not + send root arcane error messages anymore, closes: #200487. + * After reading through the texmf.cnf thread on debian-devel, I realize + I've forgotten the simplizity and no-nonsense qulities about Debian + that attracted me in the first place, and that I've fallen for the + temptation of making the configuration scripts too pretentious and + loquacious. Therefore, I've killed all of the Debconf questions, and + instead enable a default set of plugins based on the autoconf and + suggests routines, closes: #197413. + * /etc/lrrd/client.conf is now a conffile handled by dpkg. + * Rewrote lrrd-client's postinst in Perl. + * Include the APT plugin in the lrrd-client package. Hence, the + lrrd-client package now Conflicts and Replaces lrrd-plugin-apt. + Thanks to James Troup for the suggestion. + * Declare the debhelper compat level in debian/compat instead of in + debian/rules. + * Standards-Version 3.6.0, no changes required. + + -- Tore Anderson Mon, 14 Jul 2003 20:39:18 +0200 + +lrrd (0.9.6-1) unstable; urgency=low + + * Initial release, closes: #169079. + + -- Tore Anderson Sat, 31 May 2003 17:15:35 +0200 --- munin-1.2.6.orig/debian/munin.cron.d +++ munin-1.2.6/debian/munin.cron.d @@ -0,0 +1,8 @@ +# +# cron-jobs for munin +# + +MAILTO=root + +*/5 * * * * munin if [ -x /usr/bin/munin-cron ]; then /usr/bin/munin-cron; fi +14 10 * * * munin if [ -x /usr/share/munin/munin-limits ]; then /usr/share/munin/munin-limits --force --contact nagios --contact old-nagios; fi --- munin-1.2.6.orig/debian/munin.dirs +++ munin-1.2.6/debian/munin.dirs @@ -0,0 +1,2 @@ +var/www/munin +var/lib/munin --- munin-1.2.6.orig/debian/munin.logrotate +++ munin-1.2.6/debian/munin.logrotate @@ -0,0 +1,35 @@ +/var/log/munin/munin-update.log { + daily + missingok + rotate 7 + compress + notifempty + create 640 munin adm +} + +/var/log/munin/munin-graph.log { + daily + missingok + rotate 7 + compress + notifempty + create 640 munin adm +} + +/var/log/munin/munin-html.log { + daily + missingok + rotate 7 + compress + notifempty + create 640 munin adm +} + +/var/log/munin/munin-limits.log { + daily + missingok + rotate 7 + compress + notifempty + create 640 munin adm +} --- munin-1.2.6.orig/debian/munin-node.cron.d +++ munin-1.2.6/debian/munin-node.cron.d @@ -0,0 +1,12 @@ +# +# cron-jobs for munin-node +# + +MAILTO=root + +# If the APT plugin is enabled, update packages databases approx. once +# an hour (12 invokations an hour, 1 in 12 chance that the update will +# happen), but ensure that there will never be more than two hour (7200 +# seconds) interval between updates.. +*/5 * * * * root if [ -x /etc/munin/plugins/apt_all ]; then /etc/munin/plugins/apt_all update 7200 12 >/dev/null; elif [ -x /etc/munin/plugins/apt ]; then /etc/munin/plugins/apt update 7200 12 >/dev/null; fi + --- munin-1.2.6.orig/debian/control +++ munin-1.2.6/debian/control @@ -0,0 +1,78 @@ +Source: munin +Section: net +Priority: optional +Maintainer: Munin Debian Maintainers +Uploaders: Tore Anderson , Dagfinn Ilmari Mannsaker , Loic Dachary (OuoU) , Matthias Schmitz , Holger Levsen +Build-Depends-Indep: perl, htmldoc, html2text +Build-Depends: debhelper (>=5.0.42), quilt +Standards-Version: 3.8.1 +Homepage: http://munin.projects.linpro.no +Vcs-svn: svn://munin.projects.linpro.no/munin/ +Vcs-Browser: http://munin.projects.linpro.no/browser + +Package: munin-node +Architecture: all +Depends: ${perl:Depends}, ${misc:Depends}, libnet-server-perl, procps, adduser, lsb-base (>= 3.2-4), gawk +Recommends: libnet-snmp-perl +Suggests: munin, munin-plugins-extra, libwww-perl, liblwp-useragent-determined-perl, libnet-irc-perl, mysql-client, smartmontools (>= 5.37-6~bpo40+1), acpi | lm-sensors, python, ethtool, libdbd-pg-perl, net-tools +Description: network-wide graphing framework (node) + Munin is a highly flexible and powerful solution used to create graphs of + virtually everything imaginable throughout your network, while still + maintaining a rattling ease of installation and configuration. + . + This package contains the daemon for the nodes being monitored. You should + install it on all the nodes in your network. It will know how to extract all + sorts of data from the node it runs on, and will wait for the gatherer to + request this data for further processing. + . + It includes a range of plugins capable of extracting common values such as cpu + usage, network usage, load average, and so on. Creating your own plugins which + are capable of extracting other system-specific values is very easy, and is + often done in a matter of minutes. You can also create plugins which relay + information from other devices in your network that can't run Munin, such as a + switch or a server running another operating system, by using SNMP or similar + technology. + . + Munin is written in Perl, and relies heavily on Tobi Oetiker's excellent + RRDtool. To see a real example of Munin in action, you can follow a link + from to a live installation. + +Package: munin-plugins-extra +Architecture: all +Depends: ${perl:Depends}, ${misc:Depends}, munin-node +Suggests: logtail, libnet-netmask-perl +Description: network-wide graphing framework (user contributed plugins for node) + Munin is a highly flexible and powerful solution used to create graphs of + virtually everything imaginable throughout your network, while still + maintaining a rattling ease of installation and configuration. + . + This package contains unsupported plugins for the Munin node, contributed by + various users of Munin. + . + Munin is written in Perl, and relies heavily on Tobi Oetiker's excellent + RRDtool. To see a real example of Munin in action, you can follow a link + from to a live installation. + +Package: munin +Architecture: all +Depends: ${perl:Depends}, ${misc:Depends}, perl-modules | libparse-recdescent-perl, librrds-perl, libhtml-template-perl, libdigest-md5-perl, libtime-hires-perl, libstorable-perl, rrdtool, adduser +Recommends: munin-node, libdate-manip-perl +Suggests: www-browser, httpd +Description: network-wide graphing framework (grapher/gatherer) + Munin is a highly flexible and powerful solution used to create graphs of + virtually everything imaginable throughout your network, while still + maintaining a rattling ease of installation and configuration. + . + This package contains the grapher/gatherer. You will only need one instance of + it in your network. It will periodically poll all the nodes in your network + it's aware of for data, which it in turn will use to create graphs and HTML + pages, suitable for viewing with your graphical web browser of choice. + . + It is also able to alert you if any value is outside of a preset boundary, + useful if you want to be alerted if a filesystem is about to grow full, for + instance. You can do this by making Munin run an arbitrary command when you + need to be alert it, or make use of the intrinsic Nagios support. + . + Munin is written in Perl, and relies heavily on Tobi Oetiker's excellent + RRDtool. To see a real example of Munin in action, you can follow a link + from to a live installation. --- munin-1.2.6.orig/debian/munin.README.Debian +++ munin-1.2.6/debian/munin.README.Debian @@ -0,0 +1,25 @@ +Debian-specific information regarding Munin +=========================================== + + Find the upstream source + ------------------------ + This Debian package uses the upstream tarball located here: + http://sourceforge.net/projects/munin/ . + + It also uses quilt to apply some debian specific patches located in + ./debian/patches/ + + + Suggestions? Impressions? Questions? Fanmail? Love letters? Murder threats? + --------------------------------------------------------------------------- + + We've got a mailing list. You'll find subscription information at + . All feedback + are welcome. + + If you feel like sending us things that can't be represented in binary (for + example beautiful women fluent in assembly, bacillus anthracis, cash, + explosives, and so on), take contact off-list, and we'll find a way of + arranging the logistics. + + Enjoy! :-) --- munin-1.2.6.orig/debian/NEWS +++ munin-1.2.6/debian/NEWS @@ -0,0 +1,221 @@ +munin (1.2.6-2) unstable; urgency=low + + * Build the binary package 'munin-plugins-extra' with user contributed + plugins (again) by default. Though previously this package was called + 'munin-plugins-contrib'. It was renamed to avoid confusion about the term + 'contrib' which is used in Debian with a different meaning. + + -- Matthias Schmitz Tue, 01 Jul 2008 19:06:20 +0200 + +munin (1.2.5-1) unstable; urgency=low + + * Thanks to Marc Haber the Debian build scripts are now able to build a + custom package called "munin-plugins-contrib", which will contain some + user-contributed plugins that aren't included in the "munin-node" package. + + To enable the build of this package, the environment variable + DEB_BUILD_OPTIONS must contain the string "munin:build-contrib-pkg". + The following commands ought to do the trick for most users: + + export DEB_BUILD_OPTIONS="$DEB_BUILD_OPTIONS munin:build-contrib-pkg" + apt-get build-dep munin + apt-get --build source munin + dpkg --install munin-plugins-contrib_*_all.deb + + It is not included in the Debian distribution. Bugs should therefore be + reported to the upstream bug tracker at . + + -- Tore Anderson Tue, 17 Oct 2006 14:39:05 +0200 + +munin (1.2.2-1) unstable; urgency=low + + * The "contrib" plugins are not supported from upstream, and have therefore + been removed from the package. They have not been through a thorough QA + review, and could therefore contain security holes or simply not work as + expected. + + The removed plugins are: + + amavis apc_envunit_ apc_nis bind9 bind9_rndc courier_ dhcpd3 + exim_mailqueue_alt files_ foldingathome foldingathome_rank + foldingathome_wu hddtemp2 hddtempd hddtemp i2c_fan i2c iostat_ios ipac-ng + mailman mailscanner mbmon_ mhttping named netopia nut_misc nut_volts + perdition pm3users_ pop_stats samba spamstats surfboard users + + Most of these who turn out to be well-written and of general interest, will + likely make their way back into the package as auto or manual at a later + release. If you have been using any of these, you should consider aborting + the upgrade, and copy the plugins you use from /usr/share/munin/plugins/ to + /etc/munin/plugins/ (overwriting the symlink). That way, they will not be + touched during the upgrade. + + You may also download them from . + + -- Tore Anderson Sun, 13 Mar 2005 00:28:49 +0100 + +munin (1.2.0-1) unstable; urgency=low + + * There are two major bugfixes in the 1.2.x series of Munin since 1.0.x that + could not be accomplished without introducing a risk of losing historical + data after upgrades. Or more precisely: no data will be lost, but the + exact name of the RRD file will change, so that the update process will + start collecting data into a new, emtpy, file, which in turn will be read + by munin-graph, and the final result is that the graph will appear to have + lost all data. The historical data will still be present in the old graph. + + In the last two sections of this file I will attempt to detail how you can + minimize the data loss by carefully planning how to perform the upgrade. + + * The infrastructure for sending warnings if values drop below or rise above + preset boundaries has been redesigned to improve flexibility, and are no + longer specific to NSCA/Nagios. The old nsca_* settings are still + recognized, and are automatically mapped into a contact with the name + "old-nagios". Hence the now deprecated munin.conf entries + + nsca /bin/nsca + nsca_server sloth.fud.no + nsca_config /etc/nsca.cf + + would implicitly be converted to the entry + + contact.old-nagios.command /bin/nsca sloth.fud.no -c /etc/nsca.cf -to 60 + + unless the latter was explicitly defined in /etc/munin/munin.conf, in which + case the deprecated entries would be ignored. + + * Data loss issue 1 + ================= + + A number of plugins which in the 1.0.x series used the COUNTER data type + has now been changed to use the DERIVE type, with a minimum of 0. The + reason is to hinder RRDtool from misdetecting counter wraps when a service + or machine is restarted, which resulted in abnormal spikes in those graphs. + + The munin-update component from the 1.2.x series are able to recognize that + a plugin has changed thusly, and will automatically copy all the historic + data from the old RRD file into the new one, ensuring a smooth transition. + However, the munin-update component from the 1.0.x series are not aware of + this, and will react to this data type change by starting to collect data + into a new, empty, RRD file. + + The method to ensure a painless upgrade is simple: + + Ensure that you upgrade the "munin" package BEFORE you upgrade the + ================================================================== + "munin-node" package on any of the hosts it collects data from. + =============================================================== + + Should you however have already upgraded the packages in the wrong order, + you may salvage your graphs by manually change the data type in the old + RRD file, and afterwards rename it. For instance, you may have this RRD + file containing the "user" field from the "cpu" plugin of munin-node 1.0.x: + + /var/lib/munin/fud.no/lust.fud.no-cpu-user-c.rrd + + After upgrading to version 1.2.x of munin-node, this will have changed to: + + /var/lib/munin/fud.no/lust.fud.no-cpu-user-d.rrd + + If the "munin" package wasn't upgraded before "munin-node" one, you will + have both files, and the latter one will only contain the data gathered + since the upgrade of the "munin-node" package. In order to make the old + data reappear in the graph, you may do so using the following procedure: + + cd /var/lib/munin/fud.no + rrdtool tune lust.fud.no-cpu-user-c.rrd -d 42:DERIVE + mv -f lust.fud.no-cpu-user-c.rrd lust.fud.no-cpu-user-d.rrd + + You will have to repeat this process once for each field in each affected + plugin. Also remember to ensure that the "munin" system user have write + access to the resulting RRD file when you are finished. Be warned, + however, that by doing this you will lose all data collected since + munin-node was upgraded to version 1.2.x. + + * Data loss issue 2 + ================= + + The 1.0.x series had rather nasty design flaw that caused field names + longer than 18 characters be truncated, removing any excessive characters + from the start of the field name. This led to a nasty bug; if a plugin + reported values for two fields, who both had long names where the last 18 + charaters were the same, only one RRD file would be generated, and its + contents would be unpredictable. The 1.2.x series do not exhibit this + behaviour, and will store the entire field name as part of the RRD file + name. As this leads to the fact that a new, empty, file will be created + with the non-truncated field name, the graphs will appear to have been + reset. + + To solve this you need to manually figure out which RRD files are affected, + and rename them so that they are called what the new version of Munin + expects them to. To figure out which files may be affected, you can + do the following: + + cd /var/lib/munin + ls */*.rrd | awk '-F[/-]' '{if(length($4)==18) print}' + + This will output one line for each file that may be affected, for instance: + + fud.no/pride.fud.no-df-v_mapper_pride_usr-g.rrd + + The three first strings separated by hyphens in the filename is the + interesting ones. The first is the host as named in /etc/munin/munin.conf, + the second is the plugin name, and the third is the possibly mangled field + name. I say "possibly", because any RRD files with a field name that is + exactly 18 characters long will also be reported, even though they are not + affected by the change. To figure out if the file is indeed affected, and + what the new name should be, you need to ask the host's Munin-node process. + + First, you need to figure out the DNS hostname or IP address of the node, + unless you already know it. This information can be found in the file + /etc/munin/munin.conf, and will for this example look like this: + + [pride.fud.no] + address 127.0.0.1 + + Next, connect to the host's Munin-node process: + + telnet 127.0.0.1 munin + + After receiving the welcoming "# munin node at pride.fud.no" banner, input: + + fetch df + + "df" is of course the plugin name as found embedded in the RRD file name + above. You should now get the values reported by the plugin in return: + + _dev_hda5.value 54 + _dev_mapper_pride_usr.value 88 + _dev.value 54 + + The field names are the strings before the periods. At this point the + correct field name is obvious - the truncated field name + "v_mapper_pride_usr" is the last 18 characters of "_dev_mapper_pride_usr", + so the latter must be the correct one. Now that you know that, you can + rename the RRD file so that the new version can find it: + + cd /var/lib/munin/fud.no + mv pride.fud.no-df-v_mapper_pride_usr-g.rrd \ + pride.fud.no-df-_dev_mapper_pride_usr-g.rrd + + If you find no possible matches, it may be because the RRD file contains + data that are no longer collected, which could've happened in this example + if the filesystem in /dev/mapper/pride-usr was unmounted in the past. + To find out if that is the case, look at the time stamp of the file to + see when it was last modified. If that's a long time ago, chances are the + file isn't used anyway and can be left alone. + + If you're really unfortunate, you may end up with multiple possibilities, + which could've happened in the example used here if both a device named + /udev/mapper/pride-usr and also one named /dev/mapper/pride-usr was mounted + simultaneously. If this is the case, you can't do anything but inspect the + relevant graph as created with Munin 1.0 to see if the field seems to + contain the correct data for at least one of the fields, and rename the RRD + accordingly. However, there is a possibility that the RRD will contain + useless data that isn't correct for either of the fields. In any case, you + won't be able to bring back correct data for both the fields, as it wasn't + collected properly to begin with. + + You will have to repeat the process for every possibly affected RRD file, + after which you may safely upgrade your "munin" package. + + -- Tore Anderson Mon, 21 Feb 2005 00:16:25 +0100 --- munin-1.2.6.orig/debian/munin-node.dirs +++ munin-1.2.6/debian/munin-node.dirs @@ -0,0 +1 @@ +etc/munin/plugins --- munin-1.2.6.orig/debian/munin.manpages +++ munin-1.2.6/debian/munin.manpages @@ -0,0 +1,7 @@ +build/doc/munin-cron.8 +build/doc/munin-graph.8 +build/doc/munin-html.8 +build/doc/munin-limits.8 +build/doc/munin-update.8 +build/doc/munin.conf.5 +build/doc/munin.8 --- munin-1.2.6.orig/debian/copyright +++ munin-1.2.6/debian/copyright @@ -0,0 +1,67 @@ +Munin is maintained for Debian by Tore Anderson . + +The upstream source is available from . + +Lead developers include: + + Audun Ytterdal + Jimmy Olsen + Tore Anderson + Knut Haugen + Ingvar Hagelund + +Munin is licensed under the terms of the GNU General Public License, version 2. +A verbatim copy of this license is found in the file + + `/usr/share/common-licenses/GPL-2' + +on every Debian GNU/Linux system. + +The font Bitstream Vera Mono is bundled with this package, and is distributed +under the following licence: + + Copyright (C) 2003 Bitstream, Inc. + All Rights Reserved. Bitstream Vera is a trademark of Bitstream, Inc. + + Permission is hereby granted, free of charge, to any person obtaining a + copy of the fonts accompanying this license ("Fonts") and associated + documentation files (the "Font Software"), to reproduce and distribute + the Font Software, including without limitation the rights to use, copy, + merge, publish, distribute, and/or sell copies of the Font Software, and + to permit persons to whom the Font Software is furnished to do so, + subject to the following conditions: + + The above copyright and trademark notices and this permission notice + shall be included in all copies of one or more of the Font Software + typefaces. + + The Font Software may be modified, altered, or added to, and in + particular the designs of glyphs or characters in the Fonts may be + modified and additional glyphs or characters may be added to the Fonts, + only if the fonts are renamed to names not containing either the words + "Bitstream" or the word "Vera". + + This License becomes null and void to the extent applicable to Fonts or + Font Software that has been modified and is distributed under the + "Bitstream Vera" names. + + The Font Software may be sold as part of a larger software package but + no copy of one or more of the Font Software typefaces may be sold by + itself. + + THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL + BITSTREAM OR THE GNOME FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, + OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR + OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT + SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. + + Except as contained in this notice, the names of Gnome, the Gnome + Foundation, and Bitstream Inc., shall not be used in advertising or + otherwise to promote the sale, use or other dealings in this Font + Software without prior written authorization from the Gnome Foundation + or Bitstream Inc., respectively. For further information, contact: + . --- munin-1.2.6.orig/debian/compat +++ munin-1.2.6/debian/compat @@ -0,0 +1 @@ +5 --- munin-1.2.6.orig/debian/README.source +++ munin-1.2.6/debian/README.source @@ -0,0 +1,53 @@ +# +# getting the upstream sources (and putting them in svn): +# + +New upstream tarballs are located here http://sourceforge.net/projects/munin/ +old tarballs are available at munin.projects.linpro.no/munin/branches/debian/lenny/tarballs +too. +Please put them in svn with signed md5- and sha1sum-files. + +# +# Debian specific patches +# +Debian specific patches reside in debian/patches/ and are applied with quilt. + +# +# using svn-buildpackage +# +cd trunk/ +svn-buildpackage + +# +# using svn-buildpackage with pbuilder and cowbuilder +# + +svn-pdebuild is an alias for: +"svn-buildpackage --svn-builder=pdebuild --pbuilder cowbuilder" + +Here a small readme in order to use this svn properly: + +I'm used to this aliases to ease my life: + pclean='sudo rm -rf /var/cache/pbuilder/result/*' + pdebuild='pdebuild --pbuilder cowbuilder' + pdebuild-etch='pdebuild --pbuilder cowbuilder -- --basepath /var/cache/pbuilder/etch.cow/ --debian-etch-workaround' + pdebuild-lenny='pdebuild --pbuilder cowbuilder -- --basepath /var/cache/pbuilder/base-lenny.cow/' + plinda='linda /var/cache/pbuilder/result/*.changes' + plintian='lintian /var/cache/pbuilder/result/*.changes' + plogin='sudo cowbuilder --login' + pupdate='sudo cowbuilder --update' + pupdate-etch='sudo cowbuilder --update --basepath /var/cache/pbuilder/etch.cow/ --debian-etch-workaround' + pupdate-lenny='sudo cowbuilder --update --basepath /var/cache/pbuilder/base-lenny.cow/' + svn-debuild='svn-buildpackage -rfakeroot -us -uc' + svn-pdebuild='svn-buildpackage --svn-builder=pdebuild --pbuilder cowbuilder' + svn-pdebuild-etch='svn-buildpackage --svn-builder=pdebuild --pbuilder cowbuilder -- --basepath /var/cache/pbuilder/etch.cow --debian-etch-workaround' + +So for building this package go to trunk/ and call there e.g.: + svn-debuild (Build on the host system) +or + svn-pdebuild (Build in a chroot using cowdancer) + +In the first case the resulting files are found in ../build-area, in the +second case the resulting files are found in /var/cache/pbuilder/result/ + +I hope this helps to get this package build from svn :) --- munin-1.2.6.orig/debian/munin.postinst +++ munin-1.2.6/debian/munin.postinst @@ -0,0 +1,42 @@ +#! /bin/sh + +set -e + +prevver="$2" + +add_munin_system_user() { + if ! getent passwd munin >/dev/null; then + adduser --group --system --no-create-home \ + --home /var/lib/munin munin; + fi + # workaround bug (#531021) in xen-tools + if ! getent group munin >/dev/null; then + addgroup --system munin + adduser munin munin + fi +} + +fixperms() { + dpkg-statoverride --list /var/log/munin >/dev/null || \ + dpkg-statoverride --update --add munin adm 0750 /var/log/munin + dpkg-statoverride --list /var/www/munin >/dev/null || \ + dpkg-statoverride --update --add munin munin 0755 /var/www/munin + dpkg-statoverride --list /var/lib/munin >/dev/null || \ + dpkg-statoverride --update --add munin munin 0755 /var/lib/munin +} + +case "$1" in + configure) + add_munin_system_user + fixperms + ;; + abort-upgrade|abort-deconfigure|abort-remove) + : + ;; + *) + echo "Called with unknown argument $1, bailing out." + exit 1 + ;; +esac + +#DEBHELPER# --- munin-1.2.6.orig/debian/munin-node.init +++ munin-1.2.6/debian/munin-node.init @@ -0,0 +1,209 @@ +#! /bin/bash + +### BEGIN INIT INFO +# Provides: munin-node +# Required-Start: $local_fs $remote_fs +# Required-Stop: $local_fs $remote_fs +# Should-Start: $all +# Should-Stop: $all +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start/stop Munin-Node +# Description: Start/stop Munin-Node +### END INIT INFO + +PATH=/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/sbin/munin-node +PIDFILE=/var/run/munin/munin-node.pid +CONFFILE=/etc/munin/munin-node.conf + +# log_daemon_msg() and log_progress_msg() isn't present in present in Sarge. +# Below is a copy of them from lsb-base 3.0-5, for the convenience of back- +# porters. If the installed version of lsb-base provides these functions, +# they will be used instead. + +log_daemon_msg () { + if [ -z "$1" ]; then + return 1 + fi + + if [ -z "$2" ]; then + echo -n "$1:" + return + fi + + echo -n "$1: $2" +} + +log_progress_msg () { + if [ -z "$1" ]; then + return 1 + fi + echo -n " $@" +} + +. /lib/lsb/init-functions +[ -r /etc/default/munin-node ] && . /etc/default/munin-node + +if [ ! -x $DAEMON ]; then + log_failure_msg "Munin-Node appears to be uninstalled." + exit 5 +elif [ ! -e $CONFFILE ]; then + log_failure_msg "Munin-Node appears to be unconfigured." + exit 6 +fi + +# Figure out if the pid file is in a non-standard location +while read line; do + line=${line%%\#*} # get rid of comments + set -f + line=$(echo $line) # get rid of extraneous blanks + set +f + if [ "$line" != "${line#pid_file }" ]; then + PIDFILE=${line#pid_file } + fi +done < $CONFFILE + +verify_superuser() { + action=$1 + [ $EUID -eq 0 ] && return + log_failure_msg "Superuser privileges required for the" \ + "\"$action\" action." + exit 4 +} + +start() { + log_daemon_msg "Starting Munin-Node" + mkdir -p /var/run/munin + chown munin:root /var/run/munin + chmod 0755 /var/run/munin + if pidofproc -p $PIDFILE $DAEMON >/dev/null; then + log_progress_msg "started beforehand" + log_end_msg 0 + exit 0 + fi + start_daemon -p $PIDFILE $DAEMON $DAEMON_ARGS + ret=$? + # start_daemon() isn't thorough enough, ensure the daemon has been + # started manually + attempts=0 + until pidofproc -p $PIDFILE $DAEMON >/dev/null; do + attempts=$(( $attempts + 1 )) + sleep 0.05 + [ $attempts -lt 20 ] && continue + log_end_msg 1 + return 1 + done + [ $ret -eq 0 ] && log_progress_msg "done" + log_end_msg $ret + return $ret +} + +stop() { + log_daemon_msg "Stopping Munin-Node" + # killproc() doesn't try hard enough if the pid file is missing, + # so create it is gone and the daemon is still running + if [ ! -r $PIDFILE ]; then + pid=$(pidofproc -p $PIDFILE $DAEMON) + if [ -z "$pid" ]; then + log_progress_msg "stopped beforehand" + log_end_msg 0 + return 0 + fi + echo $pid 2>/dev/null > $PIDFILE + if [ $? -ne 0 ]; then + log_end_msg 1 + return 1 + fi + fi + killproc -p $PIDFILE /usr/bin/munin-node + ret=$? + # killproc() isn't thorough enough, ensure the daemon has been + # stopped manually + attempts=0 + until ! pidofproc -p $PIDFILE $DAEMON >/dev/null; do + attempts=$(( $attempts + 1 )) + sleep 0.05 + [ $attempts -lt 20 ] && continue + log_end_msg 1 + return 1 + done + [ $ret -eq 0 ] && log_progress_msg "done" + log_end_msg $ret + return $ret +} + +if [ "$#" -ne 1 ]; then + log_failure_msg "Usage: /etc/init.d/munin-node" \ + "{start|stop|restart|force-reload|try-restart}" + exit 2 +fi + +case "$1" in + start) + verify_superuser $1 + start + exit $? + ;; + stop) + verify_superuser $1 + stop + exit $? + ;; + restart|force-reload) + verify_superuser $1 + stop || exit $? + start + exit $? + ;; + try-restart) + verify_superuser $1 + pidofproc -p $PIDFILE $DAEMON >/dev/null + if [ $? -eq 0 ]; then + stop || exit $? + start + exit $? + fi + log_success_msg "Munin-Node was stopped beforehand and thus not" \ + "restarted." + exit 0 + ;; + reload) + log_failure_msg "The \"reload\" action is not implemented." + exit 3 + ;; + status) + pid=$(pidofproc -p $PIDFILE $DAEMON) + ret=$? + pid=${pid% } # pidofproc() supplies a trailing space, strip it + if [ $ret -eq 0 ]; then + log_success_msg "Munin-Node is running (PID: $pid)" + exit 0 + # the LSB specifies that I in this case (daemon dead + pid file exists) + # should return 1, however lsb-base returned 2 in this case up to and + # including version 3.1-10 (cf. #381684). Since that bug is present + # in Sarge, Ubuntu Dapper, and (at the time of writing) Ubuntu Etch, + # and taking into account that later versions of pidofproc() do not + # under any circumstance return 2, I'll keep understanding invalid + # return code for the time being, even though the LSB specifies it is + # to be used for the situation where the "program is dead and /var/lock + # lock file exists". + elif [ $ret -eq 1 ] || [ $ret -eq 2 ]; then + log_failure_msg "Munin-Node is dead, although $PIDFILE exists." + exit 1 + elif [ $ret -eq 3 ]; then + log_warning_msg "Munin-Node is not running." + exit 3 + fi + log_warning_msg "Munin-Node status unknown." + exit 4 + ;; + *) + log_failure_msg "Usage: /etc/init.d/munin-node" \ + "{start|stop|restart|force-reload|try-restart}" + exit 2 + ;; +esac + +log_failure_msg "Unexpected failure, please file a bug." +exit 1 --- munin-1.2.6.orig/debian/munin.docs +++ munin-1.2.6/debian/munin.docs @@ -0,0 +1,3 @@ +build/doc/munin-faq.* +build/doc/munin-doc.* +build/README-apache-cgi --- munin-1.2.6.orig/debian/munin-node.docs +++ munin-1.2.6/debian/munin-node.docs @@ -0,0 +1,2 @@ +build/doc/munin-faq.* +build/doc/munin-doc.* --- munin-1.2.6.orig/debian/munin-node.manpages +++ munin-1.2.6/debian/munin-node.manpages @@ -0,0 +1,6 @@ +build/doc/munin-node.conf.5 +build/doc/munin-node.8 +build/doc/munin-node-configure.8 +build/doc/munin-node-configure-snmp.8 +build/doc/munin-run.8 +build/doc/munindoc.1 --- munin-1.2.6.orig/debian/patches/510-fix-bashisms +++ munin-1.2.6/debian/patches/510-fix-bashisms @@ -0,0 +1,65 @@ +# fixes #530147, has been applied upstream +Index: munin-1.2.6/node/node.d.linux/netopia.in +=================================================================== +--- munin-1.2.6.orig/node/node.d.linux/netopia.in ++++ munin-1.2.6/node/node.d.linux/netopia.in +@@ -23,8 +23,10 @@ + # Cleanups and log entries + # + ++hostname="$(hostname)" ++ + if [ "$1" = "config" ]; then +- echo "host_name $HOSTNAME" ++ echo "host_name $hostname" + echo "graph_order down up" + echo "graph_title ADSL Traffic" + echo 'graph_args --base 1000' +@@ -45,6 +47,6 @@ if [ "$1" = "config" ]; then + fi; + + echo -n "down.value " +-snmpget -Ov $HOSTNAME $COMMUNITY interfaces.ifTable.ifEntry.ifInOctets.3 | sed 's/^.*: //' ++snmpget -Ov $hostname $COMMUNITY interfaces.ifTable.ifEntry.ifInOctets.3 | sed 's/^.*: //' + echo -n "up.value " +-snmpget -Ov $HOSTNAME $COMMUNITY interfaces.ifTable.ifEntry.ifOutOctets.3 | sed 's/^.*: //' ++snmpget -Ov $hostname $COMMUNITY interfaces.ifTable.ifEntry.ifOutOctets.3 | sed 's/^.*: //' +Index: munin-1.2.6/node/node.d/exim_mailqueue_alt.in +=================================================================== +--- munin-1.2.6.orig/node/node.d/exim_mailqueue_alt.in ++++ munin-1.2.6/node/node.d/exim_mailqueue_alt.in +@@ -39,7 +39,7 @@ EXIM=${exim:-$EXIM} + QUEUEWARN=${queuewarn:-100} + QUEUECRIT=${queuecrit:-200} + +-if [ "$1" == "config" ]; then ++if [ "$1" = "config" ]; then + echo 'graph_title Exim mailqueue' + echo 'graph_args --base 1000 -l 0' + echo 'graph_vlabel mails in queue' +Index: munin-1.2.6/node/node.d/foldingathome_rank.in +=================================================================== +--- munin-1.2.6.orig/node/node.d/foldingathome_rank.in ++++ munin-1.2.6/node/node.d/foldingathome_rank.in +@@ -31,7 +31,7 @@ if [ "$1" = "config" ]; then + fi + + rank=`wget "http://vspx27.stanford.edu/cgi-bin/main.py?qtype=userpage&username=8d" -q -t 1 -T 5 -O - | egrep " [0-9]* of [0-9]* " | sed 's/.* \([0-9]*\) .*/\1/'` +-if [ "$rank" == "" ]; then ++if [ "$rank" = "" ]; then + if [ -f $statefile ]; then + echo rank.value `cat $statefile` + fi +Index: munin-1.2.6/node/node.d/foldingathome_wu.in +=================================================================== +--- munin-1.2.6.orig/node/node.d/foldingathome_wu.in ++++ munin-1.2.6/node/node.d/foldingathome_wu.in +@@ -31,7 +31,7 @@ fi + + wu=`wget "http://vspx27.stanford.edu/cgi-bin/main.py?qtype=userpage&username=8d" -q -t 1 -T 5 -O - | egrep -A 2 " WU" | grep "" | sed 's/.* \([0-9]*\) .*/\1/'` + +-if [ "$wu" == "" ]; then ++if [ "$wu" = "" ]; then + if [ -f $statefile ]; then + echo wu.value `cat $statefile` + fi --- munin-1.2.6.orig/debian/patches/110-node.d-tomcat_jvm.patch +++ munin-1.2.6/debian/patches/110-node.d-tomcat_jvm.patch @@ -0,0 +1,111 @@ +Index: munin-1.2.6/node/node.d/tomcat_jvm.in +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ munin-1.2.6/node/node.d/tomcat_jvm.in 2008-06-12 00:28:38.000000000 +0200 +@@ -0,0 +1,106 @@ ++#!@@PERL@@ ++# ++# Plugin to monitor the memory of the JVM in Tomcat servers. ++# ++# Author: Rune Nordbøe Skillingstad ++# ++# Requirements: ++# - Needs access to http://:@localhost:8080/manager/status?XML=true (or modify the ++# address for another host). A munin-user in $CATALINA_HOME/conf/tomcat-users.xml ++# should be set up for this to work. ++# ++# Tip: To see if it's already set up correctly, just run this plugin ++# with the parameter "autoconf". If you get a "yes", everything should ++# work like a charm already. ++# ++# tomcat-users.xml example: ++# ++# ++# Parameters supported: ++# ++# config ++# autoconf ++# ++# Configurable variables ++# ++# timeout - Connection timeout ++# url - Override default status-url ++# ports - HTTP port numbers ++# user - Manager username ++# password - Manager password ++# ++# Magic markers: ++#%# family=auto ++#%# capabilities=autoconf ++ ++use strict; ++ ++my $ret = undef; ++ ++if(!eval "require LWP::UserAgent;") { ++ $ret = "LWP::UserAgent not found"; ++} ++ ++if(!eval "require XML::Simple;") { ++ $ret .= "XML::Simple not found"; ++} ++ ++my $URL = exists $ENV{'url'} ? $ENV{'url'} : "http://%s:%s\@127.0.0.1:%d/manager/status?XML=true"; ++my $PORT = exists $ENV{'ports'} ? $ENV{'ports'} : 8080; ++my $USER = exists $ENV{'user'} ? $ENV{'user'} : "munin"; ++my $PASSWORD = exists $ENV{'password'} ? $ENV{'password'} : "munin"; ++my $TIMEOUT = exists $ENV{'timeout'} ? $ENV{'timeout'} : 30; ++ ++my $url = sprintf $URL, $USER, $PASSWORD, $PORT; ++ ++if(exists $ARGV[0] and $ARGV[0] eq "autoconf") { ++ if($ret) { ++ print "no ($ret)\n"; ++ exit 1; ++ } ++ my $au = LWP::UserAgent->new(timeout => $TIMEOUT); ++ my $repsonse = $au->request(HTTP::Request->new('GET',$url)); ++ if($repsonse->is_success and $repsonse->content =~ /.*<\/status>/im) { ++ print "yes\n"; ++ exit 0; ++ } else { ++ print "no (no tomcat status)\n"; ++ exit 1; ++ } ++} ++ ++if(exists $ARGV[0] and $ARGV[0] eq "config") { ++ print "graph_title Tomcat JVM memory\n"; ++ print "graph_args --base 1024 -l 0\n"; ++ print "graph_vlabel Bytes\n"; ++ print "graph_category tomcat\n"; ++ print "graph_order free used max\n"; ++ print "free.label free bytes\n"; ++ print "free.draw AREA\n"; ++ print "used.label used bytes \n"; ++ print "used.draw STACK\n"; ++ print "max.label maximum bytes\n"; ++ print "max.draw LINE2\n"; ++ exit 0; ++} ++ ++my $ua = LWP::UserAgent->new(timeout => $TIMEOUT); ++my $xs = new XML::Simple; ++my $response = $ua->request(HTTP::Request->new('GET',$url)); ++my $xml = $xs->XMLin($response->content); ++ ++if($xml->{'jvm'}->{'memory'}->{'free'} && ++ $xml->{'jvm'}->{'memory'}->{'total'} && ++ $xml->{'jvm'}->{'memory'}->{'max'}) { ++ print "free.value " . $xml->{'jvm'}->{'memory'}->{'free'} . "\n"; ++ print "used.value " . ++ ($xml->{'jvm'}->{'memory'}->{'total'} - ++ $xml->{'jvm'}->{'memory'}->{'free'}) . "\n"; ++ print "max.value " . $xml->{'jvm'}->{'memory'}->{'max'} . "\n"; ++} else { ++ print "free.value U\n"; ++ print "used.value U\n"; ++ print "max.value U\n"; ++} ++ ++# vim:syntax=perl --- munin-1.2.6.orig/debian/patches/460-munin-cgi-graph-mkdir.patch +++ munin-1.2.6/debian/patches/460-munin-cgi-graph-mkdir.patch @@ -0,0 +1,15 @@ +Index: munin-1.2.6/server/munin-html.in +=================================================================== +--- munin-1.2.6.orig/server/munin-html.in 2009-02-10 18:04:55.000000000 +0100 ++++ munin-1.2.6/server/munin-html.in 2009-02-10 18:06:36.000000000 +0100 +@@ -180,6 +180,10 @@ + push @nodeorder, $n; + } + } ++ unless (-d "$config->{htmldir}/$domain" ) { ++ mkdir("$config->{htmldir}/$domain") or ++ die "Cannot mkdir $config->{htmldir}/$domain: $!"; ++ } + for my $node (@nodeorder) { + logger("processing node: $node"); + my %node; --- munin-1.2.6.orig/debian/patches/270-Plugin.pm-typo.patch +++ munin-1.2.6/debian/patches/270-Plugin.pm-typo.patch @@ -0,0 +1,22 @@ +Index: munin-1.2.6/node/Plugin.pm.in +=================================================================== +--- munin-1.2.6.orig/node/Plugin.pm.in 2008-07-07 13:30:29.000000000 +0200 ++++ munin-1.2.6/node/Plugin.pm.in 2008-07-07 13:30:51.000000000 +0200 +@@ -303,7 +303,7 @@ + } + + +-=head ($file_handle,$rotated) = tail_open($file_name,$position) ++=head3 ($file_handle,$rotated) = tail_open($file_name,$position) + + Open the given file and seek to the given position. If this position + is beyond the end of the file the function assumes that the file has +@@ -352,7 +352,7 @@ + return ($fh,$filereset); + } + +-=head $position = tail_close($file_handle) ++=head3 $position = tail_close($file_handle) + + Close the the file and return the current position in the file. This + position should be put in a state vector and stored in a state file --- munin-1.2.6.orig/debian/patches/350-munin-run-usage-fix.patch +++ munin-1.2.6/debian/patches/350-munin-run-usage-fix.patch @@ -0,0 +1,16 @@ +Index: munin-1.2.6/node/munin-run.in +=================================================================== +--- munin-1.2.6.orig/node/munin-run.in 2008-08-13 01:16:17.000000000 +0200 ++++ munin-1.2.6/node/munin-run.in 2008-08-13 01:17:21.000000000 +0200 +@@ -97,9 +97,9 @@ + "paranoia!" => \$paranoia, + "help" => \$do_usage ); + +-if ($do_usage) ++if ($do_usage or ! defined($ARGV[0])) + { +- print "Usage: $0 [options] ++ print "Usage: $0 [options] + + Options: + --help View this message. --- munin-1.2.6.orig/debian/patches/211-munin-manpage.patch +++ munin-1.2.6/debian/patches/211-munin-manpage.patch @@ -0,0 +1,64 @@ +Index: munin-1.2.6/server/munin.pod +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ munin-1.2.6/server/munin.pod 2009-04-02 22:48:57.000000000 +0200 +@@ -0,0 +1,38 @@ ++=head1 NAME ++ ++munin - Munin manpage hub ++ ++=head1 DESCRIPTION ++ ++Munin is a group of programs to gather data from hosts, graph them, ++create html-pages, and optionally warn contacts about any off-limit ++values. ++ ++The Munin master contains the following programs: ++ munin-update - to gather data from machines running munin-node. ++ munin-graph - to create graphs from data contained in rrd-files. ++ munin-limits - to check for any off-limit values. ++ munin-html - to draw html-pages on an Munin installation ++ munin-cron - to batch other munin programs ++ ++=head1 SEE ALSO ++ ++For more information, see the man pages of the individual ++programs L, L, L, L, L or the Munin homepage L. ++ ++=head1 AUTHORS ++ ++Jimmy Olsen, Audun Ytterdal, Brian de Wolf, Nicolai Langfeldt ++ ++=head1 COPYRIGHT ++ ++Copyright (C) 2002-2008 Audun Ytterdal, Jimmy Olsen, Nicolai ++Langfeldt, Linpro AS and others. ++ ++This is free software; see the source for copying conditions. There is ++NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR ++PURPOSE. ++ ++This program is released under the GNU General Public License ++ ++=cut +Index: munin-1.2.6/Makefile +=================================================================== +--- munin-1.2.6.orig/Makefile 2009-04-02 22:48:08.000000000 +0200 ++++ munin-1.2.6/Makefile 2009-04-02 22:49:28.000000000 +0200 +@@ -114,6 +114,7 @@ + $(INSTALL) -m 0644 build/doc/munin-limits.8 $(MANDIR)/man8/ + $(INSTALL) -m 0644 build/doc/munin-html.8 $(MANDIR)/man8/ + $(INSTALL) -m 0644 build/doc/munin-cron.8 $(MANDIR)/man8/ ++ $(INSTALL) -m 0644 build/doc/munin.8 $(MANDIR)/man8/ + $(INSTALL) -m 0644 build/doc/munindoc.1 $(MANDIR)/man1/ + + install-doc: build-doc +@@ -208,6 +209,8 @@ + node/munin-node.conf.pod > build/doc/munin-node.conf.5 + pod2man --section=1 --release=$(RELEASE) --center="Munin Documentation" \ + build/node/munindoc > build/doc/munindoc.1 ++ pod2man --section=8 --release=$(RELEASE) --center="Munin Documentation" \ ++ server/munin.pod > build/doc/munin.8 + + touch build-man-stamp + --- munin-1.2.6.orig/debian/patches/490-node.d-asterisk-if.in +++ munin-1.2.6/debian/patches/490-node.d-asterisk-if.in @@ -0,0 +1,27 @@ +# fixed upstream +Index: munin-1.2.6/node/node.d.freebsd/if_.in +=================================================================== +--- munin-1.2.6.orig/node/node.d.freebsd/if_.in 2009-05-28 20:06:12.000000000 +0200 ++++ munin-1.2.6/node/node.d.freebsd/if_.in 2009-05-28 20:06:23.000000000 +0200 +@@ -47,7 +47,7 @@ + echo 'graph_args --base 1000' + echo 'graph_vlabel bits per ${graph_period} in (-) / out (+)' + echo 'graph_category network' +- echo "graph_info This graph shows the traffic of the $INTERFACE network interface. Please note that the traffic is shown in bits per second, not bytes. IMPORTANT: Since the data source for this plugin use 32bit counters, this plugin is really unreliable and unsuitable for most 100Mb (or faster) interfaces, where bursts are expected to exceed 50Mbps. This means that this plugin is usuitable for most production environments." ++ echo "graph_info This graph shows the traffic of the $INTERFACE network interface. Please note that the traffic is shown in bits per second, not bytes. IMPORTANT: Since the data source for this plugin use 32bit counters, this plugin is really unreliable and unsuitable for most 100Mb (or faster) interfaces, where bursts are expected to exceed 50Mbps. This means that this plugin is unsuitable for most production environments." + echo 'rbytes.label received' + echo 'rbytes.type COUNTER' + echo 'rbytes.graph no' +Index: munin-1.2.6/node/node.d.linux/if_.in +=================================================================== +--- munin-1.2.6.orig/node/node.d.linux/if_.in 2009-05-28 20:06:12.000000000 +0200 ++++ munin-1.2.6/node/node.d.linux/if_.in 2009-05-28 20:06:26.000000000 +0200 +@@ -107,7 +107,7 @@ + echo 'graph_args --base 1000' + echo 'graph_vlabel bits in (-) / out (+) per ${graph_period}' + echo 'graph_category network' +- echo "graph_info This graph shows the traffic of the $INTERFACE network interface. Please note that the traffic is shown in bits per second, not bytes. IMPORTANT: Since the data source for this plugin use 32bit counters, this plugin is really unreliable and unsuitable for most 100Mb (or faster) interfaces, where bursts are expected to exceed 50Mbps. This means that this plugin is usuitable for most production environments. To avoid this problem, use the ip_ plugin instead." ++ echo "graph_info This graph shows the traffic of the $INTERFACE network interface. Please note that the traffic is shown in bits per second, not bytes. IMPORTANT: Since the data source for this plugin use 32bit counters, this plugin is really unreliable and unsuitable for most 100Mb (or faster) interfaces, where bursts are expected to exceed 50Mbps. This means that this plugin is unsuitable for most production environments. To avoid this problem, use the ip_ plugin instead." + echo 'down.label received' + echo 'down.type COUNTER' + echo 'down.graph no' --- munin-1.2.6.orig/debian/patches/440-node.d.linux-iostat.patch +++ munin-1.2.6/debian/patches/440-node.d.linux-iostat.patch @@ -0,0 +1,13 @@ +Index: munin-1.2.6/node/node.d.linux/iostat.in +=================================================================== +--- munin-1.2.6.orig/node/node.d.linux/iostat.in 2009-01-28 13:58:14.000000000 +0100 ++++ munin-1.2.6/node/node.d.linux/iostat.in 2009-01-28 13:59:48.000000000 +0100 +@@ -80,7 +80,7 @@ + + my $detailed_present = my $stat_present = 0; + if (system("grep -q '' /proc/diskstats > /dev/null 2>&1") == 0 +- || system("grep -q 'rio rmerge rsect ruse wio wmerge wsect wuse running use aveq' /proc/partitions") == 0) ++ || system("grep -q 'rio rmerge rsect ruse wio wmerge wsect wuse running use aveq' /proc/partitions > /dev/null 2>&1") == 0) + { + $detailed_present = 1; + } --- munin-1.2.6.orig/debian/patches/381-munin-graph-column-indention.patch +++ munin-1.2.6/debian/patches/381-munin-graph-column-indention.patch @@ -0,0 +1,25 @@ +Index: munin-1.2.6/server/munin-graph.in +=================================================================== +--- munin-1.2.6.orig/server/munin-graph.in 2008-10-15 21:57:26.000000000 +0200 ++++ munin-1.2.6/server/munin-graph.in 2008-10-15 22:10:31.000000000 +0200 +@@ -832,10 +832,17 @@ + next unless ($draw{$time}); + my @complete = (); + if ($RRDkludge) { +- push (@complete, +- '--font' ,'LEGEND:7:@@LIBDIR@@/VeraMono.ttf', ++ # since rrdtool 1.3 with libpango the LEGEND column alignment ++ # only works with monospace fonts ++ if ( $RRDs::VERSION >= 1.3 ) { ++ push (@complete, ++ '--font' ,'LEGEND:7:monospace'); ++ } else { ++ push (@complete, ++ '--font' ,'LEGEND:7:@@LIBDIR@@/VeraMono.ttf'); ++ } ++ push (@complete, + '--font' ,'UNIT:7:@@LIBDIR@@/VeraMono.ttf', +- + '--font' ,'AXIS:7:@@LIBDIR@@/VeraMono.ttf'); + } + --- munin-1.2.6.orig/debian/patches/231-exim_mailstats.patch +++ munin-1.2.6/debian/patches/231-exim_mailstats.patch @@ -0,0 +1,22 @@ +Index: munin-1.2.6/node/node.d/exim_mailstats.in +=================================================================== +--- munin-1.2.6.orig/node/node.d/exim_mailstats.in 2008-08-14 06:06:50.000000000 +0200 ++++ munin-1.2.6/node/node.d/exim_mailstats.in 2008-08-14 06:11:21.000000000 +0200 +@@ -211,6 +211,8 @@ + + while ($line = <$LOGFILE>) { + chomp ($line); ++ # delete the pid out if there is one (Debian #440622) ++ $line =~ s/^(.{19} )\[\d+\] /$1/; + + if (substr ($line, 37,2 ) eq '<=') { + $received++; +@@ -220,7 +222,7 @@ + $rejected++; + } + } +- close($LOGFILE) or die "Could not close $fname after reading: $!"; ++ return tail_close($LOGFILE); + } + + # vim:syntax=perl --- munin-1.2.6.orig/debian/patches/540-node.d-acpi-lenny +++ munin-1.2.6/debian/patches/540-node.d-acpi-lenny @@ -0,0 +1,23 @@ +# #523239 - doesnt need to go upstream, trunk has newer acpi plugin which works differently +Index: munin-1.2.6/node/node.d/acpi.in +=================================================================== +--- munin-1.2.6.orig/node/node.d/acpi.in 2009-05-29 13:02:40.000000000 +0200 ++++ munin-1.2.6/node/node.d/acpi.in 2009-05-29 13:02:57.000000000 +0200 +@@ -32,9 +32,9 @@ + #%# capabilities=autoconf + + if [ "$1" = "autoconf" ]; then +- acpi_available 2>/dev/null >/dev/null || ${acpi:-acpi} -t -B 2>/dev/null >/dev/null ++ acpi_available 2>/dev/null >/dev/null || ${acpi:-acpi} -t 2>/dev/null >/dev/null + if [ "$?" = "0" ]; then +- acpi -t -B 2>/dev/null | grep '\d' >/dev/null 2>/dev/null ++ acpi -t 2>/dev/null | grep '\d' >/dev/null 2>/dev/null + if [ "$?" = "0" ]; then + echo yes + exit 0 +@@ -59,4 +59,4 @@ + exit 0 + fi + +-${acpi:-acpi} -t -B | awk '{print "cpu.value " $4}' ++${acpi:-acpi} -t | awk '{print "cpu.value " $4}' --- munin-1.2.6.orig/debian/patches/130-node.d-tomcat_volume.patch +++ munin-1.2.6/debian/patches/130-node.d-tomcat_volume.patch @@ -0,0 +1,100 @@ +Index: munin-1.2.6/node/node.d/tomcat_volume.in +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ munin-1.2.6/node/node.d/tomcat_volume.in 2008-10-05 23:00:01.000000000 +0200 +@@ -0,0 +1,95 @@ ++#!@@PERL@@ ++# ++# Plugin to monitor the volume of data sent from Tomcat servers. ++# ++# Author: Rune Nordbøe Skillingstad ++# ++# Requirements: ++# - Needs access to http://:@localhost:8080/manager/status?XML=true (or modify the ++# address for another host). A munin-user in $CATALINA_HOME/conf/tomcat-users.xml ++# should be set up for this to work. ++# ++# Tip: To see if it's already set up correctly, just run this plugin ++# with the parameter "autoconf". If you get a "yes", everything should ++# work like a charm already. ++# ++# tomcat-users.xml example: ++# ++# ++# Parameters supported: ++# ++# config ++# autoconf ++# ++# Configurable variables ++# ++# timeout - Connection timeout ++# url - Override default status-url ++# ports - HTTP port numbers ++# user - Manager username ++# password - Manager password ++# ++# Magic markers: ++#%# family=auto ++#%# capabilities=autoconf ++ ++use strict; ++ ++my $ret = undef; ++ ++if(!eval "require LWP::UserAgent;") { ++ $ret = "LWP::UserAgent not found"; ++} ++ ++if(!eval "require XML::Simple;") { ++ $ret .= "XML::Simple not found"; ++} ++ ++my $URL = exists $ENV{'url'} ? $ENV{'url'} : "http://%s:%s\@127.0.0.1:%d/manager/status?XML=true"; ++my $PORT = exists $ENV{'ports'} ? $ENV{'ports'} : 8080; ++my $USER = exists $ENV{'user'} ? $ENV{'user'} : "munin"; ++my $PASSWORD = exists $ENV{'password'} ? $ENV{'password'} : "munin"; ++my $TIMEOUT = exists $ENV{'timeout'} ? $ENV{'timeout'} : 30; ++ ++my $url = sprintf $URL, $USER, $PASSWORD, $PORT; ++ ++if(exists $ARGV[0] and $ARGV[0] eq "autoconf") { ++ if($ret) { ++ print "no ($ret)\n"; ++ exit 1; ++ } ++ my $au = LWP::UserAgent->new(timeout => $TIMEOUT); ++ my $repsonse = $au->request(HTTP::Request->new('GET',$url)); ++ if($repsonse->is_success and $repsonse->content =~ /.*<\/status>/im) { ++ print "yes\n"; ++ exit 0; ++ } else { ++ print "no (no tomcat status)\n"; ++ exit 1; ++ } ++} ++ ++if(exists $ARGV[0] and $ARGV[0] eq "config") { ++ print "graph_title Tomcat volume\n"; ++ print "graph_args --base 1000\n"; ++ print "graph_vlabel bytes per \${graph_period}\n"; ++ print "graph_category tomcat\n"; ++ print "volume.label bytes\n"; ++ print "volume.type DERIVE\n"; ++ print "volume.max 1000000000\n"; ++ print "volume.min 0\n"; ++ exit 0; ++} ++ ++my $ua = LWP::UserAgent->new(timeout => $TIMEOUT); ++my $xs = new XML::Simple; ++my $response = $ua->request(HTTP::Request->new('GET',$url)); ++my $xml = $xs->XMLin($response->content); ++ ++if($xml->{'connector'}->{'http-'.$PORT}->{'requestInfo'}->{'bytesSent'}) { ++ print "volume.value " . $xml->{'connector'}->{'http-'.$PORT}->{'requestInfo'}->{'bytesSent'} . "\n"; ++} else { ++ print "volume.value U\n"; ++} ++ ++# vim:syntax=perl --- munin-1.2.6.orig/debian/patches/560-asterisk-plugins +++ munin-1.2.6/debian/patches/560-asterisk-plugins @@ -0,0 +1,1090 @@ +# should go upstream +# taken from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=510307 +# which were in turn taken from somewhere... +Index: munin-1.2.6/node/node.d/asterisk_channels.in +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ munin-1.2.6/node/node.d/asterisk_channels.in 2006-03-06 12:06:55.000000000 +0100 +@@ -0,0 +1,95 @@ ++#!/usr/bin/perl -w ++# ++# Copyright (C) 2005 Rodolphe Quiedeville ++# ++# This program is free software; you can redistribute it and/or ++# modify it under the terms of the GNU General Public License ++# as published by the Free Software Foundation; version 2 dated June, ++# 1991. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++# ++# If you improve this script please send your version to my email address ++# with the copyright notice upgrade with your name. ++# ++# ++# $Log$ ++# Revision 1.1 2005/10/22 21:04:01 rodo ++# Created by Rodolphe Quiedeville ++# ++# Parameters mandatory: ++# ++# username ++# secret ++# ++#%# family=contrib ++#%# capabilities=autoconf ++ ++use strict; ++ ++my $ret = undef; ++if (! eval "require Net::Telnet;") ++{ ++ $ret = "Net::Telnet not found"; ++} ++ ++if ($ARGV[0] and $ARGV[0] eq "config") ++{ ++ print "graph_title Asterisk active channels\n"; ++ print "graph_args --base 1000 -l 0\n"; ++ print "graph_vlabel channels\n"; ++ print "graph_category asterisk\n"; ++ print "channels.draw AREA\n"; ++ print "channels.label channels\n"; ++ exit 0; ++} ++ ++my $host = exists $ENV{'host'} ? $ENV{'host'} : "127.0.0.1"; ++my $port = exists $ENV{'port'} ? $ENV{'port'} : "5038"; ++ ++my $username = $ENV{'username'}; ++my $secret = $ENV{'secret'}; ++ ++my $pop = new Net::Telnet (Telnetmode => 0); ++$pop->open(Host => $host, ++ Port => $port); ++ ++## Read connection message. ++my $line = $pop->getline; ++die $line unless $line =~ /^Asterisk/; ++ ++## Send user name. ++$pop->print("Action: login"); ++$pop->print("Username: $username"); ++$pop->print("Secret: $secret"); ++$pop->print("Events: off"); ++$pop->print(""); ++ ++#Response: Success ++#Message: Authentication accepted ++ ++## Request status of messages. ++$pop->print("Action: command"); ++$pop->print("Command: show channels"); ++$pop->print(""); ++my $result; ++while (($line = $pop->getline) and ($line !~ /END COMMAND/o)) ++{ ++ #print $line; ++ $result = $line if $line =~ /active channel/; ++} ++ ++my $nb = (split ' ',$result)[0]; ++$pop->print("Action: logoff"); ++$pop->print(""); ++ ++print "channels.value $nb\n"; ++ ++# vim:syntax=perl +Index: munin-1.2.6/node/node.d/asterisk_channelstypes.in +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ munin-1.2.6/node/node.d/asterisk_channelstypes.in 2006-03-06 12:06:55.000000000 +0100 +@@ -0,0 +1,134 @@ ++#!/usr/bin/perl -w ++# ++# Copyright (C) 2005-2006 Rodolphe Quiedeville ++# ++# This program is free software; you can redistribute it and/or ++# modify it under the terms of the GNU General Public License ++# as published by the Free Software Foundation; version 2 dated June, ++# 1991. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++# ++# If you improve this script please send your version to my email address ++# with the copyright notice upgrade with your name. ++# ++# Plugin to monitor number of active channels by type, use the ++# asterisk's manager API to fetch datas. ++# ++# $Log$ ++# Revision 1.1 2006/03/06 12:04:01 rodo ++# Created by Rodolphe Quiedeville ++# ++# Parameters mandatory: ++# ++# username ++# secret ++# ++#%# family=contrib ++#%# capabilities=autoconf ++ ++use strict; ++ ++my $ret = undef; ++if (! eval "require Net::Telnet;") ++{ ++ $ret = "Net::Telnet not found"; ++} ++ ++my @CHANNELS = exists $ENV{'channels'} ? split ' ',$ENV{'channels'} : qw(Zap IAX2 SIP); ++ ++if ($ARGV[0] and $ARGV[0] eq "config") ++{ ++ print "graph_title Asterisk channels\n"; ++ print "graph_args --base 1000 -l 0\n"; ++ print "graph_vlabel channels\n"; ++ print "graph_category asterisk\n"; ++ foreach my $channel (@CHANNELS) { ++ if ($channel eq $CHANNELS[0]) { ++ print "$channel.draw AREA\n"; ++ } ++ else{ ++ print "$channel.draw STACK\n"; ++ } ++ print "$channel.label $channel\n"; ++ } ++ exit 0; ++} ++ ++my $host = exists $ENV{'host'} ? $ENV{'host'} : "127.0.0.1"; ++my $port = exists $ENV{'port'} ? $ENV{'port'} : "5038"; ++ ++my $username = $ENV{'username'}; ++my $secret = $ENV{'secret'}; ++ ++my $pop = new Net::Telnet (Telnetmode => 0); ++$pop->open(Host => $host, ++ Port => $port); ++ ++## Read connection message. ++my $line = $pop->getline; ++die $line unless $line =~ /^Asterisk/; ++ ++## Send user name. ++$pop->print("Action: login"); ++$pop->print("Username: $username"); ++$pop->print("Secret: $secret"); ++$pop->print("Events: off"); ++$pop->print(""); ++ ++#Response: Success ++#Message: Authentication accepted ++ ++## Request status of messages. ++$pop->print("Action: command"); ++$pop->print("Command: show channels"); ++$pop->print(""); ++ ++#Response: Follows ++#Channel Location State Application(Data) ++#Zap/pseudo-198641660 s@frompstn:1 Rsrvd (None) ++#Zap/1-1 4@frompstn:1 Up MeetMe(5500) ++#2 active channels ++#1 active call ++#--END COMMAND-- ++ ++my @results; ++my ($i, $start)=(0,0); ++foreach my $channel (@CHANNELS) { ++ $results[$i] = 0; ++ $i++; ++} ++ ++my @fields; ++while (($line = $pop->getline) and ($line !~ /active channels/o)) ++{ ++ $i = 0; ++ if ($start) { ++ @fields = (split '/', $line); ++ foreach my $channel (@CHANNELS) { ++ $results[$i] = $results[$i] + 1 if ($fields[0] eq $channel); ++ $i++; ++ } ++ } ++ $start = 1 if ($line =~ /Channel/o); ++} ++ ++ ++# Logoff ++$pop->print("Action: logoff"); ++$pop->print(""); ++ ++$i = 0; ++foreach my $channel (@CHANNELS) { ++ print "$channel.value $results[$i]\n"; ++ $i++; ++} ++ ++# vim:syntax=perl +Index: munin-1.2.6/node/node.d/asterisk_codecs.in +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ munin-1.2.6/node/node.d/asterisk_codecs.in 2008-04-15 18:03:07.000000000 +0200 +@@ -0,0 +1,196 @@ ++#!/usr/bin/perl -w ++# ++# Copyright (C) 2005-2006 Rodolphe Quiedeville ++# ++# This program is free software; you can redistribute it and/or ++# modify it under the terms of the GNU General Public License ++# as published by the Free Software Foundation; version 2 dated June, ++# 1991. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++# ++# If you improve this script please send your version to my email address ++# with the copyright notice upgrade with your name. ++# ++# Plugin to monitor number of active channels by codec used, use the ++# asterisk's manager API to fecth datas. ++# ++# $Log$ ++# Revision 1.1 2005/10/28 21:04:01 rodo ++# Created by Rodolphe Quiedeville ++# ++# Parameters mandatory: ++# ++# username ++# secret ++# ++# Optional parameters: ++# codecs ++# codecsx ++# note that, if present, both required with codecsX being ++# the hex representation asterisk returns for the codec ++# ++#%# family=contrib ++#%# capabilities=autoconf ++ ++use strict; ++ ++my $ret = undef; ++if (! eval "require Net::Telnet;") ++{ ++ $ret = "Net::Telnet not found"; ++} ++ ++my @CODECS = exists $ENV{'codecs'} ? split ' ',$ENV{'codecs'} : qw(gsm ulaw alaw); ++my @CODECSX = exists $ENV{'codecsx'} ? split ' ',$ENV{'codecsx'} : qw(0x2 0x4 0x8); ++ ++if ($ARGV[0] and $ARGV[0] eq "config") ++{ ++ print "graph_title Asterisk channels/codecs\n"; ++ print "graph_args --base 1000 -l 0\n"; ++ print "graph_vlabel channels\n"; ++ print "graph_category asterisk\n"; ++ foreach my $codec (@CODECS) { ++ if ($codec eq $CODECS[0]) { ++ print "$codec.draw AREA\n"; ++ } ++ else{ ++ print "$codec.draw STACK\n"; ++ } ++ print "$codec.label $codec\n"; ++ } ++ print "other.draw STACK\n"; ++ print "other.label other\n"; ++ print "unknown.draw STACK\n"; ++ print "unknown.label not set\n"; ++ exit 0; ++} ++ ++my $host = exists $ENV{'host'} ? $ENV{'host'} : "127.0.0.1"; ++my $port = exists $ENV{'port'} ? $ENV{'port'} : "5038"; ++ ++my $username = $ENV{'username'}; ++my $secret = $ENV{'secret'}; ++ ++my $pop = new Net::Telnet (Telnetmode => 0); ++$pop->open(Host => $host, ++ Port => $port); ++ ++## Read connection message. ++my $line = $pop->getline; ++die $line unless $line =~ /^Asterisk/; ++ ++## Send user name. ++$pop->print("Action: login"); ++$pop->print("Username: $username"); ++$pop->print("Secret: $secret"); ++$pop->print("Events: off"); ++$pop->print(""); ++ ++#Response: Success ++#Message: Authentication accepted ++ ++## Request status of messages. ++$pop->print("Action: command"); ++$pop->print("Command: sip show channels"); ++$pop->print(""); ++ ++#Response: Follows ++#Peer User/ANR Call ID Seq (Tx/Rx) Format ++#192.168.1.135 yann 6902112b3e0 00101/00002 g729 ++#1 active SIP channel(s) ++#--END COMMAND-- ++ ++my @results; ++my ($i, $start, $unknown, $other)=(0,0,0,0); ++foreach my $codec (@CODECS) { ++ $results[$i] = 0; ++ $i++; ++} ++ ++my @fields; ++while (($line = $pop->getline) and ($line !~ /active SIP channel/o)) ++{ ++ #print STDERR "SIP: $line\n"; ++ $i = 0; ++ my $found = 0; ++ if ($start) { ++ @fields = (split ' ', $line); ++ if ($fields[4] eq '0x0') { ++ $unknown += 1; ++ next; ++ } ++ foreach my $codec (@CODECSX) { ++ if ($fields[4] eq "$codec") { ++ $results[$i] = $results[$i] + 1; ++ $found = 1; ++ last; ++ } ++ $i++; ++ } ++ if (! $found) { ++ $other += 1; ++ print STDERR "CODEC: SIP other format $fields[4]\n"; ++ } ++ } ++ $start = 1 if ($line =~ /Peer/o); ++} ++ ++## Request status of messages. ++$pop->print("Action: command"); ++$pop->print("Command: iax2 show channels"); ++$pop->print(""); ++ ++#Response: Follows ++#Channel Peer Username ID (Lo/Rem) Seq (Tx/Rx) Lag Jitter JitBuf Format ++#IAX2/rodolphe@rodolp 10.8.53.6 rodolphe 00003/01287 00006/00004 00000ms 0148ms 0000ms gsm ++#1 active IAX channel(s) ++#--END COMMAND-- ++ ++$start = 0; ++while (($line = $pop->getline) and ($line !~ /active IAX channel/o)) ++{ ++ $i = 0; ++ my $found = 0; ++ if ($start) { ++ @fields = (split ' ', $line); ++ if ($fields[8] eq '0x0') { ++ $unknown += 1; ++ next; ++ } ++ foreach my $codec (@CODECSX) { ++ if ($fields[8] eq "$codec") { ++ $results[$i] = $results[$i] + 1; ++ $found = 1; ++ last; ++ } ++ $i++; ++ } ++ if (! $found) { ++ $other += 1; ++ print STDERR "CODEC: IAX2 other format: $fields[8]\n"; ++ } ++ } ++ $start = 1 if ($line =~ /Channel/o); ++} ++ ++# Logoff ++$pop->print("Action: logoff"); ++$pop->print(""); ++ ++$i = 0; ++foreach my $codec (@CODECS) { ++ print "$codec.value $results[$i]\n"; ++ $i++; ++} ++print "other.value $other\n"; ++print "unknown.value $unknown\n"; ++ ++# vim:syntax=perl +Index: munin-1.2.6/node/node.d/asterisk_meetme.in +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ munin-1.2.6/node/node.d/asterisk_meetme.in 2006-03-06 12:06:55.000000000 +0100 +@@ -0,0 +1,109 @@ ++#!/usr/bin/perl -w ++# ++# Copyright (C) 2005 Rodolphe Quiedeville ++# ++# This program is free software; you can redistribute it and/or ++# modify it under the terms of the GNU General Public License ++# as published by the Free Software Foundation; version 2 dated June, ++# 1991. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++# ++# If you improve this script please send your version to my email address ++# with the copyright notice upgrade with your name. ++# ++# Plugin to monitor number of active conferences, use the asterisk's manager ++# API to fecth datas. ++# ++# $Log$ ++# Revision 1.1 2005/10/22 21:04:01 rodo ++# Created by Rodolphe Quiedeville ++# ++# Parameters mandatory: ++# ++# username ++# secret ++# ++#%# family=contrib ++#%# capabilities=autoconf ++ ++use strict; ++ ++my $ret = undef; ++if (! eval "require Net::Telnet;") ++{ ++ $ret = "Net::Telnet not found"; ++} ++ ++if ($ARGV[0] and $ARGV[0] eq "config") ++{ ++ print "graph_title Asterisk actives conferences\n"; ++ print "graph_args --base 1000 -l 0\n"; ++ print "graph_vlabel conferences\n"; ++ print "graph_category asterisk\n"; ++ print "confs.draw AREA\n"; ++ print "confs.label conferences\n"; ++ exit 0; ++} ++ ++my $host = exists $ENV{'host'} ? $ENV{'host'} : "127.0.0.1"; ++my $port = exists $ENV{'port'} ? $ENV{'port'} : "5038"; ++ ++my $username = $ENV{'username'}; ++my $secret = $ENV{'secret'}; ++ ++my $pop = new Net::Telnet (Telnetmode => 0); ++$pop->open(Host => $host, ++ Port => $port); ++ ++## Read connection message. ++my $line = $pop->getline; ++die $line unless $line =~ /^Asterisk/; ++ ++## Send user name. ++$pop->print("Action: login"); ++$pop->print("Username: $username"); ++$pop->print("Secret: $secret"); ++$pop->print("Events: off"); ++$pop->print(""); ++ ++#Response: Success ++#Message: Authentication accepted ++ ++## Request status of messages. ++$pop->print("Action: command"); ++$pop->print("Command: meetme"); ++$pop->print(""); ++ ++ ++#Response: Follows ++#Conf Num Parties Marked Activity Creation ++#5500 0001 N/A 00:00:03 Static ++#* Total number of MeetMe users: 1 ++#--END COMMAND-- ++ ++my ($confs, $start)=(0,0); ++ ++while (($line = $pop->getline) and ($line !~ /Total number|No active MeetMe/o)) ++{ ++ if ($start) { ++ #print $line; ++ $confs++; ++ } ++ ++ $start = 1 if ($line =~ /Conf\sNum\s*Parties/o); ++} ++ ++$pop->print("Action: logoff"); ++$pop->print(""); ++ ++print "confs.value $confs\n"; ++ ++# vim:syntax=perl +Index: munin-1.2.6/node/node.d/asterisk_meetmeusers.in +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ munin-1.2.6/node/node.d/asterisk_meetmeusers.in 2008-04-11 20:57:15.000000000 +0200 +@@ -0,0 +1,104 @@ ++#!/usr/bin/perl -w ++# ++# Copyright (C) 2005 Rodolphe Quiedeville ++# ++# This program is free software; you can redistribute it and/or ++# modify it under the terms of the GNU General Public License ++# as published by the Free Software Foundation; version 2 dated June, ++# 1991. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++# ++# If you improve this script please send your version to my email address ++# with the copyright notice upgrade with your name. ++# ++# Plugin to monitor number of active users in all the conferences, use the ++# asterisk's manager API to fecth datas. ++# ++# $Log$ ++# Revision 1.1 2005/10/22 24:04:01 rodo ++# Created by Rodolphe Quiedeville ++# ++# Parameters mandatory: ++# ++# username ++# secret ++# ++#%# family=contrib ++#%# capabilities=autoconf ++ ++use strict; ++ ++my $ret = undef; ++if (! eval "require Net::Telnet;") ++{ ++ $ret = "Net::Telnet not found"; ++} ++ ++if ($ARGV[0] and $ARGV[0] eq "config") ++{ ++ print "graph_title Asterisk conference's users\n"; ++ print "graph_args --base 1000 -l 0\n"; ++ print "graph_category asterisk\n"; ++ print "graph_vlabel users\n"; ++ print "users.draw AREA\n"; ++ print "users.label users\n"; ++ print "users.info users on active conference\n"; ++ exit 0; ++} ++ ++my $host = exists $ENV{'host'} ? $ENV{'host'} : "127.0.0.1"; ++my $port = exists $ENV{'port'} ? $ENV{'port'} : "5038"; ++ ++my $username = $ENV{'username'}; ++my $secret = $ENV{'secret'}; ++ ++my $pop = new Net::Telnet (Telnetmode => 0); ++$pop->open(Host => $host, ++ Port => $port); ++ ++## Read connection message. ++my $line = $pop->getline; ++die $line unless $line =~ /^Asterisk/; ++ ++## Send user name. ++$pop->print("Action: login"); ++$pop->print("Username: $username"); ++$pop->print("Secret: $secret"); ++$pop->print("Events: off"); ++$pop->print(""); ++ ++#Response: Success ++#Message: Authentication accepted ++ ++## Request status of messages. ++$pop->print("Action: command"); ++$pop->print("Command: meetme"); ++$pop->print(""); ++ ++my $nb = 0; ++ ++#Response: Follows ++#Privilege: Command ++#No active MeetMe conferences. ++# OR ++#Total number of MeetMe users: 1 ++ ++while (($line = $pop->getline) and ($line !~ /END COMMAND/o)) ++{ ++ $nb = $1 if $line =~ /MeetMe users:\s(\d)$/; ++} ++ ++$pop->print("Action: logoff"); ++$pop->print(""); ++ ++print "users.value $nb\n"; ++ ++# vim:syntax=perl +Index: munin-1.2.6/node/node.d/asterisk_sipchannels.in +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ munin-1.2.6/node/node.d/asterisk_sipchannels.in 2008-04-15 18:04:15.000000000 +0200 +@@ -0,0 +1,167 @@ ++#!/usr/bin/perl -w ++# ++# Copyright (C) 2005-2006 Rodolphe Quiedeville ++# ++# This program is free software; you can redistribute it and/or ++# modify it under the terms of the GNU General Public License ++# as published by the Free Software Foundation; version 2 dated June, ++# 1991. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++# ++# If you improve this script please send your version to my email address ++# with the copyright notice upgrade with your name. ++# ++# Plugin to monitor number of SIP active channels by codec used, use the ++# asterisk's manager API to fecth datas. ++# ++# $Log$ ++# Revision 1.3 2006/02/27 12:04:01 rodo ++# Support codec's list definition in config file ++# ++# Revision 1.2 2006/02/26 12:04:01 rodo ++# Support Asterisk 1.2 ++# ++# Revision 1.1 2005/10/28 21:04:01 rodo ++# Created by Rodolphe Quiedeville ++# ++# Parameters mandatory: ++# ++# username ++# secret ++# ++# Optional parameters: ++# codecs ++# codecsx ++# note that, if present, both required with codecsX being ++# the hex representation asterisk returns for the codec ++# ++#%# family=contrib ++#%# capabilities=autoconf ++ ++use strict; ++ ++my $ret = undef; ++if (! eval "require Net::Telnet;") ++{ ++ $ret = "Net::Telnet not found"; ++} ++ ++#Codecs g723, gsm, ulaw, alaw, g726, adpcm, slin, lpc10, g729, speex, ilbc ++ ++my @CODECS = exists $ENV{'codecs'} ? split ' ',$ENV{'codecs'} : qw(gsm ulaw alaw); ++my @CODECSX = exists $ENV{'codecsx'} ? split ' ',$ENV{'codecsx'} : qw(0x2 0x4 0x8); ++ ++if ($ARGV[0] and $ARGV[0] eq "config") ++{ ++ print "graph_title Asterisk sip channels/codecs\n"; ++ print "graph_args --base 1000 -l 0\n"; ++ print "graph_vlabel channels\n"; ++ print "graph_category asterisk\n"; ++ foreach my $codec (@CODECS) { ++ if ($codec eq $CODECS[0]) { ++ print "$codec.draw AREA\n"; ++ } ++ else{ ++ print "$codec.draw STACK\n"; ++ } ++ print "$codec.label $codec\n"; ++ } ++ print "other.draw STACK\n"; ++ print "other.label other\n"; ++ print "unknown.draw STACK\n"; ++ print "unknown.label not set\n"; ++ exit 0; ++} ++ ++my $host = exists $ENV{'host'} ? $ENV{'host'} : "127.0.0.1"; ++my $port = exists $ENV{'port'} ? $ENV{'port'} : "5038"; ++ ++my $username = $ENV{'username'}; ++my $secret = $ENV{'secret'}; ++ ++my $pop = new Net::Telnet (Telnetmode => 0); ++$pop->open(Host => $host, ++ Port => $port); ++ ++## Read connection message. ++my $line = $pop->getline; ++die $line unless $line =~ /^Asterisk/; ++ ++## Send user name. ++$pop->print("Action: login"); ++$pop->print("Username: $username"); ++$pop->print("Secret: $secret"); ++$pop->print("Events: off"); ++$pop->print(""); ++ ++## Request status of messages. ++$pop->print("Action: command"); ++$pop->print("Command: sip show channels"); ++$pop->print(""); ++ ++#Response: Follows ++#Privilege: Command ++#Peer User/ANR Call ID Seq (Tx/Rx) Format Hold Last Message ++#0 active SIP channels ++# -- OR -- ++#74.218.176.166 (None) c24a5a230c6 00101/278584006 0x0 (nothing) No Rx: REGISTER ++#74.218.176.166 (None) 508c037f936 00101/07310 0x0 (nothing) No Rx: REGISTER ++#2 active SIP channels ++#--END COMMAND-- ++ ++ ++my @results; ++my ($i, $start, $unknown, $other, $fields)=(0,0,0,0,0); ++foreach my $codec (@CODECS) { ++ $results[$i] = 0; ++ $i++; ++} ++ ++while (($line = $pop->getline) and ($line !~ /active SIP channel/o)) ++{ ++ $i = 0; ++ if ($start) { ++ my @fields = (split ' ', $line); ++ if ($fields[4] eq '0x0') { ++ $unknown += 1; ++ next; ++ } ++ my $found = 0; ++ foreach my $codec (@CODECSX) { ++ if ($fields[4] eq "$codec") { ++ $results[$i] = $results[$i] + 1; ++ $found = 1; ++ last; ++ } ++ $i++; ++ } ++ if (! $found) { ++ $other += 1; ++ print STDERR "SIP other format: $fields[4]\n"; ++ } ++ } ++ $start = 1 if ($line =~ /Peer/o); ++} ++ ++$pop->print("Action: logoff"); ++$pop->print(""); ++ ++$i = 0; ++foreach my $codec (@CODECS) { ++ print "$codec.value $results[$i]\n"; ++ $i++; ++} ++print "other.value $other\n"; ++print "unknown.value $unknown\n"; ++#print STDERR "asterisk_codecs other.value $other\n"; ++#print STDERR "asterisk_codecs unknown.value $unknown\n"; ++ ++# vim:syntax=perl +Index: munin-1.2.6/node/node.d/asterisk_sippeers.in +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ munin-1.2.6/node/node.d/asterisk_sippeers.in 2008-04-11 18:09:09.000000000 +0200 +@@ -0,0 +1,136 @@ ++#!/usr/bin/perl -w ++# ++# Copyright (C) 2005 Rodolphe Quiedeville ++# ++# This program is free software; you can redistribute it and/or ++# modify it under the terms of the GNU General Public License ++# as published by the Free Software Foundation; version 2 dated June, ++# 1991. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++# ++# If you improve this script please send your version to my email address ++# with the copyright notice upgrade with your name. ++# ++# Plugin to monitor number of sip peers registered, use the asterisk's manager ++# API to fecth datas. ++# ++# $Log$ ++# Revision 1.1 2005/10/28 16:42:01 rodo ++# Created by Rodolphe Quiedeville ++# ++# Parameters mandatory: ++# ++# username ++# secret ++# ++#%# family=contrib ++#%# capabilities=autoconf ++ ++# ################################################################################# ++# Following example from current asterisk 1.4 ++#> sip show peers ++#Name/username Host Dyn Nat ACL Port Status ++#104-RANDALLBUILT/104-RAND 74.218.176.166 D 5060 Unmonitored ++#... ++#102-ROCKSOLID/102-ROCKSOL (Unspecified) D 0 Unmonitored ++#101-ROCKSOLID/101-ROCKSOL (Unspecified) D N 0 UNKNOWN ++#20 sip peers [Monitored: 0 online, 1 offline Unmonitored: 2 online, 17 offline] ++# ################################################################################# ++ ++use strict; ++ ++my $ret = undef; ++if (! eval "require Net::Telnet;") ++{ ++ $ret = "Net::Telnet not found"; ++} ++ ++if ($ARGV[0] and $ARGV[0] eq "config") ++{ ++ print "graph_title Asterisk sip peers\n"; ++ print "graph_args --base 1000 -l 0\n"; ++ print "graph_order mon moff umon umoff\n"; ++ print "graph_vlabel peers\n"; ++ print "graph_category asterisk\n"; ++ #print "peers.label total\n"; ++ print "mon.draw AREA\n"; ++ print "mon.label monitored online\n"; ++ print "moff.draw STACK\n"; ++ print "moff.label monitored offline\n"; ++ print "umon.draw STACK\n"; ++ print "umon.label unmonitored online\n"; ++ print "umoff.draw STACK\n"; ++ print "umoff.label unmonitored offline\n"; ++ #graph_scale no ++ #load.warning 10 ++ #load.critical 120 ++ #graph_info The ... describes .... ++ #load.info Average load for the five minutes. ++ exit 0; ++} ++ ++my $host = exists $ENV{'host'} ? $ENV{'host'} : "127.0.0.1"; ++my $port = exists $ENV{'port'} ? $ENV{'port'} : "5038"; ++ ++my $username = $ENV{'username'}; ++my $secret = $ENV{'secret'}; ++ ++my $pop = new Net::Telnet (Telnetmode => 0); ++$pop->open(Host => $host, ++ Port => $port); ++ ++## Read connection message. ++my $line = $pop->getline; ++die $line unless $line =~ /^Asterisk/; ++ ++## Send user name. ++$pop->print("Action: login"); ++$pop->print("Username: $username"); ++$pop->print("Secret: $secret"); ++$pop->print("Events: off"); ++$pop->print(""); ++ ++#Response: Success ++#Message: Authentication accepted ++ ++## Request status of messages. ++$pop->print("Action: command"); ++$pop->print("Command: sip show peers"); ++$pop->print(""); ++ ++my ($peers,$monitor_online,$monitor_offline,$unmonitor_online,$unmonitor_offline)=(0,0,0,0,0); ++ ++while (($line = $pop->getline) and ($line !~ /END COMMAND/o)) ++{ ++ my @fields = split(' ', $line); ++ my $count = @fields; ++ #20 sip peers [Monitored: 0 online, 1 offline Unmonitored: 2 online, 17 offline] ++ if (($count > 10) and ($fields[1] eq 'sip' and $fields[2] eq 'peers')) { ++ $peers = $fields[0]; ++ $monitor_online = $fields[4]; ++ $monitor_offline = $fields[6]; ++ $unmonitor_online = $fields[9]; ++ $unmonitor_offline = $fields[11]; ++ #print STDERR "$peers $monitor_online $monitor_offline $unmonitor_online $unmonitor_offline\n"; ++ last; ++ } ++} ++ ++$pop->print("Action: logoff"); ++$pop->print(""); ++ ++#print "peers.value $peers\n"; ++print "mon.value $monitor_online\n"; ++print "moff.value $monitor_offline\n"; ++print "umon.value $unmonitor_online\n"; ++print "umoff.value $unmonitor_offline\n"; ++ ++# vim:syntax=perl +Index: munin-1.2.6/node/node.d/asterisk_voicemail.in +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ munin-1.2.6/node/node.d/asterisk_voicemail.in 2006-03-06 12:06:55.000000000 +0100 +@@ -0,0 +1,106 @@ ++#!/usr/bin/perl -w ++# ++# Copyright (C) 2005-2006 Rodolphe Quiedeville ++# ++# This program is free software; you can redistribute it and/or ++# modify it under the terms of the GNU General Public License ++# as published by the Free Software Foundation; version 2 dated June, ++# 1991. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++# ++# If you improve this script please send your version to my email address ++# with the copyright notice upgrade with your name. ++# ++# Plugin to monitor number of messages in all voicemails ++# ++# $Log$ ++# Revision 1.1 2006/03/05 15:07:01 rodo ++# Created by Rodolphe Quiedeville ++# ++# Parameters mandatory: ++# ++# username ++# secret ++# ++#%# family=contrib ++#%# capabilities=autoconf ++ ++use strict; ++ ++my $ret = undef; ++if (! eval "require Net::Telnet;") ++{ ++ $ret = "Net::Telnet not found"; ++} ++ ++if ($ARGV[0] and $ARGV[0] eq "config") ++{ ++ print "graph_title Asterisk Voicemail messages\n"; ++ print "graph_args --base 1000 -l 0\n"; ++ print "graph_vlabel messages\n"; ++ print "graph_category asterisk\n"; ++ print "messages.draw AREA\n"; ++ print "messages.label messages\n"; ++ exit 0; ++} ++ ++my $host = exists $ENV{'host'} ? $ENV{'host'} : "127.0.0.1"; ++my $port = exists $ENV{'port'} ? $ENV{'port'} : "5038"; ++ ++my $username = $ENV{'username'}; ++my $secret = $ENV{'secret'}; ++ ++my $pop = new Net::Telnet (Telnetmode => 0); ++$pop->open(Host => $host, ++ Port => $port); ++ ++## Read connection message. ++my $line = $pop->getline; ++die $line unless $line =~ /^Asterisk/; ++ ++## Send user name. ++$pop->print("Action: login"); ++$pop->print("Username: $username"); ++$pop->print("Secret: $secret"); ++$pop->print("Events: off"); ++$pop->print(""); ++ ++#Response: Success ++#Message: Authentication accepted ++ ++## Request status of messages. ++$pop->print("Action: command"); ++$pop->print("Command: show voicemail users"); ++$pop->print(""); ++ ++#Context Mbox User Zone NewMsg ++#default 1234 Example Mailbox 1 ++#other 1234 Company2 User 0 ++ ++my ($results,$start)=(0,0); ++ ++my @fields; ++while (($line = $pop->getline) and ($line !~ /--END/o)) ++{ ++ if ($start) { ++ @fields = (split ' ', $line); ++ $results = $results + pop(@fields); ++ } ++ ++ $start = 1 if ($line =~ /Context/o); ++} ++ ++# Logoff ++$pop->print("Action: logoff"); ++$pop->print(""); ++ ++print "messages.value $results\n"; ++# vim:syntax=perl --- munin-1.2.6.orig/debian/patches/150-node.d-openvpn +++ munin-1.2.6/debian/patches/150-node.d-openvpn @@ -0,0 +1,93 @@ +Index: munin-1.2.6/node/node.d/openvpn.in +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ munin-1.2.6/node/node.d/openvpn.in 2008-06-29 19:08:36.000000000 +0200 +@@ -0,0 +1,88 @@ ++#!/usr/bin/perl -w ++# ++# Copyright (C) 2005 Rodolphe Quiedeville ++# ++# This program is free software; you can redistribute it and/or ++# modify it under the terms of the GNU General Public License ++# as published by the Free Software Foundation; version 2 dated June, ++# 1991. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++# ++# If you improve this script please send your version to my email address ++# with the copyright notice upgrade with your name. ++# ++# Munin's plugin to monitor number of users connected to openvpn server ++# ++# Usage: copy or link into /etc/munin/plugins ++# ++# Parameters: ++# ++# config (required) ++# autoconf (optional - used by munin-config) ++# ++# $Log$ ++# Revision 1.1 2005/10/11 14:12:19 Rodolphe Quiedeville ++# ++# Magic markers (optinal - used by munin-config and some installation ++# scripts): ++# ++#%# family=contrib ++#%# capabilities=autoconf ++ ++use strict; ++ ++my $statuslogfile = "/etc/openvpn/openvpn-status.log"; ++my $users = 0; ++ ++if($ARGV[0] and $ARGV[0] eq "autoconf" ) { ++ if(-f $statuslogfile) { ++ if(-r $statuslogfile) { ++ print "yes\n"; ++ exit 0; ++ } else { ++ print "no (logfile not readable)\n"; ++ } ++ } else { ++ print "no (logfile not found)\n"; ++ } ++ exit 1; ++} ++ ++if ($ARGV[0] and $ARGV[0] eq "config" ){ ++ print "graph_title OpenVpn\n"; ++ print "graph_args --base 1000 -l 0\n"; ++ print "graph_scale yes\n"; ++ print "graph_vlabel users\n"; ++ print "graph_category network\n"; ++ print "graph_info This graph shows the numbers of users connected to openvpn server.\n"; ++ print "users.label users\n"; ++ print "users.info The number of users connected to openvpn server\n"; ++ exit 0; ++} ++ ++if (-f "$statuslogfile") { ++ open(IN, "$statuslogfile") or exit 4; ++ my $flagu = 0; ++ while() { ++ if(/^ROUTING TABLE$/) { ++ $flagu = 0; ++ } ++ if ($flagu) { ++ $users = $users + 1; ++ } ++ if(/^Common Name,Real Address,Bytes Received,Bytes Sent,Connected Since$/) { ++ $flagu = 1; ++ } ++ } ++ close(IN); ++} ++ ++print "users.value " . $users."\n"; --- munin-1.2.6.orig/debian/patches/300-vserver_plugins +++ munin-1.2.6/debian/patches/300-vserver_plugins @@ -0,0 +1,645 @@ +Index: munin-1.2.6/node/node.d.linux/vserver_cpu_.in +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ munin-1.2.6/node/node.d.linux/vserver_cpu_.in 2008-07-20 22:43:11.000000000 +0200 +@@ -0,0 +1,190 @@ ++#!/bin/bash ++# ++# Copyright (C) 2006-2008 Holger Levsen and Micah Anderson ++# ++# This program is free software; you can redistribute it and/or ++# modify it under the terms of the GNU General Public License ++# as published by the Free Software Foundation; version 2 dated June, ++# 1991. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++ ++# Graph Vserver cpu usage stats ++# ++# Configuration variables ++# vservers - specify the vservers to include in the graph (default: all) ++# ++# NOTE: If no configuration variable is set, the default will be used ++# ++# see vserver_resources for example uses of configuration files ++# ++# or links to define what to monitor: ++# vserver_cpu_ -> monitor cpu usage of all vservers on all cpus ++# vserver_hold_ -> monitor hold on all vservers on all cpus ++# vserver_hold_0 -> monitor hold on all vservers on cpu0 ++# vserver_hold_1 -> monitor hold on all vservers on cpu1 ++# vserver_hold_foo -> monitor hold on all cpus on vserver named foo ++# vserver_sys_foo -> monitor cpu usage on all cpus on vserver named foo ++ ++# Changelog ++# version 0.2 - 2006 October 02 Holger Levsen ++# - label fixed: we measure jiffies not seconds ++# - Fix error that results if NodeName is set to include a domain name ++# - Fix hypens in NodeNames, replace them with underscores ++# - whitespace cleanup ++# version 0.3 - 2006 October 07 Holger Levsen ++# - rewrite of vserver_usercpu ++# - smp-aware ++# - can display hold too (third value in the cpu line(s) of /proc/virtual//sched) ++# - no seperation between user and system cpu anymore ++# - handle identical vserver-names by using the vserver-id internally ++# version 0.4 - 2007, October 07 ++# Micah Anderson ++# - fixed variable name (thanks pietro) ++# version 0.5 - 2008, July 07 ++# Micah Anderson ++# - fixed number of CPU regexp to be more accurate ++# - added $NAMELOC - fixes plugin so it works with VCI_SPACES (> 2.6.19) as well as older version ++ ++# TODO: ++# - comment the code or go mad ++# - add info how many jiffies per second are available on a machine ++# - user and system cpu are always added to each other, make it optional to split them? ++# - use /proc less often (100 times more overhead than talking to the kernel directly) ++# i.e. use something like pagesize=`perl -MPOSIX -e 'print POSIX::sysconf(_SC_PAGESIZE), "\n";'` ++ ++ ++VSERVERS="$vservers" ++ ++INFO=(`sed 's/.*:\t//' /proc/virtual/info 2>/dev/null || echo ''`) ++KCIN="$[ 16#${INFO[2]} ]"; ++ ++# If this is 1, then VCI_SPACES is present in the kernel (new in 2.6.19) ++if [ $[ (KCIN >> 10) & 1 ] -eq 1 ] ++then ++ NAMELOC="nsproxy" ++else ++ NAMELOC="cvirt" ++fi ++ ++if [ -z "$VSERVERS" ] ; then ++ XIDS=`find /proc/virtual/* -type d -exec basename {} \;` ++else ++ # it's really more performant to specify vservers by ids or by linking but not in the configuration-file by name ++ XIDS="" ++ for i in $VSERVERS ; do ++ if [ -d /proc/virtual/$i ] ; then ++ XIDS="${XIDS}${i} " ++ else ++ for j in `find /proc/virtual/* -type d -exec basename {} \;` ; do ++ if [ "$i" = "`cat /proc/virtual/$j/$NAMELOC |grep NodeName |cut -f2`" ] ; then ++ XIDS="${XIDS}${j} " ++ fi ++ done ++ fi ++ done ++fi ++ ++BASEPARAM=`basename $0 | sed 's/^vserver_//'` ++MODE=`echo $BASEPARAM | sed 's/^hold.*//'` ++ ++#debug=true ++ ++if [ -z "$MODE" ] ; then ++ MODE=hold ++ TARGET=`echo $BASEPARAM | sed 's/^hold_//'` ++else ++ MODE=cpu ++ TARGET=`echo $BASEPARAM | sed 's/^cpu_//'` ++fi ++ ++CPU1=0 ++if [ -n "$TARGET" ] ; then ++ if [ "${#TARGET}" == 1 ] ; then ++ if [ $debug ] ; then echo $MODE, only on cpu $TARGET, for all vservers ; fi ++ WHAT=ALLVSERVER ++ CPU1=$TARGET ++ else ++ if [ $debug ] ; then echo $MODE on all cpus together, only for vserver $TARGET ; fi ++ WHAT=VSERVER ++ fi ++else ++ if [ $debug ] ; then echo $MODE for all cpus, for all vservers ; fi ++ WHAT=ALLVSERVER ++fi ++ ++CPUS=$[ `grep ^processor /proc/cpuinfo|wc -l` -1 ] ++CPUS=`seq $CPU1 $CPUS` ++ ++if [ $debug ] ; then ++ echo cpus= $CPUS ++ echo baseparam= $BASEPARAM ++ echo mode= $MODE ++ echo target= $TARGET ++ echo what= $WHAT ++fi ++ ++if [ "$1" = "config" ]; then ++ echo 'graph_category vserver' ++ echo 'graph_args --base 1000' ++ if [ "$MODE" == "cpu" ] ; then ++ echo 'graph_title Vserver cpu usage' ++ echo 'graph_vlabel jiffies used per cpu per ${graph_period}' ++ echo 'graph_info Shows jiffies used per cpu on each vserver.' ++ else ++ echo 'graph_title Vserver cpu on hold' ++ echo 'graph_vlabel jiffies on hold per cpu per ${graph_period}' ++ echo 'graph_info Shows jiffies on hold used per cpu on each vserver.' ++ fi ++ ++ for j in $CPUS ; do ++ A=0 ++ for i in $XIDS ; do ++ LABEL=`cat /proc/virtual/$i/$NAMELOC |grep NodeName |cut -f2` ++ if [ "$WHAT" == "ALLVSERVER" ] || [ "$TARGET" == "$LABEL" ] ; then ++ NAME=`echo $LABEL | cut -d. -f1 | tr '-' '_'` ++ if [ "$MODE" == "cpu" ] ; then ++ echo "${NAME}_$j.label cpu usage for cpu $j on $LABEL" ++ echo "${NAME}_$j.info cpu usage for cpu $j on $LABEL." ++ else ++ echo "${NAME}_$j.label on hold for cpu $j on $LABEL" ++ echo "${NAME}_$j.info on hold for cpu $j on $LABEL." ++ fi ++ echo "${NAME}_$j.type COUNTER" ++ if [ "$A" == 0 ] ; then ++ echo "${NAME}_$j.draw AREA" ++ A=1 ++ else ++ echo "${NAME}_$j.draw STACK" ++ fi ++ fi ++ done ++ done ++ exit 0 ++fi ++ ++for j in $CPUS ; do ++ for i in $XIDS ; do ++ LABEL=`cat /proc/virtual/$i/$NAMELOC |grep NodeName |cut -f2` ++ if [ "$WHAT" == "ALLVSERVER" ] || [ "$TARGET" == "$LABEL" ] ; then ++ NAME=`echo $LABEL | cut -d. -f1 | tr '-' '_'` ++ echo -n "${NAME}_$j.value " ++ if [ "$MODE" == "cpu" ] ; then ++ USERCPU=`cat /proc/virtual/$i/sched |grep "cpu $j"| cut -d' ' -f3` ++ SYSCPU=`cat /proc/virtual/$i/sched |grep "cpu $j"| cut -d' ' -f4` ++ echo $[$USERCPU + $SYSCPU] ++ else ++ cat /proc/virtual/$i/sched |grep "cpu $j"| cut -d' ' -f5 ++ fi ++ fi ++ done ++done ++ ++ +Index: munin-1.2.6/node/node.d.linux/vserver_loadavg.in +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ munin-1.2.6/node/node.d.linux/vserver_loadavg.in 2008-07-20 22:43:11.000000000 +0200 +@@ -0,0 +1,123 @@ ++#!/bin/bash ++# ++# Copyright (C) 2007 Andrei Morgan ++# Copyright (C) 2008 Micah Anderson ++# ++# This program is free software; you can redistribute it and/or ++# modify it under the terms of the GNU General Public License ++# as published by the Free Software Foundation; version 2 dated June, ++# 1991. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++ ++# Graph Vserver load average ++# ++# Configuration variables ++# vservers - specify the vservers to include in the graph (default: all) ++# ++# NOTE: If no configuration variables are set, the defaults will be used ++ ++# Example /etc/munin/plugin-conf.d/munin-node ++# ++# The following monitors the load average for vservers 1 and 3: ++# ++# [vserver_loadavg] ++# user root ++# env.vservers vserver1 vserver3 ++ ++# Changelog ++# version 0.1 - 2007 June 26 ++# Andrei Morgan ++# - initial author, based upon vserver_resources by Holger Levsen and ++# Micah Anderson, and upon the examples in the munin wiki. ++# version 0.2 - 2008 July 7 ++# Micah Anderson ++# - fix cvirt vs. nsproxy issue with newer kernels by adding $NAMELOC which ++# is aware of VCI_SPACES (> 2.6.19) as well as the older version ++ ++# If run with the "autoconf"-parameter, give our opinion on whether we ++# should be run on this system or not. This is optional, and only used by ++# munin-config. In the case of this plugin, we should most probably ++# always be included whwn there is a vserver kernel. ++ ++if [ "$1" = "autoconf" ]; then ++ echo yes ++ exit 0 ++fi ++ ++ ++# if vservers are specified, use them; the default is to use all. ++VSERVERS="$vservers" ++ ++INFO=(`sed 's/.*:\t//' /proc/virtual/info 2>/dev/null || echo ''`) ++KCIN="$[ 16#${INFO[2]} ]"; ++ ++# If this is 1, then VCI_SPACES is present in the kernel (new in 2.6.19) ++if [ $[ (KCIN >> 10) & 1 ] -eq 1 ] ++then ++ NAMELOC="nsproxy" ++else ++ NAMELOC="cvirt" ++fi ++ ++if [ -z "$VSERVERS" ] ; then ++ XIDS=`find /proc/virtual/* -type d -exec basename {} \;` ++else ++ # it's really more performant to specify vservers by ids or not at all ++ XIDS="" ++ for i in $VSERVERS ; do ++ if [ -d /proc/virtual/$i ] ; then ++ XIDS="${XIDS}${i} " ++ else ++ for j in `find /proc/virtual/* -type d -exec basename {} \;` ; do ++ if [ "$i" = "`cat /proc/virtual/$j/$NAMELOC |grep NodeName |cut -f2`" ] ; then ++ XIDS="${XIDS}${j} " ++ fi ++ done ++ fi ++ done ++fi ++ ++# If run with the "config"-parameter, give out information on how the ++# graphs should look. ++if [ "$1" = "config" ]; then ++ # The title of the graph ++ echo 'graph_title loadavg of vserver' ++ # Arguments to "rrdtool graph". In this case, tell it that the ++ # lower limit of the graph is '0', and that 1k=1000 (not 1024) ++ echo 'graph_args --base 1000 -l 0' ++ # We want Cur/Min/Avg/Max unscaled (i.e. 0.42 load instead of ++ # 420 milliload) ++ echo 'graph_scale no' ++ # The Y-axis label ++ echo 'graph_vlabel loadavg' ++ # graph information for the main table ++ echo 'graph_info Shows 5-minute load average per vserver.' ++ # Graph category. Defaults to 'other' ++ echo 'graph_category vserver' ++ for xid in $XIDS ; do ++ # Specify the vservers ++ LABEL=`cat /proc/virtual/$xid/$NAMELOC |grep NodeName |cut -f2` ++ NAME=`echo $LABEL | cut -d. -f1 | tr '-' '_'` ++ echo "$NAME.label $LABEL: load average" ++ echo "$NAME.info $NAME average load for the past 5 minutes" ++ done ++ # Last, if run with the "config"-parameter, quit here (don't ++ # display any data) ++ exit 0 ++fi ++ ++for xid in $XIDS ; do ++ LABEL=`cat /proc/virtual/$xid/$NAMELOC |grep NodeName |cut -f2` ++ NAME=`echo $LABEL | cut -d. -f1 | tr '-' '_'` ++ echo -n "$NAME.value "; ++ cat /proc/virtual/$xid/cvirt | grep loadavg: | cut -d' ' -f2 ++done ++ +Index: munin-1.2.6/node/node.d.linux/vserver_resources.in +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ munin-1.2.6/node/node.d.linux/vserver_resources.in 2008-07-20 22:43:11.000000000 +0200 +@@ -0,0 +1,317 @@ ++#!/bin/bash ++# ++# Copyright (C) 2006-2008 Holger Levsen, Micah Anderson ++# ++# This program is free software; you can redistribute it and/or ++# modify it under the terms of the GNU General Public License ++# as published by the Free Software Foundation; version 2 dated June, ++# 1991. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++ ++# Graph Vserver resource usage and limits ++# ++# Configuration variables ++# vservers - specify the vservers to include in the graph (default: all) ++# resource - specify the resource to be monitored (no default) ++# limits - if true, turn on limit graphing (default: false) ++# ++# NOTE: If no configuration variables are set, the defaults will be used ++ ++# Example /etc/munin/plugin-conf.d/munin-node ++# ++# The following monitors the RSS value for the vservers named ++# "vserver1 vserver2 vserver3 vserver4" and looks to see if the ++# resource limit has been breached, if so it sends a message to nagios ++# via send_nsca, and sends an email to notify that this has happened: ++# ++# [vserver_resources] ++# user root ++# env.vservers vserver1 vserver2 vserver3 vserver4 ++# env.resource RSS ++# env.limits 1 ++# contacts nagios email ++# contact.nagios.command /usr/bin/send_nsca -H your.nagios-host.here -c /etc/send_nsca.cfg ++# contact.email.command mail -s "Munin-notification for ${var:group} :: ${var:host}" your@email.address.here ++# ++# This second example monitors the VM value for all vservers on the system and ++# has no limit notifications turned on: ++# ++# [vserver_resources] ++# user root ++# env.vservers vserver5 vserver6 vserver7 ++# env.resource VM ++# env.limits 0 ++# ++# This last example monitors all the resources for vserver5. Note that ++# this will be a busy graph, and it would be really useless if you ++# specified more than one vserver when the resource is set to ALL: ++# ++# [vserver_resources] ++# user root ++# env.vservers vserver5 ++# env.resource ALL ++# env.limits 0 ++ ++# Possible values for env.resource are: ++# ++# ALL - all the below resources ++# PROC - number of processes ++# VM - sum of all virtual pages inside the guest ++# VML - sum of all virtual pages locked into memory ++# RSS - number of pages currently present in RAM ++# ANON - number of anonymous memory pages ++# FILES - number of open files ++# OFD ++# LOCKS ++# SOCK ++# MSGQ ++# SHM - number of shared memory pages ++ ++# Changelog ++# version 0.1 - 2006 April xx ++# Holger Levsen ++# - initial author ++# version 0.2 - 2006 April 24 ++# Micah Anderson ++# - Add dynamic arch page size determination ++# - Some cleanup and clarification ++# version 0.3 - 2006 May 3 ++# Micah Anderson ++# - Add ability to group vservers via environment vars ++# - Fix missing close quotes and standardize indents ++# - Add limit notification ++# - Update documentation to include info on groups and limits ++# version 0.4 - 2006 Jun 22 ++# Micah Anderson ++# - Fix error that results if NodeName is set to include a domain name ++# version 0.5 - 2006 Oct ++# Micah Anderson ++# - fixed changelog entries so more changes can happen per version ++# - standardized changelog date and name format ++# - added myself to copyright ++# - standardized indentation ++# - abstracted from just RSS to be usable for any resource specified ++# Holger Levsen ++# - Fix hypens in NodeNames, replace them with underscores ++# - Fix the fix from version 0.4 ++# - allow specifying the ressource by linking ++# (ln -s vserver_resources vserver_VM) ++# - provided info about all resources ++# - code cleaned ++# - errors if an invalid resource is specified ++# - handle identical vserver-names by using the vserver-id internally ++# version 0.6 - 2007 Oct ++# Micah Anderson ++# - removed BASENAME - plugin isn't a wildcard plugin any longer ++# - added $NAMELOC - fixes plugin so it works with VCI_SPACES (> 2.6.19) as well as older version ++# ++# TODO: ++# - make it so you can specify more than one resource to be graphed? ++# or define combined ressource-display: VM+RSS+ANON+SHM and FILES+OFD+LOCK+SOCK ++# (for one vserver only) ++# - and/or make it so you can graph all resources for one vserver ++# - set a default for the resource if it is unset? ++# - use /proc less often (100 times more overhead than talking to the kernel directly) ++# i.e. use something like pagesize=`perl -MPOSIX -e 'print POSIX::sysconf(_SC_PAGESIZE), "\n";'` ++# - ALL resource is broken ++ ++VSERVERS="$vservers" ++LIMITS="$limits" ++RESOURCE="$resource" ++ ++INFO=(`sed 's/.*:\t//' /proc/virtual/info 2>/dev/null || echo ''`) ++KCIN="$[ 16#${INFO[2]} ]"; ++ ++# If this is 1, then VCI_SPACES is present in the kernel (new in 2.6.19) ++if [ $[ (KCIN >> 10) & 1 ] -eq 1 ] ++then ++ NAMELOC="nsproxy" ++else ++ NAMELOC="cvirt" ++fi ++ ++if [ -z "$VSERVERS" ] ; then ++ XIDS=`find /proc/virtual/* -type d -exec basename {} \;` ++else ++ # it's really more performant to specify vservers by ids or not at all ++ XIDS="" ++ for i in $VSERVERS ; do ++ if [ -d /proc/virtual/$i ] ; then ++ XIDS="${XIDS}${i} " ++ else ++ for j in `find /proc/virtual/* -type d -exec basename {} \;` ; do ++ if [ "$i" = "`cat /proc/virtual/$j/$NAMELOC |grep NodeName |cut -f2`" ] ; then ++ XIDS="${XIDS}${j} " ++ fi ++ done ++ fi ++ done ++fi ++ ++if [ "$1" = "config" ]; then ++ case "$RESOURCE" in ++ PROC) ++ echo 'graph_title Processes used by vserver' ++ echo 'graph_args --base 1024k -l 0' ++ echo 'graph_vlabel Processes' ++ echo 'graph_info Shows the number of processes used by each vserver.' ++ ;; ++ VM) ++ echo 'graph_title Virtual memory used by vserver' ++ echo 'graph_args --base 1024k -l 0' ++ echo 'graph_vlabel VM pages' ++ echo 'graph_info Shows virtual memory (human readable) used by each vserver.' ++ ;; ++ VML) ++ echo 'graph_title Locked memory used by vserver' ++ echo 'graph_args --base 1024k -l 0' ++ echo 'graph_vlabel VML pages' ++ echo 'graph_info Shows locked memory (human readable) used by each vserver.' ++ ;; ++ RSS) ++ echo 'graph_title Resident set size used by vserver' ++ echo 'graph_args --base 1024k -l 0' ++ echo 'graph_vlabel RSS pages' ++ echo 'graph_info Shows resident set size (human readable) used by each vserver.' ++ ;; ++ ANON) ++ echo 'graph_title Anonymous memory used by vserver' ++ echo 'graph_args --base 1024k -l 0' ++ echo 'graph_vlabel ANON pages' ++ echo 'graph_info Shows anonymous memory (human readable) used by each vserver.' ++ ;; ++ FILES) ++ echo 'graph_title Files used by vserver' ++ echo 'graph_args --base 1024k -l 0' ++ echo 'graph_vlabel Files' ++ echo 'graph_info Shows files used by each vserver.' ++ ;; ++ OFD) ++ echo 'graph_title Open filedescriptors used by vserver' ++ echo 'graph_args --base 1024k -l 0' ++ echo 'graph_vlabel Open filedescriptors' ++ echo 'graph_info Shows open filedescriptors used by each vserver.' ++ ;; ++ LOCKS) ++ echo 'graph_title Locks used by vserver' ++ echo 'graph_args --base 1024k -l 0' ++ echo 'graph_vlabel Locks' ++ echo 'graph_info Shows locks used by each vserver.' ++ ;; ++ SOCK) ++ echo 'graph_title Sockets used by vserver' ++ echo 'graph_args --base 1024k -l 0' ++ echo 'graph_vlabel Sockets' ++ echo 'graph_info Shows sockets used by each vserver.' ++ ;; ++ MSGQ) ++ echo 'graph_title Message queues used by vserver' ++ echo 'graph_args --base 1024k -l 0' ++ echo 'graph_vlabel Message queues' ++ echo 'graph_info Shows message queues used by each vserver.' ++ ;; ++ SHM) ++ echo 'graph_title Shared memory used by vserver' ++ echo 'graph_args --base 1024k -l 0' ++ echo 'graph_vlabel SHM pages' ++ echo 'graph_info Shows shared memory (human readable) used by each vserver.' ++ ;; ++ *) ++ echo "$RESOURCE not defined." ++ exit 1 ++ ;; ++ esac ++ echo 'graph_category vserver' ++ ++ ++ # do not assume we are on i386 where pagesize is 4096... ++ pagesize=`perl -MPOSIX -e 'print POSIX::sysconf(_SC_PAGESIZE), "\n";'` ++ ++ for xid in $XIDS ; do ++ ++ LABEL=`cat /proc/virtual/$xid/$NAMELOC |grep NodeName |cut -f2` ++ NAME=`echo $LABEL | cut -d. -f1 | tr '-' '_'` ++ ++ case "$RESOURCE" in ++ PROC) ++ echo "$NAME.label $LABEL: processes" ++ echo "$NAME.info Number of processes used by $LABEL." ++ ;; ++ VM) ++ echo "$NAME.label $LABEL: Virtual memory" ++ echo "$NAME.info Size of virtual memory used by $LABEL. (Number multipled by $pagesize to make it human readable)" ++ echo "$NAME.cdef $NAME,$pagesize,*" ++ ;; ++ VML) ++ echo "$NAME.label $LABEL: Locked memory" ++ echo "$NAME.info Size of locked memory used by $LABEL. (Number multipled by $pagesize to make it human readable)" ++ echo "$NAME.cdef $NAME,$pagesize,*" ++ ;; ++ RSS) ++ echo "$NAME.label $LABEL: Resident set size" ++ echo "$NAME.info Size of resident set size used by $LABEL. (Number multiplied by $pagesize to make it human readable)" ++ echo "$NAME.cdef $NAME,$pagesize,*" ++ ;; ++ ANON) ++ echo "$NAME.label $LABEL: Anonymous memory" ++ echo "$NAME.info Size of anonymous memory used by $LABEL. (Number multiplied by $pagesize to make it human readable)" ++ echo "$NAME.cdef $NAME,$pagesize,*" ++ ;; ++ FILES) ++ echo "$NAME.label $LABEL: Files" ++ echo "$NAME.info Number of files used by $LABEL." ++ ;; ++ OFD) ++ echo "$NAME.label $LABEL: Open filedescriptors" ++ echo "$NAME.info Number of open filedescriptors used by $LABEL." ++ ;; ++ LOCKS) ++ echo "$NAME.label $LABEL: Locks" ++ echo "$NAME.info Number of locks used by $LABEL." ++ ;; ++ SOCK) ++ echo "$NAME.label $LABEL: Sockets" ++ echo "$NAME.info Number of sockets used by $LABEL." ++ ;; ++ MSGQ) ++ echo "$NAME.label $LABEL: Message queues" ++ echo "$NAME.info Number of message queues used by $LABEL." ++ ;; ++ SHM) ++ echo "$NAME.label $LABEL: Shared memory" ++ echo "$NAME.info Size of shared memory used by $LABEL. (Number multiplied by $pagesize to make it human readable)" ++ echo "$NAME.cdef $1,$pagesize,*" ++ ;; ++ *) ++ echo "$RESOURCE not defined." ++ exit 1 ++ ;; ++ esac ++ ++ if [ ! -z "$LIMITS" -a "$LIMITS" = 1 ]; then ++ LIMIT=`cat /proc/virtual/$xid/limit | grep $RESOURCE | cut -f4` ++ if [ ${LIMIT:-0} -gt 0 ]; then ++ echo "$NAME.critical $LIMIT" ++ fi ++ fi ++ done ++ exit 0 ++fi ++ ++ ++for xid in $XIDS ; do ++ LABEL=`cat /proc/virtual/$xid/$NAMELOC |grep NodeName |cut -f2` ++ NAME=`echo $LABEL | cut -d. -f1 | tr '-' '_'` ++ cat /proc/virtual/$xid/limit | awk -v name="${NAME}" -v resource="${RESOURCE}:" \ ++ '{ if ( $1 == resource ) ++ printf "%s.value %d\n", name, $2 }' ++done ++ --- munin-1.2.6.orig/debian/patches/470-munin-run-man-typo.patch +++ munin-1.2.6/debian/patches/470-munin-run-man-typo.patch @@ -0,0 +1,13 @@ +Index: munin-1.2.6/node/munin-run.in +=================================================================== +--- munin-1.2.6.orig/node/munin-run.in 2009-02-26 22:55:18.000000000 +0100 ++++ munin-1.2.6/node/munin-run.in 2009-02-26 22:55:59.000000000 +0100 +@@ -731,7 +731,7 @@ + =head1 DESCRIPTION + + Munin-node is a daemon that Munin connects to fetch data. This data +-is stored in .rrd-files on the central server , and later graphed and ++is stored in .rrd-files on the central server, and later graphed and + htmlified. + + munin-run is a perlscript to run the plugins used by the munin-node --- munin-1.2.6.orig/debian/patches/340-nfsd-fix.patch +++ munin-1.2.6/debian/patches/340-nfsd-fix.patch @@ -0,0 +1,70 @@ +Index: munin-1.2.6/node/node.d.linux/nfsd.in +=================================================================== +--- munin-1.2.6.orig/node/node.d.linux/nfsd.in 2008-08-12 16:11:27.000000000 +0200 ++++ munin-1.2.6/node/node.d.linux/nfsd.in 2008-08-12 15:29:19.000000000 +0200 +@@ -1,39 +1,7 @@ + #!/bin/sh + # + # Plugin created by Alexandre Dupouy, with the assistance of Mike Fedyk +-# +-# $Log$ +-# Revision 1.9.2.1 2005/03/16 13:45:45 ilmari +-# Fix autoconf for linux/{nfsd,nfs_client}. +-# +-# Revision 1.9 2004/12/10 10:47:49 jimmyo +-# Change name from ${scale} to ${graph_period}, to be more consistent. +-# +-# Revision 1.8 2004/12/09 22:12:56 jimmyo +-# Added "graph_period" option, to make "graph_sums" usable. +-# +-# Revision 1.7 2004/11/21 00:17:12 jimmyo +-# Changed a lot of plugins so they use DERIVE instead of COUNTER. +-# +-# Revision 1.6 2004/10/01 12:32:09 ilmari +-# complete "rpc" removal +-# +-# Revision 1.5 2004/10/01 08:40:50 ilmari +-# Remove useless 'rpc' field, add total field +-# +-# Revision 1.4 2004/05/20 19:02:37 jimmyo +-# Set categories on a bunch of plugins +-# +-# Revision 1.3 2004/05/15 21:33:29 jimmyo +-# "Upped" som plugins from contrib/manual to manual or auto. +-# +-# Revision 1.2 2004/05/06 21:55:18 jimmyo +-# Added patch to contrib-plugin linux/nfsd, to graph rpc count (Alexandre Dupouy). +-# +-# Revision 1.1 2004/02/18 18:41:54 jimmyo +-# Plugin created by Alexandre Dupouy, with the assistance of Mike Fedyk +-# +-# ++# $Id: nfsd.in 1696 2008-08-12 13:29:18Z matthias $ + #%# family=auto + #%# capabilities=autoconf + +@@ -64,10 +32,17 @@ + + i=4; + +-for a in $proc; do +- echo -n "$a.value " +- grep proc3 $NFSD \ +- | cut -f $i -d ' ' \ +- | awk '{print $1}' +- i=$(expr $i + 1) +-done ++if [ -r $NFSD ]; ++then ++ for a in $proc; do ++ echo -n "$a.value " ++ grep proc3 $NFSD \ ++ | cut -f $i -d ' ' \ ++ | awk '{print $1}' ++ i=$(expr $i + 1) ++ done ++else ++ echo "Cannot read $NFSD" >&2 ++ exit -1 ++fi ++ --- munin-1.2.6.orig/debian/patches/370-plugin-doc-typos.patch +++ munin-1.2.6/debian/patches/370-plugin-doc-typos.patch @@ -0,0 +1,40 @@ +Index: munin-1.2.6/node/Plugin.pm.in +=================================================================== +--- munin-1.2.6.orig/node/Plugin.pm.in 2008-08-24 17:31:37.000000000 +0000 ++++ munin-1.2.6/node/Plugin.pm.in 2008-08-24 17:32:41.000000000 +0000 +@@ -29,7 +29,7 @@ + use Munin::Plugin; + + If your Munin installation predates the MUNIN_* environment variables +-(introduced in 1.3.3) you can put this in your plugin configutation: ++(introduced in 1.3.3) you can put this in your plugin configuration: + + [*] + env.MUNIN_PLUGSTATE /lib/munin/plugin-state +@@ -79,7 +79,7 @@ + But there is also a function to change the state file name so the + state file support functions can be used for several state files. + +-If it's value cannot be determined the plugin will be aborted at once ++If its value cannot be determined the plugin will be aborted at once + with an explanatory message. The most likely causes are + + =over 8 +@@ -243,7 +243,7 @@ + program in the interest of error-obviousness. + + The state file name is determined automatically based on the +-name of the process we're running as. Se L<$Munin::Plugin::me>, ++name of the process we're running as. See L<$Munin::Plugin::me>, + L<$Munin::Plugin::statefile> and L above about the + file name. + +@@ -315,7 +315,7 @@ + rotated a warning is printed (this can be found in the munin-node log + or seen in the terminal when using munin-run). + +-At this point the plugin can read from the file with <$file_hanle> in ++At this point the plugin can read from the file with <$file_handle> in + loop as usual until EOF is encountered. + + If the file cannot be stat'ed C<(undef,undef)> is returned. If the --- munin-1.2.6.orig/debian/patches/480-node.d-apache-asterisk.patch +++ munin-1.2.6/debian/patches/480-node.d-apache-asterisk.patch @@ -0,0 +1,40 @@ +# already fixed upstream +Index: munin-1.2.6/node/node.d/apache_accesses.in +=================================================================== +--- munin-1.2.6.orig/node/node.d/apache_accesses.in 2009-05-28 19:56:49.000000000 +0200 ++++ munin-1.2.6/node/node.d/apache_accesses.in 2009-05-28 19:57:12.000000000 +0200 +@@ -37,7 +37,7 @@ + env.ports 80 + + The %d in the url will be replaced with the port. The default port is +-80 as snown. ++80 as shown. + + The port list is a space separated list of ports. NOTE that one + single Apache can have several open ports, and the plugin needs only +Index: munin-1.2.6/node/node.d/apache_processes.in +=================================================================== +--- munin-1.2.6.orig/node/node.d/apache_processes.in 2009-05-28 19:56:49.000000000 +0200 ++++ munin-1.2.6/node/node.d/apache_processes.in 2009-05-28 19:57:16.000000000 +0200 +@@ -36,7 +36,7 @@ + env.ports 80 + + The %d in the url will be replaced with the port. The default port is +-80 as snown. ++80 as shown. + + The port list is a space separated list of ports. NOTE that one + single Apache can have several open ports, and the plugin needs only +Index: munin-1.2.6/node/node.d/apache_volume.in +=================================================================== +--- munin-1.2.6.orig/node/node.d/apache_volume.in 2009-05-28 19:56:49.000000000 +0200 ++++ munin-1.2.6/node/node.d/apache_volume.in 2009-05-28 19:57:20.000000000 +0200 +@@ -35,7 +35,7 @@ + env.ports 80 + + The %d in the url will be replaced with the port. The default port is +-80 as snown. ++80 as shown. + + The port list is a space separated list of ports. NOTE that one + single Apache can have several open ports, and the plugin needs only --- munin-1.2.6.orig/debian/patches/140-node.d-ups_.patch +++ munin-1.2.6/debian/patches/140-node.d-ups_.patch @@ -0,0 +1,129 @@ +Index: munin-1.2.6/node/node.d/ups_ +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ munin-1.2.6/node/node.d/ups_ 2008-06-27 17:53:15.000000000 +0200 +@@ -0,0 +1,124 @@ ++#!/bin/bash ++# ++# Plugin to monitor various statistics exported by a UPS. ++# ++# Written by Andras Korn in 2005. Licensed under the GPL. ++# ++# usage: ups_upsid_function ++# ++#%# family=contrib ++#%# capabilities=autoconf suggest ++ ++UPS=$(basename $0 | cut -d_ -f2) ++FUNCTION=$(basename $0 | cut -d_ -f3) ++ ++if [ "$1" = "autoconf" ]; then ++ [ -x /bin/upsc ] && [ -r /etc/nut/ups.conf ] && echo yes && exit 0 ++ echo "no (/bin/upsc or /etc/nut/ups.conf not found)" ++ exit 1 ++fi ++ ++if [ "$1" = "suggest" ]; then ++ grep '^\[[^]]*\]$' /etc/nut/ups.conf \ ++ | tr -d '][' \ ++ | while read ups; do ++ for i in voltages freq charge current; do ++ echo ${ups}_${i} ++ done ++ done ++fi ++ ++function voltages() { ++ if [ "$1" = "config" ]; then ++ ++ echo "graph_title $UPS voltages" ++ echo "graph_args --base 1000 -l 0" ++ echo "graph_vlabel Volt" ++ for i in battery nominal input output; do ++ echo "${i}.label $i" ++ echo "${i}.type GAUGE" ++ echo "${i}.max 1000" ++ echo "${i}.min 0" ++ done ++ else ++ upsc $UPS | sed -n '/volt/{ ++ s/:// ++ /nominal/s/.* /nominal.value / ++ /voltage/s/\.[^ ]*/.value/ ++ p ++ }' ++ fi ++} ++ ++function charge() { ++ if [ "$1" = "config" ]; then ++ ++ echo "graph_title $UPS charge" ++ echo "graph_args --base 1000 -l 0" ++ echo "graph_vlabel %" ++ for i in charge low load; do ++ echo "${i}.label $i" ++ echo "${i}.type GAUGE" ++ echo "${i}.max 100" ++ echo "${i}.min 0" ++ done ++ else ++ upsc $UPS | sed -n '/charge/{ ++ s/^[^:]*\.//g ++ s/:/.value/ ++ p ++ } ++ /load/{ ++ s/.*:/load.value/ ++ p ++ }' ++ fi ++} ++ ++function frequency() { ++ if [ "$1" = "config" ]; then ++ ++ echo "graph_title $UPS input AC frequency" ++ echo "graph_args --base 1000 -l 0" ++ echo "graph_vlabel frequency 1/s" ++ echo "acfreq.label AC frequency" ++ echo "acfreq.type GAUGE" ++ echo "acfreq.max 100" ++ echo "acfreq.min 5" ++ else ++ upsc $UPS | sed -n '/freq/{s/.*:/acfreq.value/;p}' ++ fi ++} ++ ++function current() { ++ if [ "$1" = "config" ]; then ++ ++ echo "graph_title $UPS output current" ++ echo "graph_args --base 1000 -l 0" ++ echo "graph_vlabel Amper" ++ echo "current.label out-current" ++ echo "current.type GAUGE" ++ echo "current.max 100" ++ echo "current.min 0" ++ else ++ upsc $UPS | sed -n '/current/{s/.*:/current.value/;p}' ++ fi ++} ++ ++[ "$1" = "config" ] && echo "graph_category sensors" ++ ++case "$FUNCTION" in ++ voltages) ++ voltages $1 ++ ;; ++ charge) ++ charge $1 ++ ;; ++ freq) ++ frequency $1 ++ ;; ++ current) ++ current $1 ++ ;; ++esac ++ --- munin-1.2.6.orig/debian/patches/235-ip_.patch +++ munin-1.2.6/debian/patches/235-ip_.patch @@ -0,0 +1,42 @@ +Index: munin-1.2.6/node/node.d.linux/ip_.in +=================================================================== +--- munin-1.2.6.orig/node/node.d.linux/ip_.in 2008-06-28 21:34:58.000000000 +0200 ++++ munin-1.2.6/node/node.d.linux/ip_.in 2008-06-28 21:36:13.000000000 +0200 +@@ -16,27 +16,7 @@ + # + # This plugin is based on the if_ plugin. + # +-#$Log$ +-#Revision 1.7 2004/12/10 10:47:49 jimmyo +-#Change name from ${scale} to ${graph_period}, to be more consistent. +-# +-#Revision 1.6 2004/12/09 22:12:56 jimmyo +-#Added "graph_period" option, to make "graph_sums" usable. +-# +-#Revision 1.5 2004/11/21 00:17:12 jimmyo +-#Changed a lot of plugins so they use DERIVE instead of COUNTER. +-# +-#Revision 1.4 2004/09/10 23:06:30 jimmyo +-#Added accidentally deleted exit. +-# +-#Revision 1.3 2004/09/10 23:02:22 jimmyo +-#Plugin linux/ip_ now does more proper autoconfig/suggest. +-# +-#Revision 1.2 2004/05/20 13:57:12 jimmyo +-#Set categories to some of the plugins. +-# +-#Revision 1.1 2004/05/16 16:28:40 jimmyo +-#Linux/ip_ wildcard plugin contributed by Mathy Vanvoorden (SF#954851). ++#$Id:$ + # + # + # Magic markers (optional - used by munin-config and some installation +@@ -65,7 +45,7 @@ + fi + + if [ "$1" = "suggest" ]; then +- iptables -L INPUT -v -n -x 2>/dev/null | awk '$8 ~ /[0-9]/ { if (done[$8]!=1) {print $8; done[$8]=1;}}' ++ iptables -L INPUT -v -n -x 2>/dev/null | awk --posix '$8 ~ /^([0-9]{1,3}\.){3}[0-9]{1,3}$/ { if (done[$8]!=1) {print $8; done[$8]=1;}}' + exit 0 + fi + --- munin-1.2.6.orig/debian/patches/series +++ munin-1.2.6/debian/patches/series @@ -0,0 +1,54 @@ +480-node.d-apache-asterisk.patch +490-node.d-asterisk-if.in +500-node.d-bind9_rndc-3.5 +430-apc_nis-line_volt.patch +400-style_css.patch +391-munin-node-ipv6.patch +390-munin-run-ipv6.patch +380-munin-graph-utf8.patch +160-node.d-postgres-plugins.patch +360-fw_conntrack-graph_args.patch +350-munin-run-usage-fix.patch +340-nfsd-fix.patch +320-sensors_fix +330-courier-typo +310-node-configure_bugfix +300-vserver_plugins +290-postfix_spooldir +280-if_regex +270-Plugin.pm-typo.patch +240-amavis-logtail.patch +250-amavis-maillog.patch +260-courier-logtail.patch +150-node.d-openvpn +235-ip_.patch +140-node.d-ups_.patch +234-smart_.patch +233-df_and_df_inode.patch +230-exim_mailqueue.patch +220-Makefile.patch +210-munindoc-manpage.patch +100-node.d-tomcat_access.patch +110-node.d-tomcat_jvm.patch +120-node.d-tomcat_threads.patch +130-node.d-tomcat_volume.patch +200-node-plugins.history.patch +231-exim_mailstats.patch +232-ntp_offset.patch +236-nut_misc.patch +370-plugin-doc-typos.patch +381-munin-graph-column-indention.patch +410-muninnodeconf-manpage.patch +420-munin-limits.excessive-notifications.patch +440-node.d.linux-iostat.patch +450-munin-cgi-graph.patch +460-munin-cgi-graph-mkdir.patch +460-netstat-regex.patch +470-munin-run-man-typo.patch +211-munin-manpage.patch +510-fix-bashisms +520-node.d-nut-plugins +530-node.d.linux-cpu-scale-with-HZ +540-node.d-acpi-lenny +550-ejabberd-plugin +560-asterisk-plugins --- munin-1.2.6.orig/debian/patches/280-if_regex +++ munin-1.2.6/debian/patches/280-if_regex @@ -0,0 +1,13 @@ +Index: munin-1.2.6/node/node.d.linux/if_.in +=================================================================== +--- munin-1.2.6.orig/node/node.d.linux/if_.in 2008-07-20 21:32:46.000000000 +0200 ++++ munin-1.2.6/node/node.d.linux/if_.in 2008-07-20 22:04:15.000000000 +0200 +@@ -93,7 +93,7 @@ + + if [ "$1" = "suggest" ]; then + if [ -r /proc/net/dev ]; then +- egrep '^ *(eth|wlan|ath|ra)[0-9]+:' /proc/net/dev | cut -f1 -d: | sed 's/ //g' ++ egrep '^ *(eth|wlan|ath|ra|msh|venet|veth)[0-9]+:' /proc/net/dev | cut -f1 -d: | sed 's/ //g' + exit 0 + else + exit 1 --- munin-1.2.6.orig/debian/patches/100-node.d-tomcat_access.patch +++ munin-1.2.6/debian/patches/100-node.d-tomcat_access.patch @@ -0,0 +1,100 @@ +Index: munin-1.2.6/node/node.d/tomcat_access.in +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ munin-1.2.6/node/node.d/tomcat_access.in 2008-10-05 22:54:54.000000000 +0200 +@@ -0,0 +1,95 @@ ++#!@@PERL@@ ++# ++# Plugin to monitor the number of accesses to Tomcat servers. ++# ++# Author: Rune Nordbøe Skillingstad ++# ++# Requirements: ++# - Needs access to http://:@localhost:8080/manager/status?XML=true (or modify the ++# address for another host). A munin-user in $CATALINA_HOME/conf/tomcat-users.xml ++# should be set up for this to work. ++# ++# Tip: To see if it's already set up correctly, just run this plugin ++# with the parameter "autoconf". If you get a "yes", everything should ++# work like a charm already. ++# ++# tomcat-users.xml example: ++# ++# ++# Parameters supported: ++# ++# config ++# autoconf ++# ++# Configurable variables ++# ++# timeout - Connection timeout ++# url - Override default status-url ++# ports - HTTP port numbers ++# user - Manager username ++# password - Manager password ++# ++# Magic markers: ++#%# family=auto ++#%# capabilities=autoconf ++ ++use strict; ++ ++my $ret = undef; ++ ++if(!eval "require LWP::UserAgent;") { ++ $ret = "LWP::UserAgent not found"; ++} ++ ++if(!eval "require XML::Simple;") { ++ $ret .= "XML::Simple not found"; ++} ++ ++my $URL = exists $ENV{'url'} ? $ENV{'url'} : "http://%s:%s\@127.0.0.1:%d/manager/status?XML=true"; ++my $PORT = exists $ENV{'ports'} ? $ENV{'ports'} : 8080; ++my $USER = exists $ENV{'user'} ? $ENV{'user'} : "munin"; ++my $PASSWORD = exists $ENV{'password'} ? $ENV{'password'} : "munin"; ++my $TIMEOUT = exists $ENV{'timeout'} ? $ENV{'timeout'} : 30; ++ ++my $url = sprintf $URL, $USER, $PASSWORD, $PORT; ++ ++if(exists $ARGV[0] and $ARGV[0] eq "autoconf") { ++ if($ret) { ++ print "no ($ret)\n"; ++ exit 1; ++ } ++ my $au = LWP::UserAgent->new(timeout => $TIMEOUT); ++ my $repsonse = $au->request(HTTP::Request->new('GET',$url)); ++ if($repsonse->is_success and $repsonse->content =~ /.*<\/status>/im) { ++ print "yes\n"; ++ exit 0; ++ } else { ++ print "no (no tomcat status)\n"; ++ exit 1; ++ } ++} ++ ++if(exists $ARGV[0] and $ARGV[0] eq "config") { ++ print "graph_title Tomcat accesses\n"; ++ print "graph_args --base 1000\n"; ++ print "graph_vlabel accesses / \${graph_period}\n"; ++ print "graph_category tomcat\n"; ++ print "accesses.label Accesses\n"; ++ print "accesses.type DERIVE\n"; ++ print "accesses.max 1000000\n"; ++ print "accesses.min 0\n"; ++ exit 0; ++} ++ ++my $ua = LWP::UserAgent->new(timeout => $TIMEOUT); ++my $xs = new XML::Simple; ++my $response = $ua->request(HTTP::Request->new('GET',$url)); ++my $xml = $xs->XMLin($response->content); ++ ++if($xml->{'connector'}->{'http-'.$PORT}->{'requestInfo'}->{'requestCount'}) { ++ print "accesses.value " . $xml->{'connector'}->{'http-'.$PORT}->{'requestInfo'}->{'requestCount'} . "\n"; ++} else { ++ print "accesses.value U\n"; ++} ++ ++# vim:syntax=perl --- munin-1.2.6.orig/debian/patches/550-ejabberd-plugin +++ munin-1.2.6/debian/patches/550-ejabberd-plugin @@ -0,0 +1,53 @@ +# should go upstream, seehttp://bugs.debian.org/cgi-bin/bugreport.cgi?bug=505684 +Index: munin-1.2.6/node/node.d/ejabberd.in +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ munin-1.2.6/node/node.d/ejabberd.in 2009-05-29 13:19:40.000000000 +0200 +@@ -0,0 +1,47 @@ ++#!/bin/sh ++# ++# Plugin to count the connections on an ejabberd server ++# ++# INFO: needs ejabberd 1.1.2 ++# ++# Author: Christian Dröge ++# downloaded from http://munin.projects.linpro.no/wiki/plugin-ejabberd ++# modified as suggested in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=505684 ++# ++#%# family=contrib ++#%# capabilities=autoconf ++ ++if [ "$1" = "autoconf" ]; then ++ echo yes ++ exit 0 ++fi ++ ++if [ "$1" = "config" ]; then ++ echo 'graph_title ejabberd connections' ++ echo 'graph_args --base 1000 -l 0' ++ echo 'graph_vlabel connections' ++ echo 'graph_scale no' ++ echo 'graph_category network' ++ ++ echo 's2s_connections_out.label incoming s2s connections' ++ echo 's2s_connections_in.label outgoing s2s connections' ++ echo 'connected_users.label connected users' ++ ++ echo 'graph_info This graph shows a statistic of ejabberd ' ++ echo 's2s_connections_out.info Number of outgoing server to server connections' ++ echo 's2s_connections_in.info Number of incoming server to server connections' ++ echo 'connected_users.info Number of logged in users' ++ ++ exit 0 ++fi ++ ++echo -n "s2s_connections_out.value " ++ejabberdctl outgoing-s2s-number ++echo -n "s2s_connections_in.value " ++ejabberdctl incoming-s2s-number ++echo -n "connected_users.value " ++#ejabberdctl connected-users-number ++### connected-users-number counts sessions, not users. Therefore, sessions might be a higher number ++### we want users. ++ejabberdctl stats onlineusers ++ --- munin-1.2.6.orig/debian/patches/391-munin-node-ipv6.patch +++ munin-1.2.6/debian/patches/391-munin-node-ipv6.patch @@ -0,0 +1,13 @@ +Index: munin-1.2.6/node/munin-node.in +=================================================================== +--- munin-1.2.6.orig/node/munin-node.in 2008-09-23 16:13:56.000000000 +0200 ++++ munin-1.2.6/node/munin-node.in 2008-09-23 16:14:14.000000000 +0200 +@@ -269,7 +269,7 @@ + for my $file (grep { -f "$servicedir/$_" } readdir(DIR)) { + next if $file =~ m/^\./; # Hidden files + next if $file =~ m/.conf$/; # Config files +- next if $file !~ m/^([-\w.]+)$/; # Skip if any weird chars ++ next if $file !~ m/^([-\w.:]+)$/; # Skip if any weird chars + $file = $1; # Not tainted anymore. + foreach my $regex (@ignores) + { --- munin-1.2.6.orig/debian/patches/260-courier-logtail.patch +++ munin-1.2.6/debian/patches/260-courier-logtail.patch @@ -0,0 +1,31 @@ +Index: trunk/node/node.d/courier_.in +=================================================================== +--- trunk.orig/node/node.d/courier_.in 2008-07-01 19:19:59.000000000 +0200 ++++ trunk/node/node.d/courier_.in 2008-07-01 19:20:32.000000000 +0200 +@@ -67,25 +67,13 @@ + ;; + esac + +-ARGS=0 +-`$LOGTAIL /etc/hosts 2>/dev/null >/dev/null` +-if [ $? = 66 ]; then +- if [ ! -n "$logtail" ]; then +- ARGS=1 +- fi +-fi +- + TEMP_FILE=`mktempfile munin-courier.XXXXXX` + + if [ -z "$TEMP_FILE" -o ! -f "$TEMP_FILE" ]; then + exit 3 + fi + +-if [ $ARGS != 0 ]; then +- ${LOGTAIL} -f ${COURIER_LOG} -o ${OFFSET_FILE} | grep "$SERVICE" > ${TEMP_FILE} +-else +- ${LOGTAIL} ${COURIER_LOG} ${OFFSET_FILE} | grep "$SERVICE" > ${TEMP_FILE} +-fi ++${LOGTAIL} ${COURIER_LOG} ${OFFSET_FILE} | grep "$SERVICE" > ${TEMP_FILE} + connection=`grep Connection ${TEMP_FILE} | wc -l` + disconnected=`grep DISCONNECTED ${TEMP_FILE} | wc -l` + login=`grep LOGIN ${TEMP_FILE} | wc -l` --- munin-1.2.6.orig/debian/patches/400-style_css.patch +++ munin-1.2.6/debian/patches/400-style_css.patch @@ -0,0 +1,28 @@ +Index: munin-1.2.6/server/style.css +=================================================================== +--- munin-1.2.6.orig/server/style.css 2008-09-23 21:27:41.000000000 +0200 ++++ munin-1.2.6/server/style.css 2008-09-23 21:30:05.000000000 +0200 +@@ -60,7 +60,6 @@ + border-style: solid; + padding: 0px 0px 0px 0px; + margin: 0px 0px 0px 0px; +- white-space: nowrap; + max-width: 90%; + width: 80%; + } +@@ -75,7 +74,6 @@ + border-style: solid; + padding: 0px 0px 0px 0px; + margin: 0px 0px 0px 0px; +- white-space: nowrap; + width: 1%; + } + +@@ -89,7 +87,6 @@ + border-style: solid; + padding: 4px 4px 4px 4px; + margin: 0px 0px 0px 0px; +- white-space: nowrap; + width: 100%; + } + --- munin-1.2.6.orig/debian/patches/530-node.d.linux-cpu-scale-with-HZ +++ munin-1.2.6/debian/patches/530-node.d.linux-cpu-scale-with-HZ @@ -0,0 +1,18 @@ +# needs to go upstream +--- munin-1.2.6.orig/node/node.d.linux/cpu.in 2008-09-26 10:29:36.000000000 +0200 ++++ munin-1.2.6/node/node.d.linux/cpu.in 2008-09-26 10:21:02.000000000 +0200 +@@ -117,10 +117,12 @@ + exit 0 + fi + ++HZ=`getconf CLK_TCK` + + if [ ! -z "$extinfo" ] + then +- awk '/^cpu / { print "user.value " $2 "\nnice.value " $3 "\nsystem.value " $4 "\nidle.value " $5 "\niowait.value " $6 "\nirq.value " $7 "\nsoftirq.value " $8 }' < /proc/stat ++ awk -v HZ=$HZ 'BEGIN { factor=100/HZ } /^cpu / { for (i=2; i<=8; i++) { $i = int($i * factor) }; print "user.value " $2 "\nnice.value " $3 "\nsystem.value " $4 "\nidle.value " $5 "\niowait.value " $6 "\nirq.value " $7 "\nsoftirq.value " $8 }' < /proc/stat ++ + else +- awk '/^cpu / { print "user.value " $2 "\nnice.value " $3 "\nsystem.value " $4 "\nidle.value " $5 }' < /proc/stat ++ awk -v HZ=$HZ 'BEGIN { factor=100/HZ } /^cpu / { for (i=2; i<=5; i++) { $i = int($i * factor) }; print "user.value " $2 "\nnice.value " $3 "\nsystem.value " $4 "\nidle.value " $5 }' < /proc/stat + fi --- munin-1.2.6.orig/debian/patches/360-fw_conntrack-graph_args.patch +++ munin-1.2.6/debian/patches/360-fw_conntrack-graph_args.patch @@ -0,0 +1,12 @@ +Index: munin-1.2.6/node/node.d.linux/fw_conntrack.in +=================================================================== +--- munin-1.2.6.orig/node/node.d.linux/fw_conntrack.in 2008-08-15 07:36:32.000000000 +0200 ++++ munin-1.2.6/node/node.d.linux/fw_conntrack.in 2008-08-15 07:36:51.000000000 +0200 +@@ -51,6 +51,7 @@ + graph_title Connections through firewall + graph_vlabel Connections + graph_category network ++graph_args -l 0 + established.label Established + established.type GAUGE + established.draw AREA --- munin-1.2.6.orig/debian/patches/410-muninnodeconf-manpage.patch +++ munin-1.2.6/debian/patches/410-muninnodeconf-manpage.patch @@ -0,0 +1,13 @@ +Index: munin-1.2.6/node/munin-node.conf.pod +=================================================================== +--- munin-1.2.6.orig/node/munin-node.conf.pod 2008-11-08 14:43:28.000000000 +0000 ++++ munin-1.2.6/node/munin-node.conf.pod 2008-11-08 14:43:46.000000000 +0000 +@@ -60,6 +60,8 @@ + Files matching <regex> in the node.d/ and node-conf.d/ + directories will be overlooked. + ++=back ++ + =head1 EXAMPLE + + A pretty normal configuration file: --- munin-1.2.6.orig/debian/patches/234-smart_.patch +++ munin-1.2.6/debian/patches/234-smart_.patch @@ -0,0 +1,13 @@ +Index: munin-1.2.6/node/node.d/smart_.in +=================================================================== +--- munin-1.2.6.orig/node/node.d/smart_.in 2008-06-27 17:38:34.000000000 +0200 ++++ munin-1.2.6/node/node.d/smart_.in 2008-06-27 17:38:54.000000000 +0200 +@@ -96,7 +96,7 @@ + try : + verboselog('Reading S.M.A.R.T values') + os.putenv('LC_ALL','C') +- smart_output=os.popen(os.getenv('smartpath','/usr/sbin/smartctl')+' '+os.getenv('smartargs','-a')+' -A -i /dev/'+hard_drive) ++ smart_output=os.popen(os.getenv('smartpath','/usr/sbin/smartctl')+' '+os.getenv('smartargs','-a')+' -n standby -A -i /dev/'+hard_drive) + read_values=0 + # For python < 2.2 compliance, switch comments on next 2 lines. + for l in smart_output : --- munin-1.2.6.orig/debian/patches/450-munin-cgi-graph.patch +++ munin-1.2.6/debian/patches/450-munin-cgi-graph.patch @@ -0,0 +1,20 @@ +Index: munin-1.2.6/server/munin-cgi-graph.in +=================================================================== +--- munin-1.2.6.orig/server/munin-cgi-graph.in 2009-01-28 23:04:02.000000000 +0100 ++++ munin-1.2.6/server/munin-cgi-graph.in 2009-01-28 23:05:12.000000000 +0100 +@@ -123,10 +123,12 @@ + # Get semaphore handle + my $semid = semget($IPC_KEY, 0, 0 ); + +-if(!$semid) { ++if(!defined $semid) { + # Or create it if needed +- $semid = semget($IPC_KEY, 1 , 0666 | IPC_CREAT ) || +- die "Creating semaphore: $!"; ++ $semid = semget($IPC_KEY, 1 , 0666 | IPC_CREAT ); ++ if (!defined $semid) { ++ die "Creating semaphore: $!"; ++ } + + # And initialize to max_cgi_graph_jobs + $opstring = pack("s!s!s!",0, $max_cgi_graph_jobs,0); --- munin-1.2.6.orig/debian/patches/310-node-configure_bugfix +++ munin-1.2.6/debian/patches/310-node-configure_bugfix @@ -0,0 +1,18 @@ +Index: munin-1.2.6/node/munin-node-configure.in +=================================================================== +--- munin-1.2.6.orig/node/munin-node-configure.in 2008-07-20 23:44:28.000000000 +0200 ++++ munin-1.2.6/node/munin-node-configure.in 2008-07-20 23:45:00.000000000 +0200 +@@ -600,12 +600,12 @@ + close (PLUG); + if ($?) { + @{$ps->{$plug}->{'suggest'}} = (); ++ push(@errors,"ERROR: empty suggest from $plug"); + } + print "# Suggested: ", + join (' ', @{$ps->{$plug}->{'suggest'}}),"\n" + if $debug; + +- push(@errors,"ERROR: empty suggest from $plug"); + } + } + print "\n" if $debug; --- munin-1.2.6.orig/debian/patches/233-df_and_df_inode.patch +++ munin-1.2.6/debian/patches/233-df_and_df_inode.patch @@ -0,0 +1,26 @@ +Index: munin-1.2.6/node/node.d.linux/df.in +=================================================================== +--- munin-1.2.6.orig/node/node.d.linux/df.in 2008-06-27 16:47:10.000000000 +0200 ++++ munin-1.2.6/node/node.d.linux/df.in 2008-06-27 16:47:51.000000000 +0200 +@@ -79,7 +79,7 @@ + if ( $ARGV[0] eq "config" ) { + + # The headers +- print "graph_title Disk usage (in %)\n"; ++ print "graph_title Disk usage (in percent)\n"; + print "graph_args --upper-limit 100 -l 0\n"; + print "graph_vlabel %\n"; + print "graph_scale no\n"; +Index: munin-1.2.6/node/node.d.linux/df_inode.in +=================================================================== +--- munin-1.2.6.orig/node/node.d.linux/df_inode.in 2008-06-27 16:47:58.000000000 +0200 ++++ munin-1.2.6/node/node.d.linux/df_inode.in 2008-06-27 16:48:19.000000000 +0200 +@@ -80,7 +80,7 @@ + if ( $ARGV[0] eq "config" ) { + + # The headers +- print "graph_title Inode usage (in %)\n"; ++ print "graph_title Inode usage (in percent)\n"; + print "graph_args --upper-limit 100 -l 0\n"; + print "graph_vlabel %\n"; + print "graph_scale no\n"; --- munin-1.2.6.orig/debian/patches/520-node.d-nut-plugins +++ munin-1.2.6/debian/patches/520-node.d-nut-plugins @@ -0,0 +1,51 @@ +# has been applied upstream as http://munin.projects.linpro.no/changeset/1941 +Index: munin-1.2.6/node/node.d/nut_misc.in +=================================================================== +--- munin-1.2.6.orig/node/node.d/nut_misc.in ++++ munin-1.2.6/node/node.d/nut_misc.in +@@ -1,3 +1,11 @@ + #!@@PERL@@ ++# ++# Plugin to monitor UPS via the upsc command ++# ++# Parameters: ++# ++# env.upsname (default: "bertha@127.0.0.1") ++# env.upsc (default: "upsc") ++# + + use strict; +@@ -6,6 +14,6 @@ + + my %config = ( +- upsname => 'bertha@127.0.0.1', +- upsc => 'upsc' ++ upsname => $ENV{"upsname"} ? $ENV{"upsname"} : 'bertha@127.0.0.1', ++ upsc => $ENV{"upsc"} ? $ENV{"upsc"} : 'upsc' + ); + +Index: munin-1.2.6/node/node.d/nut_volts.in +=================================================================== +--- munin-1.2.6.orig/node/node.d/nut_volts.in ++++ munin-1.2.6/node/node.d/nut_volts.in +@@ -1,3 +1,11 @@ + #!@@PERL@@ ++# ++# Plugin to monitor UPS via the upsc command ++# ++# Parameters: ++# ++# env.upsname (default: "bertha@127.0.0.1") ++# env.upsc (default: "upsc") ++# + + use strict; +@@ -6,6 +14,6 @@ + + my %config = ( +- upsname => 'bertha@127.0.0.1', +- upsc => 'upsc' ++ upsname => $ENV{"upsname"} ? $ENV{"upsname"} : 'bertha@127.0.0.1', ++ upsc => $ENV{"upsc"} ? $ENV{"upsc"} : 'upsc' + ); + --- munin-1.2.6.orig/debian/patches/390-munin-run-ipv6.patch +++ munin-1.2.6/debian/patches/390-munin-run-ipv6.patch @@ -0,0 +1,13 @@ +Index: munin-1.2.6/node/munin-run.in +=================================================================== +--- munin-1.2.6.orig/node/munin-run.in 2008-09-19 15:18:09.000000000 +0000 ++++ munin-1.2.6/node/munin-run.in 2008-09-19 15:20:00.000000000 +0000 +@@ -281,7 +281,7 @@ + for my $file (grep { -f "$servicedir/$_" } readdir(DIR)) { + next if $file =~ m/^\./; # Hidden files + next if $file =~ m/.conf$/; # Config files +- next if $file !~ m/^([-\w.]+)$/; # Skip if any weird chars ++ next if $file !~ m/^([-\w.:]+)$/; # Skip if any weird chars + $file = $1; # Not tainted anymore. + foreach my $regex (@ignores) + { --- munin-1.2.6.orig/debian/patches/160-node.d-postgres-plugins.patch +++ munin-1.2.6/debian/patches/160-node.d-postgres-plugins.patch @@ -0,0 +1,965 @@ +Index: munin-1.2.6/node/node.d/postgres_block_read_.in +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ munin-1.2.6/node/node.d/postgres_block_read_.in 2008-10-26 13:55:37.000000000 +0100 +@@ -0,0 +1,167 @@ ++#!@@PERL@@ -w ++# -*- perl -*- ++ ++# Plugin to monitor PostgreSQL memory usage; gives number of blocks ++# read from disk and from memory, showing how much of the database is ++# served from PostgreSQL's memory buffer. ++# ++# PLEASE NOTE: This plugin may not present the whole truth - the truth ++# may actually be even better than this plugin will show you! That is ++# because PostgreSQL statistics only considers memory block reads from ++# its own allocated memory. When PostgreSQL reads from disk, it may ++# actually still be read from memory, but from the _kernel_'s ++# memory. Summarily, your database server may run even better than ++# this plugin will indicate. See ++# http://www.postgresql.org/docs/7.4/interactive/monitoring-stats.html ++# for a (short) description. ++# ++# Copyright BjØrn Ruberg 2006 ++# ++# Licenced under GPL v2. ++# ++# Usage: ++# ++# Symlink into /etc/munin/plugins/ and add the monitored ++# database to the filename. e.g.: ++# ++# ln -s /usr/share/munin/plugins/postgres_block_read_ \ ++# /etc/munin/plugins/postgres_block_read_SomeDatabase ++# This should, however, be given through autoconf and suggest. ++# ++# If required, give username, password and/or PostgreSQL server ++# host through environment variables. ++# ++# You must also activate PostgreSQL statistics. See ++# http://www.postgresql.org/docs/7.4/interactive/monitoring-stats.html ++# for how to enable this. Specifically, the following lines must ++# exist in your postgresql.conf: ++# ++# stats_start_collector = true ++# stats_block_level = true ++# ++# ++# Parameters: ++# ++# config ++# autoconf ++# ++# Configuration variables: ++# ++# PGHOST - Database server to use. Defaults to using ident ++# authentication with the local server. ++# PGPORT - Port to connect to. Defaults to '5432'. ++# PGDATABASE - Database to connect to. Defaults to 'template1'. ++# PGUSER - User to connect as, if necessary. ++# PGPASSWORD - Corresponding password to use, if necessary. ++# ++# (See libpq documentation for more.) ++# Note that PGDATABASE will default to 'template1' in this plugin, and ++# without PGHOST it will try ident authentication with the local server, ++# as the user that the plugin is running as. ++# ++# Configuration example: ++# ++# # Use local server, ident authentication with the 'postgres' user. ++# [postgres_*] ++# user postgres ++# ++# # Use local server, TCP authentication with a username and password. ++# [postgres_*] ++# env.PGHOST localhost ++# env.PGUSER someuser ++# env.PGPASSWORD somepassword ++# ++# ++# Magic markers ++#%# family=auto ++#%# capabilities=suggest ++ ++use strict; ++use DBI; ++use Data::Dumper; ++use vars qw ( $debug $suggest $configure $dbh ); ++ ++# Default to template1 database. ++$ENV{'PGDATABASE'} ||= 'template1'; ++ ++if (exists $ARGV[0]) { ++ if ($ARGV[0] eq 'autoconf') { ++ # Check for DBD::Pg ++ if (! eval "require DBD::Pg;") { ++ print "no (DBD::Pg not found)"; ++ exit 1; ++ } ++ # Then we try to detect Postgres presence by connecting to ++ # 'template1'. ++ my $tempdbh = DBI->connect ('dbi:Pg:', '', ''); ++ if ($tempdbh) { ++ print "yes\n"; ++ exit 0; ++ } else { ++ print "no (Can't connect to given host, please check environment settings)\n"; ++ exit 1; ++ } ++ } elsif ($ARGV[0] eq 'debug') { ++ # Set debug flag ++ $debug = 1; ++ } elsif ($ARGV[0] eq 'config') { ++ # Set config flag ++ $configure = 1; ++ } elsif ($ARGV[0] eq 'suggest') { ++ # doesn't always work ++ my @datasources = DBI->data_sources ('Pg'); ++ foreach my $dsn (grep !/\=template\d$/, @datasources) { ++ (my $db = $dsn) =~ s/^.*=//; ++ print "$db\n"; ++ } ++ exit 0; ++ } ++} ++ ++# Must do this here, after checking for autoconf/suggest/etc, because the ++# plugin must be able to run before it is linked to the databases. ++my (undef, undef, undef, $dbname) = split (/_/, $0, 4); ++die "No dbname configured (did you make the proper symlink?)" unless $dbname; ++ ++my @datasources = DBI->data_sources ('Pg') ++ or die ("Can't read any possible data sources: $?"); ++ ++my $dbh = DBI->connect ('dbi:Pg:', '', '', {RaiseError =>1}); ++unless($dbh) { ++ die("Error connecting to database (". $DBI::errstr .")\n"); ++} ++ ++if ($configure) { ++ print <prepare ($sql); ++ $sth->execute(); ++ if ($sth->rows > 0) { ++ printf ("# Rows: %d\n", $sth->rows) if $debug; ++ my ($disk, $mem) = $sth->fetchrow_array(); ++ print "from_disk.value $disk\n"; ++ print "from_memory.value $mem\n"; ++ } ++} +Index: munin-1.2.6/node/node.d/postgres_commits_.in +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ munin-1.2.6/node/node.d/postgres_commits_.in 2008-10-26 13:55:56.000000000 +0100 +@@ -0,0 +1,225 @@ ++#!@@PERL@@ ++# -*- perl -*- ++ ++# Plugin to monitor PostgreSQL commits/rollbacks. ++# ++# "Why should I care?" ++# - Too many commits can really bog down the database, as it checks all ++# the tables for consitency after each change. ++# - Software is often set to 'AutoCommit = 1', meaning a commit is done ++# after each transaction. This is a good idea with brittle code so that ++# you can get some work done if not all, but when you're inserting 10,000 ++# rows this can really suck. ++# - If you see a spike in rollbacks, some db programmer is probably ++# abusing their session, or a stored proceudre has gone horribly wrong ++# and isn't leaving a trace. Time for the rolled-up newspaper. ++ ++# Find out more at ++# http://www.postgresql.org/docs/8.2/interactive/monitoring-stats.html ++# (where "8.2" can be the version of PostgreSQL you have installed) ++# ++# BjØrn Ruberg is large and in charge. ++# Licenced under GPL v2. ++# ++# Revision History: ++# 2005/03/10: v0.0001 Vajtsz (from openproject.hu) ++# "this is my first munin plugin sorry for dummy code" ++# 2007/09/25: v1.0 Moses Moore ++# Nicolai Langfeldt - "I wounder if one of you would be bothered ++# to rework [this] over the pattern of postgres_block_read_ ..." ++# Omitted tracking numbackends because it is an instantaneous ++# measurement (GAUGE) instead of a cumulative (DERIVE) one. ++# 2007/12/12: v1.01 Tim Retout ++# Use libpq environment variables for configuration. ++# ++# Usage: ++# ++# Symlink into /etc/munin/plugins/ and add the monitored ++# database to the filename. e.g.: ++# ++# ln -s /usr/share/munin/plugins/postgres_commits_ \ ++# /etc/munin/plugins/postgres_commits_SomeDatabase ++# This should, however, be given through autoconf and suggest. ++# ++# There is an additional means of using this: ++# if you make the special soft link postgres_commits_All, ++# it will plot the commits & rollbacks for all databases ++# on this server on one graph. This isn't recommended, and ++# will not be offered by 'suggest', but it's here if you want it. ++# ++# If required, give username, password and/or PostgreSQL server ++# host through environment variables... but for most sites you ++# should be able to omit username and password. ++# ++# You must also activate PostgreSQL statistics. See ++# http://www.postgresql.org/docs/8.2/interactive/monitoring-stats.html ++# for how to enable this. Specifically, the following lines must ++# exist in your postgresql.conf: ++# ++# stats_start_collector = true ++# stats_block_level = true ++# ++# ++# Parameters: ++# ++# config ++# autoconf ++# ++# Configuration variables: ++# ++# PGHOST - Database server to use. Defaults to using ident ++# authentication with the local server. ++# PGPORT - Port to connect to. Defaults to '5432'. ++# PGDATABASE - Database to connect to. Defaults to 'template1'. ++# Note that this can be different from the database to ++# monitor, which is defined via the symlink. ++# PGUSER - User to connect as, if necessary. ++# PGPASSWORD - Corresponding password to use, if necessary. ++# ++# (See libpq documentation for more.) ++# Note that PGDATABASE will default to 'template1' in this plugin, and ++# without PGHOST it will try ident authentication with the local server, ++# as the user that the plugin is running as. ++# ++# Configuration example: ++# ++# # Use local server, ident authentication with the 'postgres' user. ++# [postgres_*] ++# user postgres ++# ++# # Use local server, TCP authentication with a username and password. ++# [postgres_*] ++# env.PGHOST localhost ++# env.PGUSER someuser ++# env.PGPASSWORD somepassword ++# ++# Magic markers ++#%# family=auto ++#%# capabilities=suggest ++ ++use strict; ++use warnings; ++use DBI; ++use Data::Dumper; ++use vars qw ( $debug $suggest $configure $dbh ); ++use vars qw ( @datasources ); ++ ++# Default to template1 database. ++$ENV{'PGDATABASE'} ||= 'template1'; ++ ++my ($maybe_dbname) = ($0 =~ m/postgres_commits_(\S+)$/); ++if ($maybe_dbname eq 'All' or $ARGV[0] eq 'suggest') { ++ # doesn't always work. ++ my @dsnnames = DBI->data_sources('Pg'); ++ foreach my $dsn (grep !/\=template\d$/, @dsnnames) { ++ (my $db = $dsn) =~ s/^.*=//; ++ $db =~ s/"//g; # " ++ $db =~ s/ /\\ /g; # is whitespace allowed in database names? ++ push(@datasources,$db); ++ } ++} ++ ++if (exists $ARGV[0]) { ++ if ($ARGV[0] eq 'autoconf') { ++ # Check for DBD::Pg ++ if (! eval "require DBD::Pg;") { ++ print "no (DBD::Pg not found)"; ++ exit 1; ++ } ++ # Try to detect PostgreSQL presence. ++ my $tempdbh = DBI->connect ('dbi:Pg:', '', ''); ++ if ($tempdbh) { ++ print "yes\n"; ++ exit 0; ++ } else { ++ print "no (Can't connect to given host, please check environment settings)\n"; ++ exit 1; ++ } ++ } elsif ($ARGV[0] eq 'debug') { ++ # Set debug flag ++ $debug = 1; ++ } elsif ($ARGV[0] eq 'config') { ++ # Set config flag ++ $configure = 1; ++ } elsif ($ARGV[0] eq 'suggest') { ++ if (@datasources) { ++ print join("\n",@datasources)."\n"; ++ exit 0; ++ } ++ else { ++ exit 1; ++ } ++ } ++} ++ ++die "No dbname configured (did you make the proper symlink?)" unless $maybe_dbname; ++# Note that $dbname is the database being monitored, and can be different from ++# $ENV{'PGDATABASE'}. ++my $dbname = $maybe_dbname unless ($maybe_dbname eq 'All'); ++if ($maybe_dbname eq 'All' and not @datasources) { ++ print "# Sorry, can't use the _All trick; no postgresql databases detected.\n"; ++ print "# Please make softlinks for each database name.\n"; ++ exit 1; ++} ++ ++my $dbh = DBI->connect ('dbi:Pg:', '', '', {RaiseError =>1}); ++unless($dbh) { ++ die("Error connecting to database. (". $DBI::errstr .")\n"); ++} ++ ++if ($configure) { ++ print "graph_title Postgres commits/rollbacks on $maybe_dbname\n"; ++ print "graph_args --base 1000\n"; ++ print "graph_vlabel Sessions per \${graph_period}\n"; ++ print "graph_category PostgreSQL\n"; ++ print "graph_info Shows number of commits and rollbacks\n"; ++ if ($maybe_dbname eq 'All') { ++ foreach my $ds (@datasources) { ++ my ($c,$r) = ($ds."_commits",$ds."_rollbacks"); ++ print "$c.label $ds"."_c\n"; ++ print "$r.label $ds"."_r\n"; ++ print "$c.info Commits on database $ds\n"; ++ print "$r.info Rollbacks on database $ds\n"; ++ print "$c.min 0\n"; ++ print "$r.min 0\n"; ++ print "$c.type DERIVE\n"; ++ print "$r.type DERIVE\n"; ++ } ++ } ++ else { ++ print "commits.label commits\n"; ++ print "commits.info SQL sessions terminated with a commit command.\n"; ++ print "commits.min 0\n"; ++ print "commits.type DERIVE\n"; ++ print "rollbacks.label rollbacks\n"; ++ print "rollbacks.info SQL sessions terminated with a rollback command.\n"; ++ print "rollbacks.min 0\n"; ++ print "rollbacks.type DERIVE\n"; ++ } ++} elsif ($maybe_dbname eq 'All') { ++ my $sql = "SELECT datname, xact_commit, xact_rollback from pg_stat_database"; ++ print "# $sql\n" if $debug; ++ my $sth = $dbh->prepare($sql); ++ $sth->execute(); ++ if ($sth->rows > 0) { ++ printf ("# Rows: %d\n", $sth->rows) if $debug; ++ while (my ($dn,$xc,$xr) = $sth->fetchrow_array()) { ++ next if ($dn =~ /^template\d/); # system-only tables ++ print $dn."_commits.value $xc\n"; ++ print $dn."_rollbacks.value $xr\n"; ++ } ++ } ++} else { ++ my $sql = "SELECT xact_commit, xact_rollback from pg_stat_database where datname = ?"; ++; ++ print "# $sql ($dbname)\n" if $debug; ++ my $sth = $dbh->prepare($sql); ++ $sth->execute($dbname); ++ if ($sth->rows > 0) { ++ printf ("# Rows: %d\n", $sth->rows) if $debug; ++ my ($xc,$xr) = $sth->fetchrow_array(); ++ print "commits.value $xc\n"; ++ print "rollbacks.value $xr\n"; ++ } ++} ++ +Index: munin-1.2.6/node/node.d/postgres_connections.in +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ munin-1.2.6/node/node.d/postgres_connections.in 2008-10-26 13:55:00.000000000 +0100 +@@ -0,0 +1,73 @@ ++#!@@PERL@@ ++# -*- perl -*- ++# ++# Plugin to monitor number of PostgreSQL database connections. ++# ++# Parameters: ++# ++# config ++# autoconf ++# ++# Configuration variables: ++# ++# PGHOST - Database server to use. Defaults to using ident ++# authentication with the local server. ++# PGPORT - Port to connect to. Defaults to '5432'. ++# PGDATABASE - Database to connect to. Defaults to 'template1'. ++# PGUSER - User to connect as, if necessary. ++# PGPASSWORD - Corresponding password to use, if necessary. ++# ++# (See libpq documentation for more.) ++# Note that PGDATABASE will default to 'template1' in this plugin, and ++# without PGHOST it will try ident authentication with the local server, ++# as the user that the plugin is running as. ++# ++# Configuration example: ++# ++# # Use local server, ident authentication with the 'postgres' user. ++# [postgres_*] ++# user postgres ++# ++# # Use local server, TCP authentication with a username and password. ++# [postgres_*] ++# env.PGHOST localhost ++# env.PGUSER someuser ++# env.PGPASSWORD somepassword ++# ++ ++use strict; ++use warnings; ++use DBI; ++ ++# Default to template1 database. ++$ENV{'PGDATABASE'} ||= 'template1'; ++ ++my $dbh = DBI->connect ('dbi:Pg:', '','',{RaiseError =>1}) || ++ die "Unable to access database. Error returned was: ". $DBI::errstr; ++ ++if ($ARGV[0] && $ARGV[0] eq 'config') { ++ my $sql_max = "SHOW max_connections;"; ++ my $sth_max = $dbh->prepare($sql_max); ++ $sth_max->execute(); ++ my ($max_conn) = $sth_max->fetchrow(); ++ my $warning = int ($max_conn * 0.7); ++ my $critical = int ($max_conn * 0.8); ++ print <prepare($sql_curr); ++ $sth_curr->execute(); ++ my ($curr_conn) = $sth_curr->fetchrow(); ++ print "connections.value $curr_conn\n"; ++} +Index: munin-1.2.6/node/node.d/postgres_locks.in +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ munin-1.2.6/node/node.d/postgres_locks.in 2008-10-26 13:55:00.000000000 +0100 +@@ -0,0 +1,83 @@ ++#!@@PERL@@ ++# -*- perl -*- ++# ++# Show postgres lock statistics ++# ++# Parameters: ++# ++# config ++# autoconf ++# ++# Configuration variables: ++# ++# PGHOST - Database server to use. Defaults to using ident ++# authentication with the local server. ++# PGPORT - Port to connect to. Defaults to '5432'. ++# PGDATABASE - Database to connect to. Defaults to 'template1'. ++# PGUSER - User to connect as, if necessary. ++# PGPASSWORD - Corresponding password to use, if necessary. ++# ++# (See libpq documentation for more.) ++# Note that PGDATABASE will default to 'template1' in this plugin, and ++# without PGHOST it will try ident authentication with the local server, ++# as the user that the plugin is running as. ++# ++# Configuration example: ++# ++# # Use local server, ident authentication with the 'postgres' user. ++# [postgres_*] ++# user postgres ++# ++# # Use local server, TCP authentication with a username and password. ++# [postgres_*] ++# env.PGHOST localhost ++# env.PGUSER someuser ++# env.PGPASSWORD somepassword ++# ++# Magic markers ++#%# family=auto ++#%# capabilities=suggest ++ ++use strict; ++use warnings; ++use DBI; ++ ++# Default to template1 database. ++$ENV{'PGDATABASE'} ||= 'template1'; ++ ++if ($ARGV[0] && $ARGV[0] eq "config") { ++ print <connect ('dbi:Pg:', '', '', {RaiseError =>1}) ++ || die "Unable to access database.\nError returned was: ". $DBI::errstr; ++ ++ my $sql="SELECT mode,COUNT(mode) FROM pg_locks GROUP BY mode ORDER BY mode;"; ++ my $sth = $dbh->prepare ($sql); ++ $sth->execute (); ++ my $locks = 0; ++ my $exlocks = 0; ++ while (my ($mode, $count) = $sth->fetchrow ()) { ++ if ($mode =~ /exclusive/i) { ++ $exlocks = $exlocks + $count; ++ } ++ $locks = $locks+$count; ++ } ++ print "locks.value $locks\n"; ++ print "exlocks.value $exlocks\n"; ++} +Index: munin-1.2.6/node/node.d/postgres_queries_.in +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ munin-1.2.6/node/node.d/postgres_queries_.in 2008-10-26 13:56:15.000000000 +0100 +@@ -0,0 +1,194 @@ ++#!@@PERL@@ ++# -*- perl -*- ++ ++# Plugin to monitor PostgreSQL query rate; returns the number of ++# sequential scans initiated, rows returned by sequential reads, ++# index scans initiated, rows returned by index scans, inserts, ++# updates, and deletes. ++# ++# Find out more at ++# http://www.postgresql.org/docs/8.2/interactive/monitoring-stats.html ++# (should work with PostgreSQL 7.x and 8.x) ++# ++# BjØrn Ruberg is a mack-daddy. ++# Licenced under GPL v2. ++# ++# Revision History: ++# 2005/03/10: v0.0001 Vajtsz (from openproject.hu) ++# "this is my first munin plugin sorry for dummy code" ++# 2007/09/25: v1.0 Moses Moore ++# Nicolai Langfeldt - "I wounder if one of you would be bothered ++# to rework [this] over the pattern of postgres_block_read_ ..." ++# 2007/12/17 v1.0.1 Tim Retout ++# Use libpq environment variables for configuration. ++# ++# Usage: ++# ++# Symlink into /etc/munin/plugins/ and add the monitored ++# database to the filename. e.g.: ++# ++# ln -s /usr/share/munin/plugins/postgres_block_read_ \ ++# /etc/munin/plugins/postgres_block_read_SomeDatabase ++# This should, however, be given through autoconf and suggest. ++# ++# If required, give username, password and/or PostgreSQL server ++# host through environment variables. ++# ++# You must also activate PostgreSQL statistics. See ++# http://www.postgresql.org/docs/8.2/interactive/monitoring-stats.html ++# for how to enable this. Specifically, the following lines must ++# exist in your postgresql.conf: ++# ++# stats_start_collector = true ++# stats_block_level = true ++# ++# ++# Parameters: ++# ++# config ++# autoconf ++# ++# Configuration variables: ++# ++# PGHOST - Database server to use. Defaults to using ident ++# authentication with the local server. ++# PGPORT - Port to connect to. Defaults to '5432'. ++# PGDATABASE - Database to connect to. Defaults to 'template1'. ++# PGUSER - User to connect as, if necessary. ++# PGPASSWORD - Corresponding password to use, if necessary. ++# ++# (See libpq documentation for more.) ++# Note that PGDATABASE will default to 'template1' in this plugin, and ++# without PGHOST it will try ident authentication with the local server, ++# as the user that the plugin is running as. ++# ++# Configuration example: ++# ++# # Use local server, ident authentication with the 'postgres' user. ++# [postgres_*] ++# user postgres ++# ++# # Use local server, TCP authentication with a username and password. ++# [postgres_*] ++# env.PGHOST localhost ++# env.PGUSER someuser ++# env.PGPASSWORD somepassword ++# ++# ++# Magic markers ++#%# family=auto ++#%# capabilities=suggest ++ ++use strict; ++use DBI; ++use Data::Dumper; ++use vars qw ( $debug $suggest $configure $dbh ); ++ ++# Default to template1 database. ++$ENV{'PGDATABASE'} ||= 'template1'; ++ ++if (exists $ARGV[0]) { ++ if ($ARGV[0] eq 'autoconf') { ++ # Check for DBD::Pg ++ if (! eval "require DBD::Pg;") { ++ print "no (DBD::Pg not found)"; ++ exit 1; ++ } ++ # Then we try to detect Postgres presence. ++ my $tempdbh = DBI->connect ('dbi:Pg:', '', ''); ++ if ($tempdbh) { ++ print "yes\n"; ++ exit 0; ++ } else { ++ print "no (Can't connect to given host, please check environment settings)\n"; ++ exit 1; ++ } ++ } elsif ($ARGV[0] eq 'debug') { ++ # Set debug flag ++ $debug = 1; ++ } elsif ($ARGV[0] eq 'config') { ++ # Set config flag ++ $configure = 1; ++ } elsif ($ARGV[0] eq 'suggest') { ++ # doesn't always work ++ my @datasources = DBI->data_sources ('Pg'); ++ foreach my $dsn (grep !/\=template\d$/, @datasources) { ++ (my $db = $dsn) =~ s/^.*=//; ++ $db =~ s/"//g; # " ++ $db =~ s/ /\\ /g; # is whitespace allowed in database names? ++ print "$db\n"; ++ } ++ exit 0; ++ } ++} ++ ++# Must do this here, after checking for autoconf/suggest/etc, because the ++# plugin must be able to run before it is linked to the databases. ++my ($dbname) = ($0 =~ m/postgres_queries_(\S+)$/); ++die "No dbname configured (did you make the proper symlink?)" unless $dbname; ++ ++my @datasources = DBI->data_sources ('Pg') ++ or die ("Can't read any possible data sources: $?"); ++ ++my $dbh = DBI->connect ('dbi:Pg:', '', '', {RaiseError =>1}); ++unless($dbh) { ++ die("Error connecting to database. (". $DBI::errstr .")\n"); ++} ++ ++if ($configure) { ++ print <prepare($sql); ++ $sth->execute(); ++ if ($sth->rows > 0) { ++ printf ("# Rows: %d\n", $sth->rows) if $debug; ++ my ($ss, $str, $is, $itf, $nti, $ntu, $ntd) = $sth->fetchrow_array(); ++ print "sel_seq.value $ss\n"; ++ print "sel_seq_rows.value $str\n"; ++ print "sel_idx.value $is\n"; ++ print "sel_idx_rows.value $itf\n"; ++ print "inserts.value $nti\n"; ++ print "updates.value $ntu\n"; ++ print "deletes.value $ntd\n"; ++ } ++} ++ +Index: munin-1.2.6/node/node.d/postgres_space_.in +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ munin-1.2.6/node/node.d/postgres_space_.in 2008-10-26 13:56:35.000000000 +0100 +@@ -0,0 +1,193 @@ ++#!@@PERL@@ -w ++# -*- perl -*- ++# ++# Plugin to monitor PostgreSQL disk usage. ++# ++# Written by Bjrn Ruberg (bjorn@linpro.no) 2006 ++# Rewritten by Moses Moore 2006-04-08 moc.iazom@sesom ++# Licenced under GPL ++# ++# Parameters: ++# ++# config ++# autoconf ++# ++# Configuration variables: ++# ++# PGHOST - Database server to use. Defaults to using ident ++# authentication with the local server. ++# PGPORT - Port to connect to. Defaults to '5432'. ++# PGDATABASE - Database to connect to. Defaults to 'template1'. ++# Note that this can be different from the database to ++# monitor, which is defined via the symlink. ++# PGUSER - User to connect as, if necessary. ++# PGPASSWORD - Corresponding password to use, if necessary. ++# ++# (See libpq documentation for more.) ++# Note that PGDATABASE will default to 'template1' in this plugin, and ++# without PGHOST it will try ident authentication with the local server, ++# as the user that the plugin is running as. ++# ++# Configuration example: ++# ++# # Use local server, ident authentication with the 'postgres' user. ++# [postgres_*] ++# user postgres ++# ++# # Use local server, TCP authentication with a username and password. ++# [postgres_*] ++# env.PGHOST localhost ++# env.PGUSER someuser ++# env.PGPASSWORD somepassword ++# ++# Magic markers ++#%# family=auto ++#%# capabilities=suggest ++ ++use strict; ++use DBI; ++use vars qw ( $debug $suggest $configure $dbh ); ++ ++# Default to template1 database. ++$ENV{'PGDATABASE'} ||= 'template1'; ++ ++if (exists $ARGV[0]) { ++ if ($ARGV[0] eq 'autoconf') { ++ # Check for DBD::Pg ++ if (! eval "require DBD::Pg;") { ++ print "no (DBD::Pg not found)"; ++ exit 1; ++ } ++ # Then we try to detect PostgreSQL presence. ++ my $tempdbh = DBI->connect ('dbi:Pg:', '', ''); ++ if ($tempdbh) { ++ print "yes\n"; ++ exit 0; ++ } else { ++ print "no (Can't connect to given host, please check environment settings)\n"; ++ exit 1; ++ } ++ } elsif ($ARGV[0] and $ARGV[0] eq 'debug') { ++ # Set config flag ++ $debug = 1; ++ } elsif ($ARGV[0] and $ARGV[0] eq 'config') { ++ # Set config flag ++ $configure = 1; ++ } elsif ($ARGV[0] eq 'suggest') { ++ # doesn't always work ++ my @datasources = DBI->data_sources ('Pg'); ++ foreach my $dsn (grep !/\=template\d$/, @datasources) { ++ (my $db = $dsn) =~ s/^.*=//; ++ print "$db\n"; ++ } ++ exit 0; ++ } ++} ++ ++# Must do this here, after checking for autoconf/suggest/etc, because the ++# plugin must be able to run before it is linked to the databases. ++ ++# Note that $dbname is not necessarily the same as $ENV{'PGDATABASE'}. ++my (undef, undef, $dbname) = split (/_/, $0, 3); ++die "No dbname configured (did you make the proper symlink?)" unless $dbname; ++ ++my @datasources = DBI->data_sources ('Pg') ++ or die ("Can't read any possible data sources: $?"); ++ ++my $dbh = DBI->connect ('dbi:Pg:', '', '', {RaiseError =>1}); ++unless($dbh) { ++ die("Error connecting to database. (". $DBI::errstr .")\n"); ++} ++ ++if ($configure) { ++ print <<_EOM; ++graph_title Postgres database $dbname ++graph_args -l 0 --base 1024 ++graph_vlabel bytes ++graph_category PostgreSQL ++graph_info Size ++size.label Database size (bytes) ++size.info Database size ++size.type GAUGE ++size.draw AREA ++indexsize.label Index size (bytes) ++indexsize.info Index size ++indexsize.type GAUGE ++indexsize.draw STACK ++metasize.label Meta database size (bytes) ++metasize.info Meta database size ++metasize.type GAUGE ++metasize.draw STACK ++metaindexsize.label Meta index size (bytes) ++metaindexsize.info Meta index size ++metaindexsize.type GAUGE ++metaindexsize.draw STACK ++_EOM ++} else { ++ my $database_pages = 0; ++ my $database_indexes = 0; ++ my $metadatabase_pages = 0; ++ my $metadatabase_indexes = 0; ++ my @names = $dbh->tables; ++ ++ # Find relfilenode and relpages from the given table ++ my $q_ind = "SELECT relkind, relfilenode, relpages FROM pg_class ++ WHERE relname = ? ++ UNION ++ SELECT relkind, relfilenode, relpages FROM pg_class ++ WHERE relfilenode IN (SELECT indexrelid FROM pg_index ++ WHERE indrelid IN (SELECT relfilenode FROM pg_class ++ WHERE relname = ?))"; ++ my $sth = $dbh->prepare ($q_ind) or die $dbh->errstr; ++ ++ # Iterate over the tables in the database ++ foreach my $table (@names) { ++ my $meta = 1; ++ print "#TABLE: $table\n" if $debug; ++ my $table_pages = 0; ++ my $table_indexes = 0; ++ my $metatable_pages = 0; ++ my $metatable_indexes = 0; ++ # "public" tables are the user data ++ $meta = 0 if $table =~ /^public\./; ++ $table =~ s/^.*\.//; ++ ++ # Call the query with $table twice for each side of the UNION ++ $sth->execute ($table, $table) or die $dbh->errstr; ++ while (my ($relkind, $relfilenode, $relpages) = $sth->fetchrow_array) { ++ if ($relkind eq 'r') { ++ $table_pages += $relpages if $meta == 0; ++ $metatable_pages += $relpages if $meta == 1; ++ } elsif ($relkind eq 'i') { ++ $table_indexes += $relpages if $meta == 0; ++ $metatable_indexes += $relpages if $meta == 1; ++ } ++ # Define the query ++ my $q2 = "SELECT SUM(relpages) ++ FROM pg_class ++ WHERE relname IN (?, ?)"; ++ my $sth2 = $dbh->prepare ($q2); ++ $sth2->execute ("pg_toast_${relfilenode}", ++ "pg_toast_${relfilenode}_index"); ++ my $relpages = $sth2->fetchrow_array; ++ if ($relkind eq 'r') { ++ $table_pages += $relpages if $meta == 0; ++ $metatable_pages += $relpages if $meta == 1; ++ } elsif ($relkind eq 'i') { ++ $table_indexes += $relpages if $meta == 0; ++ $metatable_indexes += $relpages if $meta == 1; ++ } ++ print "#\tR:$relfilenode\tP:$table_pages\tI:$table_indexes\n" if $debug; ++ } ++ $database_pages += $table_pages; ++ $database_indexes += $table_indexes; ++ $metadatabase_pages += $metatable_pages; ++ $metadatabase_indexes += $metatable_indexes; ++ } ++ $sth->finish; ++ $dbh->disconnect; ++ print "size\.value " . $database_pages * 8192 . "\n"; ++ print "indexsize\.value " . $database_indexes * 8192 . "\n"; ++ print "metasize\.value " . $metadatabase_pages * 8192 . "\n"; ++ print "metaindexsize\.value " . $metadatabase_indexes * 8192 . "\n"; ++} --- munin-1.2.6.orig/debian/patches/290-postfix_spooldir +++ munin-1.2.6/debian/patches/290-postfix_spooldir @@ -0,0 +1,20 @@ +Index: munin-1.2.6/node/node.d/postfix_mailqueue.in +=================================================================== +--- munin-1.2.6.orig/node/node.d/postfix_mailqueue.in 2005-03-29 22:32:59.000000000 +0200 ++++ munin-1.2.6/node/node.d/postfix_mailqueue.in 2008-08-14 05:27:46.000000000 +0200 +@@ -30,8 +30,13 @@ + #%# family=auto + #%# capabilities=autoconf + +-# Can be set via environment, but default is /var/spool/postfix +-SPOOLDIR=${spooldir:-/var/spool/postfix} ++# Can be set via environment, but default is fetched by postconf (if available, ++# else /var/spool/postfix) ++if which postconf > /dev/null ; then ++ SPOOLDIR=${spooldir:-`postconf -h queue_directory`} ++else ++ SPOOLDIR=${spooldir:-/var/spool/postfix} ++fi + + # Postfix mqueue management: http://www.postfix.cs.uu.nl/queuing.html + # maildrop: Localy posted mail --- munin-1.2.6.orig/debian/patches/420-munin-limits.excessive-notifications.patch +++ munin-1.2.6/debian/patches/420-munin-limits.excessive-notifications.patch @@ -0,0 +1,99 @@ +Index: munin-1.2.6/server/munin-limits.in +=================================================================== +--- munin-1.2.6.orig/server/munin-limits.in 2008-02-18 02:00:00.000000000 +0100 ++++ munin-1.2.6/server/munin-limits.in 2009-01-15 23:34:08.000000000 +0100 +@@ -154,7 +154,8 @@ + } + my $critical; + my $warning; +- ($warning, $critical) = get_limits ($client, $domain, $name, $clientname, $key); ++ my $unknown_limit; ++ ($warning, $critical, $unknown_limit) = get_limits ($client, $domain, $name, $clientname, $key); + + my $filename = "$config->{dbdir}/$domain/$name-$clientname-$key-". + lc substr (($client->{"$key.type"}||"GAUGE"),0,1) . ".rrd"; +@@ -186,12 +187,22 @@ + $client->{'worstid'} = 3 if $client->{"worstid"} == 0; + $notes{$domain}{$name}{$clientname}{"$key.state"} = "unknown"; + $notes{$domain}{$name}{$clientname}{"$key.unknown"} = +- (defined $client->{"$key.extinfo"} ? "unknown: " . $client->{"$key.extinfo"} : "Value is unknown."); +- if (!defined ($oldnotes->{'domain'}->{$domain}->{'node'}->{$name}->{'client'}->{$clientname}->{"$key.state"}) or +- $oldnotes->{'domain'}->{$domain}->{'node'}->{$name}->{'client'}->{$clientname}->{"$key.state"} ne "unknown") ++ (defined $client->{"$key.extinfo"} ? "unknown: " . $client->{"$key.extinfo"} : "Value is unknown."); ++ $notes{$domain}{$name}{$clientname}{"$key.notify_countdown"} = ++ defined($oldnotes->{'domain'}->{$domain}->{'node'}->{$name}->{'client'}->{$clientname}->{"$key.notify_countdown"}) ++ ? $oldnotes->{'domain'}->{$domain}->{'node'}->{$name}->{'client'}->{$clientname}->{"$key.notify_countdown"} ++ : $unknown_limit; ++ ++ # Check to see if the limit has been reached for consecutive UNKNOWN values. ++ # If so, then indicate that there's been a state change. ++ if ($notes{$domain}{$name}{$clientname}{"$key.notify_countdown"} > 0) + { +- $client->{'state_changed'} = 1; +- } ++ $notes{$domain}{$name}{$clientname}{"$key.notify_countdown"} -= 1; ++ if ($notes{$domain}{$name}{$clientname}{"$key.notify_countdown"} == 0) ++ { ++ $client->{'state_changed'} = 1; ++ } ++ } + } + elsif ((defined ($critical->[0]) and $value < $critical->[0]) or + (defined ($critical->[1]) and $value > $critical->[1])) { +@@ -229,12 +240,16 @@ + { + $client->{'state_changed'} = 1; + } +- } ++ } + elsif (defined ($oldnotes->{'domain'}->{$domain}->{'node'}->{$name}->{'client'}->{$clientname}->{"$key.state"}) or + $force) + { + $notes{$domain}{$name}{$clientname}{"$key.ok"} = "OK"; +- $client->{'state_changed'} = 1; ++ if ( !($oldnotes->{'domain'}->{$domain}->{'node'}->{$name}->{'client'}->{$clientname}->{"$key.state"} eq "unknown" and ++ $oldnotes->{'domain'}->{$domain}->{'node'}->{$name}->{'client'}->{$clientname}->{"$key.notify_countdown"} > 0)) ++ { ++ $client->{'state_changed'} = 1; ++ } + } + } + } +@@ -250,6 +265,7 @@ + my $key = shift; + my @critical = (undef, undef); + my @warning = (undef, undef); ++ my $unknown_limit = 3; + if (defined $client->{"$key.critical"} and + $client->{"$key.critical"} =~ /^\s*([-+\d.]*):([-+\d.]*)\s*$/) + { +@@ -286,7 +302,15 @@ + @warning = (0, 0); + logger ("processing warning: $domain -> $name -> $clientname -> $key -> $warning[0] : $warning[1]") if $DEBUG; + } +- return (\@warning, \@critical); ++ ++ if (defined $client->{"$key.unknown_limit"} and ++ $client->{"$key.unknown_limit"} =~ /^\s*(\d+)\s*$/) ++ { ++ $unknown_limit = $1 if defined $1; ++ logger ("processing unknown: $domain -> $name -> $clientname -> $key -> $unknown_limit") if $DEBUG; ++ } ++ ++ return (\@warning, \@critical, $unknown_limit); + } + + sub generate_service_message { +Index: munin-1.2.6/server/Munin.pm.in +=================================================================== +--- munin-1.2.6.orig/server/Munin.pm.in 2009-01-15 23:34:43.000000000 +0100 ++++ munin-1.2.6/server/Munin.pm.in 2009-01-15 23:35:16.000000000 +0100 +@@ -81,7 +81,7 @@ + "text", "command", "contact", "contacts", "max_messages", + "always_send", "notify_alias", "line", "state", "graph_period", + "cgiurl_graph", "cgiurl", "service_order", "category_order", +- "version", "colour", "ok", "unknown" ++ "version", "colour", "ok", "unknown", "unknown_limit", "notify_countdown" + ); + + my %legal_expanded = map { $_ => 1 } @legal; --- munin-1.2.6.orig/debian/patches/232-ntp_offset.patch +++ munin-1.2.6/debian/patches/232-ntp_offset.patch @@ -0,0 +1,10 @@ +Index: munin-1.2.6/node/node.d/ntp_offset.in +=================================================================== +--- munin-1.2.6.orig/node/node.d/ntp_offset.in 2008-06-22 23:02:53.000000000 +0200 ++++ munin-1.2.6/node/node.d/ntp_offset.in 2008-06-22 23:02:59.000000000 +0200 +@@ -1,4 +1,4 @@ +-#!@@GOODSH@@ -w ++#!@@GOODSH@@ + # -*- sh -*- + # + # Plugin to monitor NTP time offset. --- munin-1.2.6.orig/debian/patches/330-courier-typo +++ munin-1.2.6/debian/patches/330-courier-typo @@ -0,0 +1,12 @@ +Index: munin-1.2.6.obsolete.0.945208103469671/node/node.d/courier_.in +=================================================================== +--- munin-1.2.6.obsolete.0.945208103469671.orig/node/node.d/courier_.in 2008-07-21 00:24:10.000000000 +0200 ++++ munin-1.2.6.obsolete.0.945208103469671/node/node.d/courier_.in 2008-07-21 00:24:16.000000000 +0200 +@@ -26,7 +26,6 @@ + # + # courierpop3login: + # Jan 22 06:28:24 raven courierpop3login: Connection, ip=[::ffff:192.168.0.1] +-5B + # Jan 22 06:48:22 raven courierpop3login: DISCONNECTED, user=someuser, ip=[::ffff:192.168.0.1], top=0, retr=0, time=21 + # Jan 22 06:28:24 raven courierpop3login: LOGIN, user=someuser, ip=[::ffff:192.168.0.1] + # Jan 22 06:28:25 raven courierpop3login: LOGOUT, user=someuser, ip=[::ffff:192.168.0.1], top=0, retr=0, time=0 --- munin-1.2.6.orig/debian/patches/120-node.d-tomcat_threads.patch +++ munin-1.2.6/debian/patches/120-node.d-tomcat_threads.patch @@ -0,0 +1,109 @@ +Index: munin-1.2.6/node/node.d/tomcat_threads.in +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ munin-1.2.6/node/node.d/tomcat_threads.in 2008-10-05 22:58:03.000000000 +0200 +@@ -0,0 +1,104 @@ ++#!@@PERL@@ ++# ++# Plugin to monitor the number of tomcat-threads running on the ++# machine, and (in addition to a simple process count), separate then ++# into "busy" or "idle" servers. ++# ++# Author: Rune Nordbøe Skillingstad ++# ++# Requirements: ++# - Needs access to http://:@localhost:8080/manager/status?XML=true (or modify the ++# address for another host). A munin-user in $CATALINA_HOME/conf/tomcat-users.xml ++# should be set up for this to work. ++# ++# Tip: To see if it's already set up correctly, just run this plugin ++# with the parameter "autoconf". If you get a "yes", everything should ++# work like a charm already. ++# ++# tomcat-users.xml example: ++# ++# ++# Parameters supported: ++# ++# config ++# autoconf ++# ++# Configurable variables ++# ++# timeout - Connection timeout ++# url - Override default status-url ++# ports - HTTP port numbers ++# user - Manager username ++# password - Manager password ++# ++# Magic markers: ++#%# family=auto ++#%# capabilities=autoconf ++ ++use strict; ++ ++my $ret = undef; ++ ++if(!eval "require LWP::UserAgent;") { ++ $ret = "LWP::UserAgent not found"; ++} ++ ++if(!eval "require XML::Simple;") { ++ $ret .= "XML::Simple not found"; ++} ++ ++my $URL = exists $ENV{'url'} ? $ENV{'url'} : "http://%s:%s\@127.0.0.1:%d/manager/status?XML=true"; ++my $PORT = exists $ENV{'ports'} ? $ENV{'ports'} : 8080; ++my $USER = exists $ENV{'user'} ? $ENV{'user'} : "munin"; ++my $PASSWORD = exists $ENV{'password'} ? $ENV{'password'} : "munin"; ++my $TIMEOUT = exists $ENV{'timeout'} ? $ENV{'timeout'} : 30; ++ ++my $url = sprintf $URL, $USER, $PASSWORD, $PORT; ++ ++if(exists $ARGV[0] and $ARGV[0] eq "autoconf") { ++ if($ret) { ++ print "no ($ret)\n"; ++ exit 1; ++ } ++ my $au = LWP::UserAgent->new(timeout => $TIMEOUT); ++ my $repsonse = $au->request(HTTP::Request->new('GET',$url)); ++ if($repsonse->is_success and $repsonse->content =~ /.*<\/status>/im) { ++ print "yes\n"; ++ exit 0; ++ } else { ++ print "no (no tomcat status)\n"; ++ exit 1; ++ } ++} ++ ++if(exists $ARGV[0] and $ARGV[0] eq "config") { ++ print "graph_title Tomcat threads\n"; ++ print "graph_args --base 1000 -l 0\n"; ++ print "graph_vlabel threads\n"; ++ print "graph_category tomcat\n"; ++ print "graph_total total\n"; ++ print "graph_order busy idle\n"; ++ print "busy.label busy threads\n"; ++ print "busy.draw AREA\n"; ++ print "idle.label idle threads\n"; ++ print "idle.draw STACK\n"; ++ exit 0; ++} ++ ++my $ua = LWP::UserAgent->new(timeout => $TIMEOUT); ++my $xs = new XML::Simple; ++my $response = $ua->request(HTTP::Request->new('GET',$url)); ++my $xml = $xs->XMLin($response->content); ++ ++if($xml->{'connector'}->{'http-'.$PORT}->{'threadInfo'}->{'currentThreadsBusy'} && ++ $xml->{'connector'}->{'http-'.$PORT}->{'threadInfo'}->{'currentThreadCount'}) { ++ print "busy.value " . $xml->{'connector'}->{'http-'.$PORT}->{'threadInfo'}->{'currentThreadsBusy'} . "\n"; ++ print "idle.value " . ++ ($xml->{'connector'}->{'http-'.$PORT}->{'threadInfo'}->{'currentThreadCount'} - ++ $xml->{'connector'}->{'http-'.$PORT}->{'threadInfo'}->{'currentThreadsBusy'}) . "\n"; ++} else { ++ print "busy.value U\n"; ++ print "idle.value U\n"; ++} ++ ++# vim:syntax=perl --- munin-1.2.6.orig/debian/patches/460-netstat-regex.patch +++ munin-1.2.6/debian/patches/460-netstat-regex.patch @@ -0,0 +1,11 @@ +Index: munin-1.2.6/node/node.d.linux/netstat.in +=================================================================== +--- munin-1.2.6.orig/node/node.d.linux/netstat.in 2009-02-26 23:03:35.000000000 +0100 ++++ munin-1.2.6/node/node.d.linux/netstat.in 2009-02-26 23:04:34.000000000 +0100 +@@ -71,5 +71,5 @@ + exit 0 + fi + +-netstat -s | awk '/active connections/ { 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 }' ++netstat -s | awk '/active connections opening/ { print "active.value " $1 } /passive connection opening/ { print "passive.value " $1 } /failed connection/ { print "failed.value " $1 } /connection resets/ { print "resets.value " $1 } /connections established/ { print "established.value " $1 }' + --- munin-1.2.6.orig/debian/patches/240-amavis-logtail.patch +++ munin-1.2.6/debian/patches/240-amavis-logtail.patch @@ -0,0 +1,29 @@ +Index: trunk/node/node.d/amavis.in +=================================================================== +--- trunk.orig/node/node.d/amavis.in 2008-07-01 19:01:18.000000000 +0200 ++++ trunk/node/node.d/amavis.in 2008-07-01 19:02:11.000000000 +0200 +@@ -50,23 +50,11 @@ + spamm=U + spams=U + +-ARGS=0 +-`$LOGTAIL /etc/hosts 2>/dev/null >/dev/null` +-if [ $? = 66 ]; then +- if [ ! -n "$logtail" ]; then +- ARGS=1 +- fi +-fi +- + TEMP_FILE=`mktempfile munin-amavis.XXXXXX` + + if [ -n "$TEMP_FILE" -a -f "$TEMP_FILE" ] + then +- if [ $ARGS != 0 ]; then +- logtail -f ${AMAVIS_LOG} -o $STATEFILE | grep 'amavis\[.*\]:' > ${TEMP_FILE} +- else +- logtail ${AMAVIS_LOG} $STATEFILE | grep 'amavis\[.*\]:' > ${TEMP_FILE} +- fi ++ logtail ${AMAVIS_LOG} $STATEFILE | grep 'amavis\[.*\]:' > ${TEMP_FILE} + total=`cat ${TEMP_FILE} | wc -l` + virus=`grep INFECTED ${TEMP_FILE} | wc -l` + spamm=`grep 'Passed.*Hits: 1[0-9][.]' ${TEMP_FILE} | wc -l` --- munin-1.2.6.orig/debian/patches/236-nut_misc.patch +++ munin-1.2.6/debian/patches/236-nut_misc.patch @@ -0,0 +1,10 @@ +Index: munin-1.2.6/node/node.d/nut_misc.in +=================================================================== +--- munin-1.2.6.orig/node/node.d/nut_misc.in 2008-06-29 16:39:37.000000000 +0200 ++++ munin-1.2.6/node/node.d/nut_misc.in 2008-06-29 16:39:40.000000000 +0200 +@@ -1,4 +1,4 @@ +-!@@PERL@@ ++#!@@PERL@@ + + use strict; + --- munin-1.2.6.orig/debian/patches/500-node.d-bind9_rndc-3.5 +++ munin-1.2.6/debian/patches/500-node.d-bind9_rndc-3.5 @@ -0,0 +1,31 @@ +# taken from http://munin.projects.linpro.no/ticket/627 +Index: munin-1.2.6/node/node.d/bind9_rndc.in +=================================================================== +--- munin-1.2.6.orig/node/node.d/bind9_rndc.in 2009-05-28 20:17:39.000000000 +0200 ++++ munin-1.2.6/node/node.d/bind9_rndc.in 2009-05-28 20:19:02.000000000 +0200 +@@ -41,6 +41,7 @@ + open(my $stats, '<', $querystats) or die "$querystats: $!\n"; + seek($stats , 400, -1); # go nearly to the end of the file + # to avoid reading it all ++my $mode = 0; # 0=Bind9.3, 1=Bind9.5 + + while (my $line = <$stats>) { + chomp $line; +@@ -58,6 +59,17 @@ + if ($line =~ m/\+\+\+ Statistics Dump \+\+\+/) { + # reset + undef %IN; ++ } elsif ($line =~ m/\+\+ Name Server Statistics \+\+/) { ++ undef %IN; ++ $mode = 1; ++ ++ } elsif( $mode == 1 ) { ++ my($i,$s) = $line =~ m/^\s+(\d+) (.*)/ or next; ++ $s =~ /(successful answer|(?:non )?authoritative answer|recursion)/ or next; ++ my $key = $1; ++ $key =~ s/ /_/g; ++ $IN{$key} = $i; ++ + } else { + my ($what, $nb)= split('\s+', $line); + if ($what && ($what ne '---')) { --- munin-1.2.6.orig/debian/patches/200-node-plugins.history.patch +++ munin-1.2.6/debian/patches/200-node-plugins.history.patch @@ -0,0 +1,12 @@ +Index: munin-1.2.6/node/plugins.history.in +=================================================================== +--- munin-1.2.6.orig/node/plugins.history.in 2008-06-12 02:36:22.000000000 +0200 ++++ munin-1.2.6/node/plugins.history.in 2008-06-12 02:46:47.000000000 +0200 +@@ -129,3 +129,7 @@ + [1.2.6rc1] + [1.2.6rc2] + [1.2.6] ++tomcat_access ++tomcat_jvm ++tomcat_threads ++tomcat_volume --- munin-1.2.6.orig/debian/patches/250-amavis-maillog.patch +++ munin-1.2.6/debian/patches/250-amavis-maillog.patch @@ -0,0 +1,13 @@ +Index: trunk/node/node.d/amavis.in +=================================================================== +--- trunk.orig/node/node.d/amavis.in 2008-07-01 19:11:41.000000000 +0200 ++++ trunk/node/node.d/amavis.in 2008-07-01 19:12:00.000000000 +0200 +@@ -18,7 +18,7 @@ + @@MKTEMP@@ + } + +-AMAVIS_LOG=${logfile:-/var/log/mail/mail.info} ++AMAVIS_LOG=${logfile:-/var/log/mail.info} + LOGTAIL=${logtail:-`which logtail`} + STATEFILE=@@PLUGSTATE@@/amavis.offset + --- munin-1.2.6.orig/debian/patches/320-sensors_fix +++ munin-1.2.6/debian/patches/320-sensors_fix @@ -0,0 +1,31 @@ +Index: munin-1.2.6/node/node.d.linux/sensors_.in +=================================================================== +--- munin-1.2.6.orig/node/node.d.linux/sensors_.in 2008-07-21 00:11:47.000000000 +0200 ++++ munin-1.2.6/node/node.d.linux/sensors_.in 2008-07-21 00:13:41.000000000 +0200 +@@ -88,7 +88,7 @@ + + if ( defined $ARGV[0] and $ARGV[0] eq 'autoconf' ) { + # Now see if "sensors" can run +- my $text = `$SENSORS`; ++ my $text = `$SENSORS 2>/dev/null`; + if ($?) { + if ($? == -1) { + print "no (program $SENSORS not found)\n"; +@@ -108,7 +108,16 @@ + } + + if (defined $ARGV[0] and $ARGV[0] eq 'suggest') { +- my $text = `$SENSORS`; ++ my $text = `$SENSORS 2>/dev/null`; ++ if ($?) { ++ if ($? == -1) { ++ print "no (program $SENSORS not found)\n"; ++ } else { ++ print "no (program $SENSORS died)\n"; ++ } ++ exit 1; ++ } ++ + foreach my $func (keys %config) { + print $func, "\n" if $text =~ $config{$func}->{regex}; + } --- munin-1.2.6.orig/debian/patches/380-munin-graph-utf8.patch +++ munin-1.2.6/debian/patches/380-munin-graph-utf8.patch @@ -0,0 +1,29 @@ +Index: munin-1.2.6/server/munin-graph.in +=================================================================== +--- munin-1.2.6.orig/server/munin-graph.in 2008-09-08 21:42:45.000000000 +0200 ++++ munin-1.2.6/server/munin-graph.in 2008-09-08 21:52:01.000000000 +0200 +@@ -30,6 +30,7 @@ + use Digest::MD5; + use Getopt::Long; + use Time::HiRes; ++if ($RRDs::VERSION >= 1.3) { use Encode; } + + my $graph_time= Time::HiRes::time; + my $DEBUG = 0; +@@ -858,6 +859,16 @@ + } + print "\n\nrrdtool \"graph\" \"", + join ("\"\n\t\"",@complete), "\"\n" if $DEBUG; ++ ++ # Since version 1.3 rrdtool uses libpango which needs its input ++ # as utf8 string. So we assume that every input is in latin1 ++ # and decode it to perl's internal representation and then to utf8. ++ if ( $RRDs::VERSION >= 1.3 ) { ++ @complete = map { ++ $_ = encode("utf8", (decode("latin1", $_))); ++ } @complete; ++ } ++ + RRDs::graph (@complete); + if (my $ERROR = RRDs::error) { + logger ("Unable to graph $filename: $ERROR"); --- munin-1.2.6.orig/debian/patches/220-Makefile.patch +++ munin-1.2.6/debian/patches/220-Makefile.patch @@ -0,0 +1,13 @@ +Index: munin-1.2.6/Makefile +=================================================================== +--- munin-1.2.6.orig/Makefile 2008-06-15 21:41:08.000000000 +0200 ++++ munin-1.2.6/Makefile 2008-06-15 21:41:38.000000000 +0200 +@@ -66,7 +66,7 @@ + mkdir -p $(CONFDIR)/plugin-conf.d + mkdir -p $(LIBDIR)/plugins + mkdir -p $(SBINDIR) +- mkdir -p $(PERLLIB)/Munin/Plugin ++ mkdir -p $(PERLLIB)/Munin + + mkdir -p $(LOGDIR) + mkdir -p $(STATEDIR) --- munin-1.2.6.orig/debian/patches/210-munindoc-manpage.patch +++ munin-1.2.6/debian/patches/210-munindoc-manpage.patch @@ -0,0 +1,61 @@ +Index: munin-1.2.6/Makefile +=================================================================== +--- munin-1.2.6.orig/Makefile 2008-06-12 10:02:57.000000000 +0200 ++++ munin-1.2.6/Makefile 2008-06-12 10:05:06.000000000 +0200 +@@ -102,7 +102,7 @@ + #configure plugins. + + install-man: build-man +- mkdir -p $(MANDIR)/man1 $(MANDIR)/man5 $(MANDIR)/man8 ++ mkdir -p $(MANDIR)/man1 $(MANDIR)/man5 $(MANDIR)/man8 $(MANDIR)/man1 + $(INSTALL) -m 0644 build/doc/munin-node.conf.5 $(MANDIR)/man5/ + $(INSTALL) -m 0644 build/doc/munin.conf.5 $(MANDIR)/man5/ + $(INSTALL) -m 0644 build/doc/munin-node.8 $(MANDIR)/man8/ +@@ -114,6 +114,7 @@ + $(INSTALL) -m 0644 build/doc/munin-limits.8 $(MANDIR)/man8/ + $(INSTALL) -m 0644 build/doc/munin-html.8 $(MANDIR)/man8/ + $(INSTALL) -m 0644 build/doc/munin-cron.8 $(MANDIR)/man8/ ++ $(INSTALL) -m 0644 build/doc/munindoc.1 $(MANDIR)/man1/ + + install-doc: build-doc + mkdir -p $(DOCDIR) +@@ -205,6 +206,8 @@ + server/munin.conf.pod > build/doc/munin.conf.5 + pod2man --section=5 --release=$(RELEASE) --center="Munin Documentation" \ + node/munin-node.conf.pod > build/doc/munin-node.conf.5 ++ pod2man --section=1 --release=$(RELEASE) --center="Munin Documentation" \ ++ build/node/munindoc > build/doc/munindoc.1 + + touch build-man-stamp + +Index: munin-1.2.6/node/munindoc.in +=================================================================== +--- munin-1.2.6.orig/node/munindoc.in 2008-06-12 10:06:26.000000000 +0200 ++++ munin-1.2.6/node/munindoc.in 2008-06-12 10:07:39.000000000 +0200 +@@ -80,3 +80,26 @@ + + This program displays munin documentation found in pod format adjacent + to plugins (and later other parts of Munin). ++Please see "man perlpod" for the reference manual to writing pod files. ++ ++=head1 AUTHORS ++ ++Nicolai Langfeldt ++ ++=head1 BUGS ++ ++None known. ++ ++=head1 COPYRIGHT ++ ++Copyright (C) 2008 Nicolai Langfeldt/Linpro AS ++ ++This is free software; see the source for copying conditions. There is ++NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR ++PURPOSE. ++ ++This program is released under the GNU General Public License ++ ++=cut ++ ++ --- munin-1.2.6.orig/debian/patches/230-exim_mailqueue.patch +++ munin-1.2.6/debian/patches/230-exim_mailqueue.patch @@ -0,0 +1,43 @@ +Index: munin-1.2.6/node/node.d/exim_mailqueue.in +=================================================================== +--- munin-1.2.6.orig/node/node.d/exim_mailqueue.in 2008-06-22 20:41:50.000000000 +0200 ++++ munin-1.2.6/node/node.d/exim_mailqueue.in 2008-06-22 20:43:54.000000000 +0200 +@@ -24,25 +24,26 @@ + #%# capabilities=autoconf + + DIRNAME=$(dirname $0) +-SPOOLDIR="unset" +-# You cannot trust the exit status of which +-EXIM=$(which exim 2>/dev/null) +-case $EXIM:$? in +- *:1|no*) EXIM=$(which exim4 2>/dev/null) +-esac +-case $EXIM:$? in +- *:1|no*) EXIM='' +-esac ++SPOOLDIR=${spooldir:-unset} ++EXIM=${exim:-unset} ++if [ "$EXIM" = "unset" ]; then ++ # You cannot trust the exit status of which ++ EXIM=$(which exim 2>/dev/null) ++ case $EXIM:$? in ++ *:1|no*) EXIM=$(which exim4 2>/dev/null) ++ esac ++ case $EXIM:$? in ++ *:1|no*) EXIM='' ++ esac ++fi + + GRAPHTITLE='Exim Mailqueue' + +-SPOOLDIR=${spooldir:-unset} +-EXIM=${exim:-unset} + QUEUEWARN=${queuewarn:-100} + QUEUECRIT=${queuecrit:-200} + GRAPHTITLE=${graphtitle:-$GRAPHTITLE} + +-if [ "$SPOOLDIR" = "unset" ] ++if [ "$SPOOLDIR" = "unset" ] && [ -n "$EXIM" ] + then + SPOOLDIR=$( ($EXIM -bP spool_directory | awk '{ print $3 "/input" }') 2>/dev/null) + fi --- munin-1.2.6.orig/debian/patches/430-apc_nis-line_volt.patch +++ munin-1.2.6/debian/patches/430-apc_nis-line_volt.patch @@ -0,0 +1,13 @@ +Index: munin-1.2.6/node/node.d/apc_nis.in +=================================================================== +--- munin-1.2.6.orig/node/node.d/apc_nis.in 2009-01-16 19:07:43.000000000 +0100 ++++ munin-1.2.6/node/node.d/apc_nis.in 2009-01-16 19:08:28.000000000 +0100 +@@ -35,7 +35,7 @@ + print "battery_charge.max 200\n"; + print "line_volt.label line (V)\n"; + print "line_volt.type GAUGE\n"; +- print "line_volt.max 200\n"; ++ print "line_volt.max 300\n"; + print "load.label ups load (%)\n"; + print "load.type GAUGE\n"; + print "load.max 200\n";