Changeset 1012

Show
Ignore:
Timestamp:
29/05/06 15:33:39 (6 years ago)
Author:
ilmari
Message:

r1388@vesla: ilmari | 2006-05-29 01:06:38 +0100
Merge changes from trunk

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • people/ilmari/modularisation-branch/ChangeLog

    r864 r1012  
    1 munin (CVS) 
    2  
     1munin (repository) 
     2 
     3  * Plugins: Add module Munin::Plugin::SNMP and convert plugins to use it. 
     4  * Server: Display the time period in the title of the comparison pages. 
     5  * Merge changes from 1.2.3->1.2.4. Some of the following entries may not 
     6  apply. 
     7  * Plugins: "exists $ARGV[0]" does not work with perl < 5.6.0. use 
     8    "defined $ARGV[0]". 
     9  * Dists: Brought dists.freebsd in line with the FreeBSD ports. 
     10  * Dists: Merged changes from Debian Etch package. See 
     11    dists/debian/changelog. 
     12  * Main: Correct munin-limits pod documentation. 
     13  * Server: filter a trivial error message from RRDtool (Deb#326061) 
     14  * Server: A patch from trunk that makes munin-limits eat stdout/err from the 
     15    contact.foo.command option in munin.conf. (Deb#301196) 
     16  * Server: make munin-graph deal with RRDtool 1.0.x and 1.2.x. 
     17  * Server: Fix thinko in category_order in munin-html.in. 
     18  * Server: Fix handling of 'update no' on services.  
     19  * Server: Log warning about nodes without addresses. 
     20  * Node: Prevent list command from polluting the node list. 
     21  * Plugins: Fix tempfile creation by using the best method available on a given 
     22    platform. (amavis, courier_, perdition) 
     23  * Plugins: Fix to support the Linux cciss driver in the iostat plugin. 
     24  * Plugins: squid_requests: Put the CDEF back that computes misses. 
     25  * Plugins: postfix_mailvolume: Fix bad exit code test for `which postconf`. 
     26  * Plugins: hddtemp_smartctl: Fix bugs on Solaris.  Revert back to using -A 
     27  (attributes) rather than -a (all).  That can be specified through the 
     28  args_$dev mechanism.  THIS CAN BREAK EXISTING SETUPS! 
     29  * Plugins: samba: Make location of smbstatus program configurable. 
     30  Streamline computation of foo.value. Correct typos and a thinko. Add 
     31  configurable "ignoreipcshare". Make awk program a lot more complicated to 
     32  deal with variations of smbstatus output. Quote error message with 
     33  parentheseis. 
     34  * Plugins: smart_: Allow to query several drives on the same 3ware card. 
     35  Correct a bug when '-i' was not listed in smartargs.  Don't fail if 
     36  no value was obtained for hard drive model. Minor enhancements and 
     37  minor bug fixes from Nicolas STRANSKY <Nico@neo-lan.net>. smartctl exit 
     38  code is a value composed of bits. Allow more than one to be turned on 
     39  simultaneously by using the exit code itself rather than the log2 of it. 
     40  * Plugins: perdition: Add missing backquote on mktempfile line. Support 
     41  IMAPS and POP3S protocols. 
     42  * Plugins (FreeBSD): if_, if_errcoll_: Shift field numbers in awk for 
     43  interfaces that have no MAC address. 
     44  * Plugins (Solaris): fs_df, fs_inodes: Allow '-' in mountpoints. 
     45  * Plugins (Solaris): processes: Replaced numerous calls to various programs 
     46  with a single awk program. 
     47  * Plugins (Solaris): netstat: "exists $ARGV[0]" does not work with perl < 
     48  5.6.0. use "defined $ARGV[0]". 
     49  * Plugins (Solaris): memory: Rewrite the value computation as a single nawk 
     50  program. Support scale factor "K" (gives values < 1). 
     51  * Plugins (Linux): port_: Correct offset error in TCP6 code. 
     52  * Plugins (Linux): if_: Simplify awk program greatly, suggested by 
     53    Nicolai Langfeldt <janl@linpro.no> 
     54 
     55munin (1.3.2) 
     56 
     57  * Main/node: Implemented TLS support. 
     58  * Main: fix the file vs. pipe check in munin-limits. 
     59  * Main: place the munin-limits lock file in rundir, not dbdir. 
    360  * Main: Yet another rewrite of munin-limits open call (SF#1115434). 
    461  * Main: Make sure all rrd-tunes are correct after an upgrade (Deb#296454, 
     
    966  * Main: Escape regexps more properly (Deb#296575). 
    1067  * Main: Correct expires-headers in CGI output (SF#1159742). 
     68  * Main: Redirect stdout/stderr from munin-limits contact commands, to the 
     69    munin-limits log file (Deb#301196). 
    1170  * Node: munin-node didn't treat default_plugin_user properly (Deb#295366). 
    1271  * Node: munin-node-configure now properly respect user plugins. 
    13   * Plugins: Add module Munin::Plugin::SNMP and convert plugins to use it
     72  * Plugins: sort drives in generic/hddtemp_smartcl (SF#1174847)
    1473  * Plugins: linux/if* now treats ra* interfaces as wireless. 
    1574  * Plugins: minor bugfix in generic/bind9. 
     
    3897  * Plugins: Only run 'exim -bpr' once in generic/exim_mailqueue_alt, 
    3998    and use only awk to process the data. 
     99  * Plugins: Make linux/sensors_ handle multiline output better (Deb#300690). 
     100  * Plugins: generic/postfix_mailstats now treats reject-lines better 
     101    (Deb#302220). 
    40102  * Docs: Added man page for munin-node-configure-snmp. 
    41103  * Docs: Brushed up the comments in the default munin.conf a bit (Deb#294060). 
  • people/ilmari/modularisation-branch/Makefile

    r864 r1012  
    1010INSTALL_PLUGINS ?= "auto manual contrib snmpauto" 
    1111INSTALL          = ./install-sh 
     12DIR              = $(shell /bin/pwd | sed 's/^.*\///') 
    1213 
    1314default: build 
     
    118119        $(INSTALL) -m 0644 README.* $(DOCDIR)/ 
    119120        $(INSTALL) -m 0644 COPYING $(DOCDIR)/ 
     121        $(INSTALL) -m 0644 build/README-apache-cgi $(DOCDIR)/ 
    120122        $(INSTALL) -m 0644 node/node.d/README $(DOCDIR)/README.plugins 
    121123 
     
    143145                    -e 's|@@OSTYPE@@|$(OSTYPE)|g'                               \ 
    144146                    -e 's|@@HOSTNAME@@|$(HOSTNAME)|g'                   \ 
     147                    -e 's|@@MKTEMP@@|$(MKTEMP)|g'                       \ 
    145148                    -e 's|@@VERSION@@|$(VERSION)|g'                     \ 
    146149                    -e 's|@@PLUGSTATE@@|$(PLUGSTATE)|g'                 \ 
     
    212215 
    213216rpm: rpm-pre 
    214         tar -C .. --dereference --exclude CVS -cvzf ../munin-$(RELEASE).tar.gz munin-$(VERSION)/ 
     217        tar -C .. --dereference --exclude .svn -cvzf ../munin-$(RELEASE).tar.gz munin-$(VERSION)/ 
    215218        (cd ..; rpmbuild -tb munin-$(RELEASE).tar.gz) 
    216219         
    217220rpm-src: rpm-pre 
    218         tar -C .. --dereference --exclude CVS -cvzf ../munin-$(RELEASE).tar.gz munin-$(VERSION)/ 
     221        tar -C .. --dereference --exclude .svn -cvzf ../munin-$(RELEASE).tar.gz munin-$(VERSION)/ 
    219222        (cd ..; rpmbuild -ts munin-$(RELEASE).tar.gz) 
    220223 
     
    230233 
    231234suse: suse-pre 
    232         tar -C .. --dereference --exclude CVS  -cvzf ../munin-$(RELEASE).tar.gz munin-$(VERSION)/ 
     235        tar -C .. --dereference --exclude .svn -cvzf ../munin_$(RELEASE).tar.gz munin-$(VERSION)/ 
    233236        (cd ..; rpmbuild -tb munin-$(RELEASE).tar.gz) 
    234237 
    235238suse-src: suse-pre 
    236         tar -C .. --dereference --exclude CVS  -cvzf ../munin-$(RELEASE).tar.gz munin-$(VERSION)/ 
     239        tar -C .. --dereference --exclude .svn -cvzf ../munin_$(RELEASE).tar.gz munin-$(VERSION)/ 
    237240        (cd ..; rpmbuild -ts munin-$(RELEASE).tar.gz) 
    238241 
     
    249252        -rm -f build-man-stamp 
    250253 
     254        -rm -f dists/redhat/munin.spec 
     255 
    251256source_dist: clean 
    252         (cd ..; ln -s munin munin-$(VERSION)) 
    253         tar -C .. --dereference --exclude CVS -cvzf ../munin_$(RELEASE).tar.gz munin-$(VERSION)/ 
     257        (cd ..; ln -s $(DIR) munin-$(VERSION)) 
     258        tar -C .. --dereference --exclude .svn -cvzf ../munin_$(RELEASE).tar.gz munin-$(VERSION)/ 
    254259 
    255260.PHONY: install install-main install-node install-doc install-man build build-doc deb clean source_dist 
  • people/ilmari/modularisation-branch/Makefile.config

    r864 r1012  
    6262HOSTNAME   = $(shell hostname) 
    6363 
     64# What is the safest way to create a tempfile. 
     65# Default is to figure it out by testing various methods. 
     66# Replace this with a known platform-specific method 
     67MKTEMP     = $(shell ./test-mktemp) 
     68 
    6469# Munin version number. 
    6570VERSION    = $(shell cat RELEASE) 
  • people/ilmari/modularisation-branch/RELEASE

    r864 r1012  
    1 1.3.1 
     11.3.2 
  • people/ilmari/modularisation-branch/dists/debian/Makefile.config

    r864 r1012  
    66HTMLDIR    = $(DESTDIR)/var/www/munin 
    77DBDIR      = $(DESTDIR)/var/lib/munin 
     8 
     9CGIDIR     = $(DESTDIR)/usr/lib/cgi-bin 
    810 
    911LIBDIR     = $(PREFIX)/share/munin 
  • people/ilmari/modularisation-branch/dists/debian/changelog

    r864 r1012  
     1munin (1.2.3-3) unstable; urgency=medium 
     2 
     3  * debian/munin.preinst (removed), debian/munin.postinst, debian/munin.postrm, 
     4    debian/munin-node.preinst (removed), debian/munin-node.postinst: 
     5      - Remove all code that handled upgrades from versions earlier than 
     6        1.2.3-1.  In a way this closes: #308008. 
     7 
     8  * debian/munin.postrm, debian/munin-node.postrm: 
     9      - Replace "test -o" bashism with "||". 
     10 
     11  * debian/munin-node.cron.d: 
     12      - Update APT's package index files periodically if the apt_all plugin 
     13        enabled, too.  Patch by Tommi Virtanen, thanks!  Closes: #317278. 
     14 
     15  * debian/control: 
     16      - Remove conflict declarations on the old LRRD packages. 
     17      - Make munin-node suggest ethtool, closes: #311603. 
     18      - Make Munin depend on rrdtool instead of merely suggesting it.  This is 
     19        a workaround for bug #323975 and its duplicates. 
     20      - Add a dependency on adduser for both packages. 
     21      - Increment standards-version to 3.6.2.1, no changes required. 
     22 
     23  * debian/munin-node.init, debian/control: 
     24      - Reimplemented Munin-Node's init script using LSB functions. 
     25        Closes: #326912, #326913. 
     26      - Add a dependency on lsb-base for Munin-Node. 
     27 
     28  * server/munin-graph.in, debian/control: 
     29      - Replaced the patch from 1.2.3-2 with the upstream one from SVN revision 
     30        954.  This re-enables support for RRDtool 1.0, so the versioned 
     31        dependency on librrds-perl is dropped. 
     32 
     33  * server/munin-cron.in: 
     34      - Swallow bogus output from RRDtool, closes: #326061.  This is a 
     35        (hopefully temporary) workaround for bug #325353. 
     36 
     37 -- Tore Anderson <tore@debian.org>  Sat, 10 Sep 2005 10:58:08 +0200 
     38 
     39munin (1.2.3-2) unstable; urgency=low 
     40 
     41  * server/munin-graph.in: 
     42      - Gave up waiting for the new upstream release, and applied Robert 
     43        Loomans' patch to make Munin support RRDtool 1.2, closes: #324605, 
     44        closes: #325280.  Thanks, Robert!  Note that this breaks compability 
     45        with RRDtool 1.0.  Sarge users should wait for the new upstream release 
     46        which will support both RRDtool 1.0 and 1.2. 
     47 
     48  * debian/control: 
     49      - Made the munin package depend on librrds-perl in versions 1.2 or above. 
     50 
     51 -- Tore Anderson <tore@debian.org>  Wed, 31 Aug 2005 09:11:47 +0200 
     52  
     53munin (1.2.3-1) unstable; urgency=medium 
     54 
     55  * New upstream release, targeted at Sarge. 
     56      - Plugin linux/sensors_ now handles yet another form of output from the 
     57        sensors(1) utility, closes: #300690. 
     58      - Plugin generic/postfix_mailstats now shouldn't include rejects from 
     59        the cleanup daemon in the total count, closes: #302220. 
     60      - Munin-update no longer emits Perl warnings to stdout, closes: #302502. 
     61 
     62  * server/munin-limits.in, debian/NEWS: 
     63      - Apply patch from trunk which redirects all stdout and stderr from the 
     64        program being run to the log, closes: #301196.  The references to this 
     65        functionality has been corrected in the NEWS file, and also in the 
     66        example config file. 
     67 
     68  * debian/control: 
     69      - Increment standards-version to 3.6.1.1, no changes required. 
     70 
     71  * debian/munin.docs: 
     72      - Include README-apache-cgi. 
     73 
     74 -- Tore Anderson <tore@debian.org>  Sun, 03 Apr 2005 02:33:26 +0200 
     75 
     76munin (1.2.2-3) unstable; urgency=high 
     77 
     78  * node/munin-node.in: 
     79      - Fix mis-merge of the optional user patch, restoring per-plugin 
     80        group setting. Thanks to Andras Korn for reporting and 
     81        Robert Loomans for patch (Closes: #299589). 
     82   
     83  * node/munin-node.in, node/munin-run.in: 
     84      - Allow root for the per-plugin group directive. 
     85   
     86  * Fix autoconf for the linux/nfs* plugins. 
     87 
     88 -- Dagfinn Ilmari Mannsaker <ilmari@ilmari.org>  Wed, 16 Mar 2005 20:45:15 +0100 
     89 
     90munin (1.2.2-2) unstable; urgency=low 
     91 
     92  * node/munin-node.in, node/munin-run.in: 
     93      - Allow plugins to specify users to run as if present, while falling 
     94        gracefully back on the default user if the specified user doesn't 
     95        exists.  Patch grabbed from upstream CVS. 
     96 
     97  * debian/plugins.conf: 
     98      - Run the postfix_mailqueue plugin as the postfix user only if it exists. 
     99 
     100 -- Tore Anderson <tore@debian.org>  Sun, 13 Mar 2005 13:55:36 +0100 
     101 
     102munin (1.2.2-1) unstable; urgency=low 
     103 
     104  * New upstream release. 
     105      - Plugin linux/irqstats now handles blank lines in /proc/interrupts, 
     106        closes: #296452. 
     107      - Plugins generic/apache_* could in some cases cause spurious spikes, 
     108        this has now been fixed.  Closes: #296454, #296645. 
     109      - Plugin linux/df_inode now handles devices with hyphens in their names 
     110        correctly, closes: #298442. 
     111      - Plugin generic/exim_mailstats now graphs rejects, closes: #295799. 
     112      - Earlier versions of munin-update could in some cases complain about 
     113        "nested quantifiers in regex", now fixed.  Closes: #296575. 
     114      - Fixes some broken HTML in the templates, closes: #296676. 
     115      - Updates over very slow connections are now handled more gracefully, 
     116        closes: #298108. 
     117 
     118  * debian/rules, debian/plugins.conf, debian/NEWS: 
     119      - Do not include contrib plugins in the munin-node package anymore. 
     120        Sort-of closes: #296533, #297451, #297628, #297904, #298895. 
     121 
     122  * debian/rules, debian/munin-node.postinst: 
     123      - Delay startup of the node significantly, as it may require other 
     124        monitored services (e.g. ntpd) to be already running.  Also change the 
     125        startup time if the package is being upgraded, if the current init 
     126        configuration is the old package's defaults.  Closes: #298793, thanks 
     127        to Stephen Gran for noticing. 
     128 
     129  * debian/plugins.conf: 
     130      - Run the Courier-MTA and Postfix plugins with necessary additional 
     131        privileges so they work out of the box, closes: #297654, #296985. 
     132        Thanks to Charles Fry and Juraj Bednar for pointing this out. 
     133      - The smart_ plugin is now run as root (which is necessary). 
     134 
     135  * debian/control: 
     136      - Suggest acpi over lm-sensors, and not the other way around as it was 
     137        earlier.  Both the acpi and sensors_ plugins achieve the same thing, 
     138        but the former is auto while the latter is manual. 
     139      - Remove the hddtemp suggestion and replace it with smartmontools, 
     140        closes: #296361. The hddtemp* plugins was replaced with 
     141        hddtemp_smartctl in 1.2.0. 
     142      - Suggest python (>= 2.2), used by the smart_ plugin. 
     143      - A few minor rewrites in the descriptions. 
     144 
     145  * debian/munin-node.manpages: 
     146      - Include munin-node-configure-snmp(8). 
     147 
     148  * server/munin-limits.in: 
     149      - Reverted to upstream version, as the patched required in 1.2.0-1 have 
     150        been merged. 
     151 
     152 -- Tore Anderson <tore@debian.org>  Sun, 13 Mar 2005 00:28:49 +0100 
     153 
     154munin (1.2.0-1) unstable; urgency=low 
     155 
     156  * New upstream release, closes: #264878, #293499, #290099: 
     157      - Many plugins have changed type from COUNTER to DERIVE, to avoid 
     158        spurious spikes when the counters are mistakenly assumed to have 
     159        wrapped.  This change may cause empty graphs to occur, take care to 
     160        read NEWS.Debian before upgrading the "munin-node" package! 
     161        Closes: #225623, #233762. 
     162      - Munin-update no longer truncates long field names, closes: #256370. 
     163        This may in some cases cause empty graphs, please read NEWS.Debian for 
     164        more information before upgrading the "munin" package. 
     165      - Replaces the old Nagios-specific integration with a much more generic 
     166        framework for sending alerts to wherever you want.  As a side effect, 
     167        this closes: #291168. 
     168      - Corrects an erroneous commented example in munin.conf, closes: #294060. 
     169      - The munin-node.conf setting default_plugin_user now actually works as 
     170        advertised, closes: #295366, #295367. 
     171      - Plugin generic/bind9 now source its configuration from %ENV, 
     172        closes: #268142, #272049. 
     173      - Plugin generic/amavis now autodetects how to correctly invoke logtail, 
     174        closes: #284638, #288395. 
     175      - Plugin generic/squid_cache now correctly calculates cache size when 
     176        using multiple cache directories, closes: #288579. 
     177      - Plugin generic/postfix_mailstats now defaults to reading from a more 
     178        correct log file, closes: #291720. 
     179      - Plugin generic/postfix_mailstats now correctly identifies the reject 
     180        code as newer Postfix versions logs them, closes: #292110. 
     181      - Plugin generic/postfix_mailvolume now has a improved graph_title (that 
     182        is not the same as the title of generic/postfix_mailstats). 
     183        Closes: #292083. 
     184      - Plugin generic/named now defaults to reading from a more correct log 
     185        file, closes: #291849. 
     186      - Plugin linux/fw_forwarded_local now correctly reports 0 instead of 
     187        NaN in some situations, closes: #284673. 
     188      - Plugin linux/iostat now ingores devices that have had no I/O operations 
     189        whatsoever and thus are assumed to be unused, closes: #267195. 
     190      - New plugin: linux/forks. Closes: #225638. 
     191      - New plugin: linux/uptime. Closes: #283622. 
     192      - New plugin: linux/irqstats. Closes: #224990. 
     193      - New plugin: generic/courier_. Closes: #291854. 
     194      - New plugin: generic/perdition. Closes: #291855. 
     195 
     196  * debian/NEWS: 
     197      - Document the changes that may lead to data loss when upgrading from 
     198        Munin 1.0.x, and also write a bit about the new munin-limits framework. 
     199 
     200  * debian/control: 
     201      - Add dependency on perl-modules (>= 5.8.0) | libparse-recdescent-perl 
     202        for the main munin package, as munin-limits requires Text::Balanced. 
     203      - Add libdate-manip-perl as a recommended package for the munin package, 
     204        as the new CGI functionality depends on it. 
     205      - Change libnet-snmp-perl to be a recommended package for munin-node 
     206        instead of only suggested, as the new munin-node-configure-snmp 
     207        requires it. 
     208 
     209  * debian/Makefile.config: 
     210      - Install the new CGI in /usr/lib/cgi-bin/, as mandated by the Debian 
     211        Policy Manual. 
     212 
     213  * debian/munin.cron.d, debian/munin.manpages, debian/munin.logrotate, 
     214    debian/munin.postrm: 
     215      - The new upstream release includes "munin-limits", which supersede 
     216        "munin-nagios".  Update the installed manual pages, cron jobs, 
     217        logrotate configuration, and purge script accordingly. 
     218 
     219  * debian/plugins.conf: 
     220      - Plugin linux/fw_conntrack is now run as root as this file recently has 
     221        changed to not be world readable, closes: #291226. 
     222      - Plugin linux/if_ is now run as root in order to probe the speed of the 
     223        network interface. 
     224 
     225  * debian/munin.postinst, debian/munin-node.postinst, debian/munin.postrm, 
     226    debian/munin-node.postrm: 
     227      - Use dpkg-statoverride to handle the permissions on the data and log 
     228        directories. 
     229 
     230  * server/munin-limits.in: 
     231      - Change lock file directory to match that of munin-update, munin-graph, 
     232        and munin-html (grabbed from upstream CVS). 
     233      - Fix a string comparsions where the "==" operator was used instead of 
     234        "eq" (grabbed from upstream CVS). 
     235 
     236  * debian/munin.postinst: 
     237      - Only change user and group ownership on the data files from "lrrd" to 
     238        "munin" when the package is first installed, not on every upgrade. 
     239 
     240 -- Tore Anderson <tore@debian.org>  Mon, 21 Feb 2005 00:16:25 +0100 
     241 
     242munin (1.0.5-1) unstable; urgency=low 
     243 
     244  * New upstream release: 
     245      - Expands @@ macros in man pages, closes: #286399. 
     246      - Fixes bug in munin-run %ENV untainting, closes: #285173. 
     247      - Fixes template variable escaping and other XHTML errors, closes: #287435 
     248        (based on patch by Tommi Virtanen <tv@debian.org>). 
     249      - hddtemp plugin calls hddtemp -n to avoid having to parse its output, 
     250        closes: #282021. 
     251  * Add Suggests: for programs and perl modules needed by plugins but not 
     252    the services they monitor, closes: #272148, #270090. 
     253 
     254 -- Dagfinn Ilmari Mannsaker <ilmari@ilmari.org>  Wed,  5 Jan 2005 23:47:16 +0100 
     255 
     256munin (1.0.4-1) unstable; urgency=low 
     257 
     258  * New upstream release. 
     259 
     260 -- Tore Anderson <tore@debian.org>  Sun,  5 Dec 2004 16:54:19 +0100 
     261 
     262munin (1.0.3-1) unstable; urgency=low 
     263 
     264  * New upstream release: 
     265      - Fixes typo in linux/fw_forwarded_local, closes: #275535. 
     266      - Fixes typo in linux/fw_packets, closes: #275537. 
     267      - Plugin generic/acpi now autodetects correctly even if the acpi version 
     268        does not contain the acpi_available program, closes: #275538. 
     269 
     270  * debian/plugins.conf: 
     271      - Run the spamstats plugin with the group adm, closes: #278765. 
     272      - Sorted the entries alphabetically. 
     273 
     274 -- Tore Anderson <tore@debian.org>  Mon,  1 Nov 2004 21:56:41 +0100 
     275 
     276munin (1.0.2-1) unstable; urgency=low 
     277 
     278  * New upstream release, fixing the follwing: 
     279    - munin-graph spews uninitialized value in concatenation [precedence 
     280      error], thanks to Don Armstrong (Closes: #267185). 
     281  * Run the hddtemp plugins as root, write access to the device isn't 
     282    enough. 
     283 
     284 -- Dagfinn Ilmari Mannsaker <ilmari@ilmari.org>  Wed,  1 Sep 2004 09:32:42 +0200 
     285 
     286munin (1.0.1-1) unstable; urgency=low 
     287 
     288  * New upstream release, fixing the following: 
     289    - [munin-graph/1.0] multiple .negative options is broken, 
     290      thanks to Andre TOmt (Closes: #250982). 
     291    - [plugin:hddtemp2/1.0] Must run under "C" locale (Closes: #253497). 
     292    - munin-node: LANG-dependant behaviour changes (Closes: #255312). 
     293    - [plugin:sensors_temp/1.0] Omits temperature values without 
     294      max and/or hysteresis value(s), thanks to Elmar Hoffmann 
     295      (Closes: #256380). 
     296    - [plugin:sensors_volt/1.0] Omits negative voltages, thanks to Elmar 
     297      Hoffmann (Closes: #256734). 
     298    - [plugin:ipac_ng/1.0] Syntax error, thanks to Stefani 
     299      Banerian (Closes: #264714). 
     300    - [plugin:hddtemp2/1.0] Ignores env.ignore (it's not supposed 
     301      to, really! :), thanks to Michel Meyers (Closes: #265022). 
     302    - munin-node: plugin iostat_ios has improper magic file 
     303      marker, thanks to Micah Anderson (Closes: #262708). 
     304  * Set Maintainer: to the Munin team address. 
     305  * Add Tore Anderson and myself to Uploaders: 
     306  * Make the hddtemp plugins run as group "disk" to ensure access to the 
     307    disks. 
     308 
     309 -- Dagfinn Ilmari Mannsaker <ilmari@ilmari.org>  Wed, 18 Aug 2004 20:55:27 +0200 
     310 
     311munin (1.0.0-1) unstable; urgency=low 
     312 
     313  * New upstream release. 
     314 
     315 -- Tore Anderson <tore@debian.org>  Sun, 18 Jul 2004 13:19:31 +0200 
     316 
    1317munin (0+1.0.0pre5-1) unstable; urgency=low 
    2318 
  • people/ilmari/modularisation-branch/dists/debian/control

    r864 r1012  
    22Section: net 
    33Priority: optional 
    4 Maintainer: Tore Anderson <tore@debian.org> 
     4Maintainer: Munin Debian Maintainers <munin-deb-maint@linpro.no> 
     5Uploaders: Tore Anderson <tore@debian.org>, Dagfinn Ilmari Mannsaker <ilmari@ilmari.org> 
    56Build-Depends-Indep: debhelper (>> 4.0.0), perl, htmldoc, html2text 
    6 Standards-Version: 3.6.1.0 
     7Standards-Version: 3.6.2.1 
    78 
    89Package: munin-node 
    910Architecture: all 
    10 Depends: ${perl:Depends}, libnet-server-perl, procps 
    11 Suggests: munin 
    12 Conflicts: lrrd-client (<= 0.9.9r5-1) 
    13 Description: Network-wide graphing framework (node) 
     11Depends: ${perl:Depends}, libnet-server-perl, procps, adduser, lsb-base 
     12Recommends: libnet-snmp-perl 
     13Suggests: munin, libwww-perl, libnet-irc-perl, mysql-client, smartmontools, acpi | lm-sensors, python (>= 2.2), ethtool 
     14Description: network-wide graphing framework (node) 
    1415 Munin is a highly flexible and powerful solution used to create graphs of 
    1516 virtually everything imaginable throughout your network, while still 
    1617 maintaining a rattling ease of installation and configuration. 
    1718 . 
    18  This package contains node software. You should install it on all the nodes 
    19  in your network. It will know how to extract all sorts of data from the 
    20  node it runs on, and will wait for the gatherer to request this data for 
    21  further processing. 
     19 This package contains the daemon for the nodes being monitored.  You should 
     20 install it on all the nodes in your network. It will know how to extract all 
     21 sorts of data from the node it runs on, and will wait for the gatherer to 
     22 request this data for further processing. 
    2223 . 
    23  It includes a range of plugins capable of extracting common values such as 
    24  cpu usage, network usage, load average, and so on. Creating your own plugins 
    25  which are capable of extracting other system-specific values is very easy, 
    26  and is often done in a matter of minutes. You can also create plugins which 
    27  relay information from other devices in your network that can't run Munin, 
    28  such as a switch or a server running another operating system, by using 
    29  SNMP or similar technology. 
     24 It includes a range of plugins capable of extracting common values such as cpu 
     25 usage, network usage, load average, and so on. Creating your own plugins which 
     26 are capable of extracting other system-specific values is very easy, and is 
     27 often done in a matter of minutes. You can also create plugins which relay 
     28 information from other devices in your network that can't run Munin, such as a 
     29 switch or a server running another operating system, by using SNMP or similar 
     30 technology. 
    3031 . 
    3132 Munin is written in Perl, and relies heavily on Tobi Oetiker's excellent 
     
    3536Package: munin 
    3637Architecture: all 
    37 Depends: ${perl:Depends}, librrds-perl, libhtml-template-perl, libdigest-md5-perl, libtime-hires-perl, libstorable-perl 
    38 Recommends: munin-node 
    39 Suggests: rrdtool, www-browser, httpd 
    40 Conflicts: lrrd-server (<= 0.9.9r5-1) 
    41 Description: Network-wide graphing framework (grapher/gatherer) 
     38Depends: ${perl:Depends}, perl-modules (>= 5.8.0) | libparse-recdescent-perl, librrds-perl, libhtml-template-perl, libdigest-md5-perl, libtime-hires-perl, libstorable-perl, rrdtool, adduser 
     39Recommends: munin-node, libdate-manip-perl 
     40Suggests: www-browser, httpd 
     41Description: network-wide graphing framework (grapher/gatherer) 
    4242 Munin is a highly flexible and powerful solution used to create graphs of 
    4343 virtually everything imaginable throughout your network, while still 
     
    5151 It is also able to alert you if any value is outside of a preset boundary, 
    5252 useful if you want to be alerted if a filesystem is about to grow full, for 
    53  instance. Currently you can only do this by letting Munin send messages to 
    54  a Nagios server
     53 instance. You can do this by making Munin run an arbitrary command when you 
     54 need to be alert it, or make use of the intrinsic Nagios support
    5555 . 
    5656 Munin is written in Perl, and relies heavily on Tobi Oetiker's excellent 
  • people/ilmari/modularisation-branch/dists/debian/munin-node.cron.d

    r864 r1012  
    99# happen), but ensure that there will never be more than two hour (7200 
    1010# seconds) interval between updates.. 
    11 */5 * * * *     root [ -x /etc/munin/plugins/apt ] && /etc/munin/plugins/apt update 7200 12 >/dev/null 
    12 */5 * * * * root [ -x /etc/munin/plugins/apt_all ] && /etc/munin/plugins/apt_all update 7200 12 >/dev/null 2>&1 
     11*/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 
    1312 
  • people/ilmari/modularisation-branch/dists/debian/munin-node.init

    r864 r1012  
    1 #! /bin/sh 
     1#! /bin/bash 
    22 
    33PATH=/sbin:/bin:/usr/sbin:/usr/bin 
    44DAEMON=/usr/sbin/munin-node 
    5 NAME=munin-node 
    65PIDFILE=/var/run/munin/munin-node.pid 
     6CONFFILE=/etc/munin/munin-node.conf 
    77 
    8 test -f $DAEMON || exit 0 
     8# log_daemon_msg() and log_progress_msg() isn't present in present in Sarge. 
     9# Below is a copy of them from lsb-base 3.0-5, for the convenience of back- 
     10# porters.  If the installed version of lsb-base provides these functions, 
     11# they will be used instead. 
    912 
    10 set -e 
     13log_daemon_msg () { 
     14    if [ -z "$1" ]; then 
     15        return 1 
     16    fi 
    1117 
    12 is_running() { 
    13         if [ -e $PIDFILE ]; then 
    14                 if kill -0 $(cat $PIDFILE) &>/dev/null; then 
    15                         return 0 
    16                 fi 
    17         elif pgrep -f "^$DAEMON\$" >/dev/null; then 
    18                 return 0 
     18    if [ -z "$2" ]; then 
     19        echo -n "$1:" 
     20        return 
     21    fi 
     22     
     23    echo -n "$1: $2" 
     24
     25 
     26log_progress_msg () { 
     27    if [ -z "$1" ]; then 
     28        return 1 
     29    fi 
     30    echo -n " $@" 
     31
     32 
     33. /lib/lsb/init-functions 
     34 
     35if [ ! -x $DAEMON ]; then 
     36        log_failure_msg "Munin-Node appears to be uninstalled." 
     37        exit 5 
     38elif [ ! -e $CONFFILE ]; then 
     39        log_failure_msg "Munin-Node appears to be unconfigured." 
     40        exit 6 
     41fi 
     42 
     43# Figure out if the pid file is in a non-standard location 
     44while read line; do 
     45        line=${line%%\#*} # get rid of comments 
     46        set -f 
     47        line=$(echo $line) # get rid of extraneous blanks 
     48        set +f 
     49        if [ "$line" != "${line#pid_file }" ]; then 
     50                PIDFILE=${line#pid_file } 
    1951        fi 
    20         return 1 
     52done < $CONFFILE 
     53 
     54verify_superuser() { 
     55        action=$1 
     56        # dash/ash do not provide $EUID, set it explicitly if not 
     57        # I can't find any way of avoiding a fork in these 
     58        # shells - drop me an email if you've got any suggestions 
     59        [ -z "$EUID" ] && EUID=$(id -u) 
     60        [ $EUID -eq 0 ] && return 
     61        log_failure_msg "Superuser privileges required for the" \ 
     62                        "\"$action\" action." 
     63        exit 4 
     64
     65 
     66start() { 
     67        log_daemon_msg "Starting Munin-Node" 
     68        if pidofproc -p $PIDFILE $DAEMON >/dev/null; then 
     69                log_progress_msg "started beforehand" 
     70                log_end_msg 0 
     71                exit 0 
     72        fi 
     73        start_daemon -p $PIDFILE $DAEMON 
     74        ret=$? 
     75        # start_daemon() isn't thorough enough, ensure the daemon has been 
     76        # started manually 
     77        attempts=0 
     78        until pidofproc -p $PIDFILE $DAEMON >/dev/null; do 
     79                attempts=$(( $attempts + 1 )) 
     80                sleep 0.05 
     81                [ $attempts -lt 20 ] && continue 
     82                log_end_msg 1 
     83                return 1 
     84        done 
     85        [ $ret -eq 0 ] && log_progress_msg "done" 
     86        log_end_msg $ret 
     87        return $ret 
    2188} 
    2289 
    2390stop() { 
    24         echo -n "Stopping munin-node: " 
    25         if ! is_running; then 
    26                 echo "not running." 
    27                 return 0 
    28         fi 
    29         start-stop-daemon --stop --oknodo --pidfile $PIDFILE 
    30         sleep 1 
    31         if is_running; then 
    32                 echo -n "waiting.." 
    33                 if ! (sleep 2; is_running); then 
    34                         echo "done." 
     91        log_daemon_msg "Stopping Munin-Node" 
     92        # killproc() doesn't try hard enough if the pid file is missing, 
     93        # so create it is gone and the daemon is still running 
     94        if [ ! -r $PIDFILE ]; then 
     95                pid=$(pidofproc -p $PIDFILE $DAEMON) 
     96                if [ -z "$pid" ]; then 
     97                        log_progress_msg "stopped beforehand" 
     98                        log_end_msg 0 
    3599                        return 0 
    36100                fi 
    37                 echo -n "failed, trying with signals.." 
    38                 pkill -15 -f "^$DAEMON\$" 
    39                 echo -n "SIGTERM.." 
    40                 sleep 1 
    41                 if ! is_running; then 
    42                         echo "done." 
    43                         return 0 
     101                echo $pid 2>/dev/null > $PIDFILE 
     102                if [ $? -ne 0 ]; then 
     103                        log_end_msg 1 
     104                        return 1 
    44105                fi 
    45                 WAIT=5 
    46                 echo -n "SIGKILL.." 
    47                 pkill -9 -f "^$DAEMON\$" 
    48                 while [ $WAIT -ge 0 ] && sleep 1; do 
    49                         if ! is_running; then 
    50                                 echo "done." 
    51                                 return 0 
    52                         fi 
    53                         WAIT=$(( WAIT - 1 )) 
    54                         echo -n "." 
    55                 done 
    56                 echo "FAILED!" 
    57                 exit 1 
    58106        fi 
    59         echo "done." 
     107        # This may look strange, but because start-stop-daemon looks at 
     108        # /proc/pid/exe I need to specify /usr/bin/perl as the "daemon" 
     109        killproc -p $PIDFILE /usr/bin/perl 
     110        ret=$? 
     111        # killproc() isn't thorough enough, ensure the daemon has been 
     112        # stopped manually 
     113        attempts=0 
     114        until ! pidofproc -p $PIDFILE $DAEMON >/dev/null; do 
     115                attempts=$(( $attempts + 1 )) 
     116                sleep 0.05 
     117                [ $attempts -lt 20 ] && continue 
     118                log_end_msg 1 
     119                return 1 
     120        done 
     121        [ $ret -eq 0 ] && log_progress_msg "done" 
     122        log_end_msg $ret 
     123        return $ret 
    60124} 
    61125 
    62 start() { 
    63         echo -n "Starting munin-node: " 
    64         if is_running; then 
    65                 echo "already running." 
    66                 exit 0 
    67         fi 
    68         start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON 
    69         if is_running; then 
    70                 echo "done." 
    71                 return 0 
    72         fi 
    73         if ! (sleep 2; is_running); then 
    74                 echo "FAILED!" 
    75                 exit 1 
    76         fi 
    77 
    78          
     126if [ "$#" -ne 1 ]; then 
     127        log_failure_msg "Usage: /etc/init.d/munin-node" \ 
     128                        "{start|stop|restart|force-reload|try-restart}" 
     129        exit 2 
     130fi 
     131 
    79132case "$1" in 
    80133  start) 
     134        verify_superuser $1 
    81135        start 
     136        exit $? 
    82137        ;; 
    83138  stop) 
     139        verify_superuser $1 
    84140        stop 
     141        exit $? 
    85142        ;; 
    86143  restart|force-reload) 
    87         stop 
     144        verify_superuser $1 
     145        stop || exit $? 
    88146        start 
     147        exit $? 
    89148        ;; 
     149  try-restart) 
     150        verify_superuser $1 
     151        pidofproc -p $PIDFILE $DAEMON >/dev/null 
     152        if [ $? -eq 0 ]; then 
     153                stop || exit $? 
     154                start 
     155                exit $? 
     156        fi 
     157        log_success_msg "Munin-Node was stopped beforehand and thus not" \ 
     158                        "restarted." 
     159        exit 0 
     160        ;; 
     161  reload) 
     162        log_failure_msg "The \"reload\" action is not implemented." 
     163        exit 3 
     164        ;; 
     165  status) 
     166        pid=$(pidofproc -p $PIDFILE $DAEMON) 
     167        ret=$? 
     168        pid=${pid% } # pidofproc() supplies a trailing space, strip it 
     169        if [ $ret -eq 0 ]; then 
     170                log_success_msg "Munin-Node is running (PID: $pid)" 
     171                exit 0 
     172        # the LSB specifies that I in this case (daemon dead + pid file exist) 
     173        # should return 1, so why init-functions use 2 I don't know.  whatever. 
     174        elif [ $ret -eq 2 ]; then 
     175                log_failure_msg "Munin-Node is dead, although $PIDFILE exists." 
     176                exit 1 
     177        elif [ $ret -eq 3 ]; then 
     178                log_warning_msg "Munin-Node is not running." 
     179                exit 3 
     180        fi 
     181        log_warning_msg "Munin-Node status unknown." 
     182        exit 4 
     183        ;; 
    90184  *) 
    91         N=/etc/init.d/$NAME 
    92         echo "Usage: $N {start|stop|restart|force-reload}" >&2 
    93         exit 1 
     185        log_failure_msg "Usage: /etc/init.d/munin-node" \ 
     186                       "{start|stop|restart|force-reload|try-restart}" 
     187        exit 2 
    94188        ;; 
    95189esac 
    96190 
    97 exit 0 
     191log_failure_msg "Unexpected failure, please file a bug." 
     192exit 1 
  • people/ilmari/modularisation-branch/dists/debian/munin-node.manpages

    r864 r1012  
    22build/doc/munin-node.8 
    33build/doc/munin-node-configure.8 
     4build/doc/munin-node-configure-snmp.8 
    45build/doc/munin-run.8 
  • people/ilmari/modularisation-branch/dists/debian/munin-node.postinst

    r864 r1012  
    1212 
    1313fixperms() { 
    14         chown munin:adm /var/log/munin 
    15         chmod 0750 /var/log/munin 
    16  
    17         chown munin:root /var/run/munin 
    18         chmod 0755 /var/run/munin 
    19  
    20         chown munin:munin /var/lib/munin 
    21         chmod 0755 /var/lib/munin 
    22  
    23         chown munin:munin /var/lib/munin/plugin-state 
    24         chmod 0775 /var/lib/munin/plugin-state 
     14        dpkg-statoverride --list /var/log/munin >/dev/null || \ 
     15                dpkg-statoverride --update --add munin adm 0750 /var/log/munin 
     16        dpkg-statoverride --list /var/run/munin >/dev/null || \ 
     17                dpkg-statoverride --update --add munin root 0755 /var/run/munin 
     18        dpkg-statoverride --list /var/lib/munin >/dev/null || \ 
     19                dpkg-statoverride --update --add munin munin 0755 /var/lib/munin 
     20        dpkg-statoverride --list /var/lib/munin/plugin-state >/dev/null || \ 
     21                dpkg-statoverride --update --add munin munin 0775 /var/lib/munin/plugin-state 
    2522} 
    2623 
  • people/ilmari/modularisation-branch/dists/debian/munin-node.postrm

    r864 r1012  
    2222        rm -f /var/log/munin/munin-node.log* 
    2323 
     24        dpkg-statoverride --remove /var/lib/munin/plugin-state 
     25 
     26        # These are shared with munin, so only remove them if munin 
     27        # isn't installed (or already purged). 
     28        status=$(dpkg --get-selections munin) 
     29        if [ -z "$status" ] || [ "${status%purge}" != "$status" ]; then 
     30                dpkg-statoverride --remove /var/log/munin 
     31                dpkg-statoverride --remove /var/run/munin 
     32                dpkg-statoverride --remove /var/lib/munin 
     33        fi 
     34         
    2435        delete_dir_if_empty /var/lib/munin/plugin-state 
    2536        delete_dir_if_empty /var/lib/munin 
  • people/ilmari/modularisation-branch/dists/debian/munin.cron.d

    r864 r1012  
    66 
    77*/5 * * * *     munin if [ -x /usr/bin/munin-cron ]; then /usr/bin/munin-cron; fi 
    8 10 10 * * *     munin if [ -x /usr/share/munin/munin-nagios ]; then /usr/share/munin/munin-nagios --removeok; fi 
     810 10 * * *     munin if [ -x /usr/share/munin/munin-limits ]; then /usr/share/munin/munin-limits --force --contact nagios --contact old-nagios; fi 
  • people/ilmari/modularisation-branch/dists/debian/munin.docs

    r864 r1012  
    11build/doc/munin-faq.* 
    22build/doc/munin-doc.* 
     3build/README-apache-cgi 
  • people/ilmari/modularisation-branch/dists/debian/munin.logrotate

    r864 r1012  
    2626} 
    2727 
    28 /var/log/munin/munin-nagios.log { 
     28/var/log/munin/munin-limits.log { 
    2929        daily 
    3030        missingok 
  • people/ilmari/modularisation-branch/dists/debian/munin.manpages

    r864 r1012  
    22build/doc/munin-graph.8 
    33build/doc/munin-html.8 
    4 build/doc/munin-nagios.8 
     4build/doc/munin-limits.8 
    55build/doc/munin-update.8 
    66build/doc/munin.conf.5 
  • people/ilmari/modularisation-branch/dists/debian/munin.postinst

    r864 r1012  
    22 
    33set -e 
     4 
     5prevver="$2" 
    46 
    57add_munin_system_user() { 
     
    1113 
    1214fixperms() { 
    13         chown munin:adm /var/log/munin 
    14         chmod 0750 /var/log/munin 
    15  
    16         chown munin:root /var/run/munin 
    17         chmod 0755 /var/run/munin 
    18  
    19         chown munin:munin /var/www/munin 
    20         chmod 0755 /var/www/munin 
    21  
    22         chown munin:munin /var/lib/munin 
    23         chmod 0755 /var/lib/munin 
    24  
    25         # Upgrading from LRRD, yes? 
    26         # This'll generate a lot of chmod/grp's on 
    27         # the dirs, but what the hell.. 
    28         if getent passwd lrrd >/dev/null; then 
    29                 for f in $(find /var/lib/munin -user lrrd); do 
    30                         chown munin $f ${f%/*} 
    31                 done 
    32         fi 
    33         if getent group lrrd >/dev/null; then 
    34                 for f in $(find /var/lib/munin -group lrrd); do 
    35                         chgrp munin $f ${f%/*} 
    36                 done 
    37         fi 
     15        dpkg-statoverride --list /var/log/munin >/dev/null || \ 
     16                dpkg-statoverride --update --add munin adm 0750 /var/log/munin 
     17        dpkg-statoverride --list /var/run/munin >/dev/null || \ 
     18                dpkg-statoverride --update --add munin root 0755 /var/run/munin 
     19        dpkg-statoverride --list /var/www/munin >/dev/null || \ 
     20                dpkg-statoverride --update --add munin munin 0755 /var/www/munin 
     21        dpkg-statoverride --list /var/lib/munin >/dev/null || \ 
     22                dpkg-statoverride --update --add munin munin 0755 /var/lib/munin 
    3823} 
    3924 
  • people/ilmari/modularisation-branch/dists/debian/munin.postrm

    r864 r1012  
    1616 
    1717        rm -f /var/lib/munin/datafile 
     18        rm -f /var/lib/munin/limits 
    1819        rm -f /var/lib/munin/*.stats 
    1920        rm -f /var/lib/munin/*/*.ok 
     
    2324        rm -f /var/log/munin/munin-graph.log* 
    2425        rm -f /var/log/munin/munin-html.log* 
    25         rm -f /var/log/munin/munin-nagios.log* 
     26        rm -f /var/log/munin/munin-limits.log* 
     27 
     28        dpkg-statoverride --remove /var/www/munin 
     29 
     30        # These are shared with munin-node, so only remove them if munin-node 
     31        # isn't installed (or already purged). 
     32        status=$(dpkg --get-selections munin-node) 
     33        if [ -z "$status" ] || [ "${status%purge}" != "$status" ]; then 
     34                dpkg-statoverride --remove /var/log/munin 
     35                dpkg-statoverride --remove /var/run/munin 
     36                dpkg-statoverride --remove /var/lib/munin 
     37        fi 
    2638         
    2739        delete_dir_if_empty /var/www/munin 
  • people/ilmari/modularisation-branch/dists/debian/plugins.conf

    r864 r1012  
    99#                       care about. 
    1010 
     11[apt] 
     12user root 
     13 
     14[courier_mta_mailqueue] 
     15group daemon 
     16 
     17[courier_mta_mailstats] 
     18group adm 
     19 
     20[courier_mta_mailvolume] 
     21group adm 
     22 
     23[cps*] 
     24user root 
     25 
     26[exim_mailqueue] 
     27group mail, (Debian-exim) 
     28 
     29[exim_mailstats] 
     30group mail, adm 
     31 
     32[fw_conntrack] 
     33user root 
     34 
     35[hddtemp_smartctl] 
     36user root 
     37 
     38[if_*] 
     39user root 
     40 
     41[if_err_*] 
     42user nobody 
     43 
    1144[mysql*] 
    1245user root 
    1346env.mysqlopts --defaults-extra-file=/etc/mysql/debian.cnf 
    1447 
    15 [exim_mailstats
    16 group mail, adm 
     48[postfix_mailqueue
     49user (postfix) 
    1750 
    18 [exim_mailqueue
    19 group mail, (Debian-exim) 
     51[postfix_mailstats
     52group adm 
    2053 
    21 [cps*
    22 user root 
     54[postfix_mailvolume
     55group adm 
    2356 
    24 [apt
     57[smart_*
    2558user root 
    2659 
  • people/ilmari/modularisation-branch/dists/debian/rules

    r864 r1012  
    33export DH_VERBOSE= 
    44 
    5 MAKEOPTS = CONFIG=debian/Makefile.config 
     5MAKEOPTS = CONFIG=debian/Makefile.config INSTALL_PLUGINS="auto manual snmpauto" 
    66 
    77build: build-stamp 
     
    4040        dh_installchangelogs ChangeLog 
    4141        dh_installman 
    42         dh_installinit 
     42        dh_installinit -- "defaults 98 20" 
    4343        dh_installcron 
    4444        dh_installlogrotate 
  • people/ilmari/modularisation-branch/dists/freebsd/munin-main/Makefile

    r864 r1012  
    33# Whom:                                 Lupe Christoph <lupe@lupe-christoph.de> 
    44# 
    5 # $FreeBSD: ports/sysutils/munin-main/Makefile,v 1.6 2004/11/16 13:39:54 vs Exp $ 
     5# $FreeBSD: ports/sysutils/munin-main/Makefile,v 1.7 2004/12/14 01:43:10 sem Exp $ 
    66# 
    77 
    88PORTNAME=       munin 
    9 PORTVERSION=    1.1.7 
     9PORTVERSION=    1.2.2 
    1010CATEGORIES=     sysutils perl5 
    1111MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE} 
    1212MASTER_SITE_SUBDIR=     munin 
    1313PKGNAMESUFFIX=  -main 
    14 DISTNAME=       ${PORTNAME}_${PORTVERSION:S/.p/pre/} 
     14DISTNAME=       ${PORTNAME}_${PORTVERSION:S/.r/rc/} 
    1515 
    1616MAINTAINER=     lupe@lupe-christoph.de 
     
    3434USE_GMAKE=      yes 
    3535PATCH_STRIP=    -p1 
    36 WRKSRC=         ${WRKDIR}/${PORTNAME}-${PORTVERSION:S/.p/pre/} 
     36WRKSRC=         ${WRKDIR}/${PORTNAME}-${PORTVERSION:S/.r/rc/} 
    3737PKGMESSAGE=     ${WRKDIR}/pkg-message 
    3838ALL_TARGET=     DATADIR=${DATADIR} PERL=${PERL} build build-man 
     
    4242MAN8=           munin-cron.8 munin-graph.8 munin-html.8 munin-limits.8 munin-update.8 
    4343 
     44SUB_FILES=pkg-message 
     45 
    4446pre-install: 
    45         @${SED} 's@%%PREFIX%%@${PREFIX}@g' ${FILESDIR}/pkg-message > ${PKGMESSAGE} 
    4647        @PKG_PREFIX=${PREFIX} ${SH} pkg-install ${PKGNAME} PRE-INSTALL 
    47         @mkdir -p ${PREFIX}/www/cgi-bin 
    4848 
    4949post-install: 
     
    5656        done 
    5757        @DATADIR=${DATADIR} PKG_PREFIX=${PREFIX} ${SH} pkg-install ${PKGNAME} POST-INSTALL 
     58        @${CHOWN} munin /var/log/munin-main 
     59        @${CHGRP} munin /var/run/munin /var/log/munin-main ${PREFIX}/www/data/munin ${PREFIX}/var/munin 
    5860        @${CAT} ${PKGMESSAGE} 
    5961 
  • people/ilmari/modularisation-branch/dists/freebsd/munin-main/distinfo

    r864 r1012  
    1 MD5 (munin_1.1.7.tar.gz) = b9dbe4da7ed0e7613e896b51a22b7933 
    2 SIZE (munin_1.1.7.tar.gz) = 288368 
     1MD5 (munin_1.2.2.tar.gz) = e55ff3cc8d506558f32598f639952cca 
     2SIZE (munin_1.2.2.tar.gz) = 325356 
  • people/ilmari/modularisation-branch/dists/freebsd/munin-main/pkg-deinstall

    r864 r1012  
    11#! /bin/sh 
    2 # 
    3 # $Log$ 
    4 # Revision 1.5  2004/11/28 12:50:41  lupe 
    5 # Update to 1.1.7. 
    6 # Put distributed config in *.sample. 
    7 # Remove unchanged configs on deinstall. 
    8 # Add FreeBSD-specific plugins.conf. 
    9 # Move munin-main logfiles to /var/log/munin-main. 
    10 # Update /etc/newsyslog.conf to automatically rotate logfiles. 
    11 # Pass system-wide Perl path to Munin Makefile. 
    12 # Patch default path for Python. 
    13 # Patch ping_ to get it to work on FreeBSD. 
    14 # Patch sendmail_mailtraffic to get it to autoconfigure. 
    15 # 
    16 # 
    172 
    183ask() { 
  • people/ilmari/modularisation-branch/dists/freebsd/munin-main/pkg-install

    r864 r1012  
    11#! /bin/sh 
    2 # 
    3 # $Log$ 
    4 # Revision 1.6  2004/11/28 12:50:41  lupe 
    5 # Update to 1.1.7. 
    6 # Put distributed config in *.sample. 
    7 # Remove unchanged configs on deinstall. 
    8 # Add FreeBSD-specific plugins.conf. 
    9 # Move munin-main logfiles to /var/log/munin-main. 
    10 # Update /etc/newsyslog.conf to automatically rotate logfiles. 
    11 # Pass system-wide Perl path to Munin Makefile. 
    12 # Patch default path for Python. 
    13 # Patch ping_ to get it to work on FreeBSD. 
    14 # Patch sendmail_mailtraffic to get it to autoconfigure. 
    15 # 
    16 # 
    172 
    183ask() { 
     
    8469} 
    8570 
    86 make_directories() { 
    87         for dir in ${PKG_PREFIX}/www/data/munin \ 
    88                    ${PKG_PREFIX}/var/munin \ 
    89                    /var/run/munin /var/log/munin-main; do 
    90                 mkdir -p $dir 
    91                 chown munin:munin $dir 
    92         done 
    93 } 
    94  
    9571create_crontab_entries() { 
    9672    local b e 
     
    128104    PRE-INSTALL) 
    129105        make_account munin munin "Munin owner" 
    130         make_directories 
    131106        ;;       
    132107    POST-INSTALL) 
  • people/ilmari/modularisation-branch/dists/freebsd/munin-main/pkg-plist

    r864 r1012  
     1@exec mkdir -p /var/run/munin && chown munin:munin /var/run/munin 
     2@exec mkdir -p /var/log/munin-main && chown munin:munin /var/log/munin-main 
     3@exec mkdir -p %D/www/data/munin && chown munin:munin %D/www/data/munin 
     4@exec mkdir -p %D/var/munin && chown munin:munin %D/var/munin 
    15bin/munin-cron 
    26@unexec if cmp -s %D/etc/munin/templates/style.css %D/www/data/munin/style.css; then rm -f %D/www/data/munin/style.css; fi 
     
    1519etc/munin/templates/munin-serviceview.tmpl 
    1620etc/munin/templates/style.css 
    17 @comment PREFIX trouble when testing 
    18 @unexec rm -f `perl -V:sitelib | cut -d= -f2 | sed "s/[\';]//g"`/Munin.pm 
     21%%SITE_PERL%%/Munin.pm 
    1922share/munin/munin-graph 
    2023share/munin/munin-html 
     
    2427@unexec rm -f /var/run/munin/munin-*.lock 
    2528@unexec rmdir /var/run/munin 2>/dev/null || true 
     29@unexec rmdir /var/log/munin-main 2>/dev/null || true 
    2630@unexec rmdir %D/www/data/munin 2>/dev/null || true 
    2731@unexec rmdir %D/www/data 2>/dev/null || true 
     
    3539@unexec echo "If you want to *completely* remove munin-main, you have to" 
    3640@unexec echo 
    37 @unexec echo "    rm -rf %D/www/data/munin \\" 
    38 @unexec ls -d /usr/local/var/munin/* | grep -v plugin-state | fmt -40 | sed -e 's/^/           /' -e 's/$/ \\/' 
     41@unexec if [ -d %D/www/data/munin ]; then echo "    rm -rf %D/www/data/munin \\"; fi 
     42@unexec if [ -d %D/var/munin ]; then ls -d %D/var/munin/* | grep -v plugin-state | fmt -40 | sed -e 's/^/           /' -e 's/$/ \\/'; fi 
    3943@unexec if [ -f %D/etc/munin/munin.conf ]; then echo "           %D/etc/munin/munin.conf \\"; fi 
    4044@unexec if [ -d %D/etc/munin/templates ]; then echo "           %D/etc/munin/templates \\"; fi 
  • people/ilmari/modularisation-branch/dists/freebsd/munin-node/Makefile

    r864 r1012  
    33# Whom:                                 Lupe Christoph <lupe@lupe-christoph.de> 
    44# 
    5 # $FreeBSD: ports/sysutils/munin-node/Makefile,v 1.10 2004/11/16 15:16:37 leeym Exp $ 
     5# $FreeBSD: ports/sysutils/munin-node/Makefile,v 1.12 2004/12/14 01:43:10 sem Exp $ 
    66# 
    77 
    88PORTNAME=       munin 
    9 PORTVERSION=    1.1.7 
     9PORTVERSION=    1.2.2 
    1010CATEGORIES=     sysutils perl5 
    1111MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE} 
    1212MASTER_SITE_SUBDIR=     munin 
    1313PKGNAMESUFFIX=  -node 
    14 DISTNAME=       ${PORTNAME}_${PORTVERSION:S/.p/pre/} 
     14DISTNAME=       ${PORTNAME}_${PORTVERSION:S/.r/rc/} 
    1515 
    1616MAINTAINER=     lupe@lupe-christoph.de 
     
    2222.include <bsd.port.pre.mk> 
    2323 
     24.if ${OSVERSION} < 500000 
     25RUN_DEPENDS=    ${LOCALBASE}/etc/rc.subr:${PORTSDIR}/sysutils/rc_subr 
     26.endif 
     27 
    2428.if ${PERL_LEVEL} < 500800 
    2529RUN_DEPENDS+=   ${SITE_PERL}/Net/Domain.pm:${PORTSDIR}/net/p5-Net 
     
    2832USE_GMAKE=      yes 
    2933PATCH_STRIP=    -p1 
    30 WRKSRC=         ${WRKDIR}/${PORTNAME}-${PORTVERSION:S/.p/pre/} 
     34WRKSRC=         ${WRKDIR}/${PORTNAME}-${PORTVERSION:S/.r/rc/} 
    3135PKGMESSAGE=     ${WRKDIR}/pkg-message 
    3236ALL_TARGET=     DATADIR=${DATADIR} PERL=${PERL} build build-man 
    33 INSTALL_TARGET= DATADIR=${DATADIR} PERL=${PERL} install-node install-node-plugins 
     37INSTALL_TARGET= DATADIR=${DATADIR} PERL=${PERL} INSTALL_PLUGINS="auto manual snmpauto" install-node install-node-plugins 
    3438MAKE_ENV=       LANG=C 
    3539 
     
    3741MAN8=           munin-node-configure.8 munin-node.8 munin-run.8 
    3842 
    39 .if ${OSVERSION} < 500000 
    40 PKGMSG=${FILESDIR}/pkg-message.4 
    41 STARTSTOP_SRC=${FILESDIR}/munin-node.sh 
    42 STARTSTOP_DST=${PREFIX}/etc/rc.d/munin-node.sh 
    43 .else 
    44 PKGMSG=${FILESDIR}/pkg-message 
    45 STARTSTOP_SRC=${FILESDIR}/munin_node.sh 
    46 STARTSTOP_DST=/etc/rc.d/munin_node 
    47 .endif 
     43SUB_FILES=      pkg-message munin-node.sh munin-node-revive.sh 
     44SUB_LIST=       RC_SUBR=${RC_SUBR} 
     45USE_RC_SUBR=    YES 
    4846 
    4947pre-install: 
    50         @${SED} 's@%%PREFIX%%@${PREFIX}@g' ${PKGMSG} > ${PKGMESSAGE} 
    5148        @PKG_PREFIX=${PREFIX} ${SH} pkg-install ${PKGNAME} PRE-INSTALL 
    5249 
    5350post-install: 
    54         @${SED} 's@%PREFIX%@${LOCALBASE}@g' ${STARTSTOP_SRC} > ${STARTSTOP_DST} 
    55         @${CHMOD} +x ${STARTSTOP_DST} 
    56         @${INSTALL_DATA} ${WRKSRC}/build/node/munin-node.conf ${PREFIX}/etc/munin/munin-node.conf.sample 
    57         @${INSTALL_DATA} files/plugins.conf ${PREFIX}/etc/munin/plugin-conf.d/plugins.conf.sample 
     51        ${INSTALL_SCRIPT} ${WRKDIR}/munin-node.sh ${PREFIX}/etc/rc.d/munin-node.sh 
     52.if ${PERL_LEVEL} < 500800 
     53        ${INSTALL_SCRIPT} ${WRKDIR}/munin-node-revive.sh ${PREFIX}/bin/munin-node-revive 
     54.endif 
     55        ${INSTALL_DATA} ${WRKSRC}/build/node/munin-node.conf ${PREFIX}/etc/munin/munin-node.conf.sample 
     56        ${INSTALL_DATA} files/plugins.conf ${PREFIX}/etc/munin/plugin-conf.d/plugins.conf.sample 
    5857        @if [ ! -f ${PREFIX}/etc/munin/plugin-conf.d/plugins.conf ]; then \ 
    5958                ${INSTALL_DATA} ${PREFIX}/etc/munin/plugin-conf.d/plugins.conf.sample ${PREFIX}/etc/munin/plugin-conf.d/plugins.conf; \ 
  • people/ilmari/modularisation-branch/dists/freebsd/munin-node/distinfo

    r864 r1012  
    1 MD5 (munin_1.1.7.tar.gz) = b9dbe4da7ed0e7613e896b51a22b7933 
    2 SIZE (munin_1.1.7.tar.gz) = 288368 
     1MD5 (munin_1.2.2.tar.gz) = e55ff3cc8d506558f32598f639952cca 
     2SIZE (munin_1.2.2.tar.gz) = 325356 
  • people/ilmari/modularisation-branch/dists/freebsd/munin-node/pkg-install

    r864 r1012  
    5858    fi 
    5959 
    60     mkdir -p ${PKG_PREFIX}/etc/munin/plugins ${PKG_PREFIX}/var/munin/plugin-state 
    61  
    6260    if [ -n "$prevver" ]; then 
    6361        echo -n "Initializing new plugins.." 
  • people/ilmari/modularisation-branch/dists/freebsd/munin-node/pkg-plist

    r864 r1012  
     1@exec mkdir -p %D/etc/munin/plugins 
     2@exec mkdir -p %D/etc/munin/plugin-conf.d && chmod 755 %D/etc/munin/plugin-conf.d 
     3@exec mkdir -p %D/var/munin/plugin-state && chgrp munin %D/var/munin/plugin-state && chmod 775 %D/var/munin/plugin-state 
     4@unexec rm %D/bin/munin-node-revive 2>/dev/null || true 
    15@comment etc/munin/VERSION.node must remain for upgrade version check 
    26@unexec if cmp -s %D/etc/munin/munin-node.conf %D/etc/munin/munin-node.conf.sample; then rm -f %D/etc/munin/munin-node.conf; fi 
    37etc/munin/munin-node.conf.sample 
    48@unexec if cmp -s %D/etc/munin/plugin-conf.d/plugins.conf %D/etc/munin/plugin-conf.d/plugins.conf.sample; then rm -f %D/etc/munin/plugin-conf.d/plugins.conf; fi 
    5 etc/munin/munin-node.conf.sample 
    69etc/munin/plugin-conf.d/plugins.conf.sample 
    710@unexec rm %D/etc/rc.d/munin-node.sh 2>/dev/null || true 
    8 @unexec rm /etc/rc.d/munin_node 2>/dev/null || true 
    911sbin/munin-node 
    1012sbin/munin-node-configure 
     
    1921%%DATADIR%%/plugins/apc_nis 
    2022%%DATADIR%%/plugins/bind9 
     23%%DATADIR%%/plugins/bind9_rndc 
     24%%DATADIR%%/plugins/courier_ 
    2125%%DATADIR%%/plugins/courier_mta_mailqueue 
    2226%%DATADIR%%/plugins/courier_mta_mailstats 
     
    2630%%DATADIR%%/plugins/df 
    2731%%DATADIR%%/plugins/df_inode 
     32%%DATADIR%%/plugins/dhcpd3 
    2833%%DATADIR%%/plugins/exim_mailqueue 
     34%%DATADIR%%/plugins/exim_mailqueue_alt 
    2935%%DATADIR%%/plugins/exim_mailstats 
    30 %%DATADIR%%/plugins/folding@home 
     36%%DATADIR%%/plugins/foldingathome 
     37%%DATADIR%%/plugins/foldingathome_rank 
     38%%DATADIR%%/plugins/foldingathome_wu 
    3139%%DATADIR%%/plugins/hddtemp 
    3240%%DATADIR%%/plugins/hddtemp2 
     41%%DATADIR%%/plugins/hddtemp_smartctl 
    3342%%DATADIR%%/plugins/hddtempd 
    3443%%DATADIR%%/plugins/if_ 
     
    3948%%DATADIR%%/plugins/loggrep 
    4049%%DATADIR%%/plugins/mailman 
     50%%DATADIR%%/plugins/mailscanner 
     51%%DATADIR%%/plugins/mbmon_ 
    4152%%DATADIR%%/plugins/memory 
     53%%DATADIR%%/plugins/mhttping 
    4254%%DATADIR%%/plugins/multips 
    4355%%DATADIR%%/plugins/munin_graph 
     
    5264%%DATADIR%%/plugins/ntp_ 
    5365%%DATADIR%%/plugins/ntp_states 
     66%%DATADIR%%/plugins/nut_misc 
     67%%DATADIR%%/plugins/nut_volts 
    5468%%DATADIR%%/plugins/open_files 
     69%%DATADIR%%/plugins/perdition 
    5570%%DATADIR%%/plugins/ping_ 
    5671%%DATADIR%%/plugins/plugins.history 
    57 %%DATADIR%%/plugins/pm3users 
     72%%DATADIR%%/plugins/pm3users_ 
    5873%%DATADIR%%/plugins/pop_stats 
    5974%%DATADIR%%/plugins/postfix_mailqueue 
     
    91106%%DATADIR%%/plugins/swap 
    92107%%DATADIR%%/plugins/sybase_space 
    93 %%DATADIR%%/plugins/uptime 
    94108%%DATADIR%%/plugins/vmstat 
    95109@unexec rm -f /var/run/munin/munin-node.pid 
     
    101115@unexec rmdir %D/etc/munin/plugin-conf.d 2>/dev/null || true 
    102116@unexec rmdir %D/etc/munin 2>/dev/null || true 
     117@unexec rmdir %%LOCALBASE%%/%%SITE_PERL%%/Munin/Plugin 2>/dev/null || true 
     118@unexec rmdir %%LOCALBASE%%/%%SITE_PERL%%/Munin 2>/dev/null || true 
    103119@unexec echo 
    104120@unexec echo '********************************************************************' 
    105121@unexec echo "If you want to *completely* remove munin-node, you have to" 
    106122@unexec echo 
    107 @unexec echo "    rm -rf %D/var/munin/plugin-state %D/etc/munin/VERSION.node \\" 
    108 @unexec echo "           %D/etc/munin/munin-node.conf %D/etc/munin/plugins \\" 
     123@unexec echo "    rm -rf %D/etc/munin/VERSION.node %D/etc/munin/plugins \\" 
     124@unexec if [ -d %D/var/munin/plugin-state ]; then echo "           %D/var/munin/plugin-state \\"; fi 
     125@unexec if [ -f %D/etc/munin/munin-node.conf ]; then echo "           %D/etc/munin/munin-node.conf \\"; fi 
     126@unexec if [ -d %D/var/munin/plugin-state ]; then echo "           %D/var/munin/plugin-state \\"; fi 
     127@unexec if [ -d %%LOCALBASE%%/%%SITE_PERL%%/Munin/Plugin ]; then echo "           %%LOCALBASE%%/%%SITE_PERL%%/Munin/Plugin \\"; fi 
     128@unexec if [ -d %%LOCALBASE%%/%%SITE_PERL%%/Munin ]; then echo "           %%LOCALBASE%%/%%SITE_PERL%%/Munin/Plugin \\"; fi 
    109129@unexec echo "           /var/log/munin-node.log*" 
    110130@unexec echo 
  • people/ilmari/modularisation-branch/dists/redhat/Makefile.config

    r864 r1012  
    1212STATEDIR = $(DESTDIR)/var/run/munin 
    1313PERLLIB  = $(DESTDIR)$(shell ( $(PERL) -V:vendorlib | egrep -v "UNKNOWN|=''" || $(PERL) -V:sitelib) | cut -d\' -f 2) 
     14CGIDIR   = $(DESTDIR)/var/www/html/munin/cgi 
    1415 
    1516# Handled in the munin.spec 
  • people/ilmari/modularisation-branch/dists/redhat/munin-node.rc

    r864 r1012  
    77# processname: munin-node 
    88# config: /etc/munin/munin-node.conf 
    9 # pidfile: /var/run/muin-node.pid 
     9# pidfile: /var/run/munin/munin-node.pid 
    1010 
    1111# Source function library. 
  • people/ilmari/modularisation-branch/dists/redhat/munin.spec.in

    r864 r1012  
    11Name:      munin 
    22Version:   @@VERSION@@ 
    3 Release:   2 
     3Release:   4 
     4Summary:   Network-wide graphing framework (grapher/gatherer) 
    45Copyright: GPL 
     6Group:     System Environment/Daemons 
     7URL:       http://www.linpro.no/ 
     8Packager:  Ingvar Hagelund <ingvar@linpro.no> 
     9Vendor:    Linpro AS 
     10Distribution: Linpro AS RHEL Software Archives 
     11 
    512BuildRoot: %{_tmppath}/%{name}-%{version}-root 
    6 URL:       http://www.linpro.no/ 
    713Source:    %{name}-%{version}.tar.gz 
    8 Group:     System Environment/Daemons 
    9 Summary:   Munin is the Linpro RRD data agent 
    1014BuildArchitectures: noarch 
    1115Provides: perl(RRDs) 
     
    1317Requires: perl-Net-Server 
    1418Requires: rrdtool 
     19Requires: logrotate 
    1520Obsoletes: lrrd-server 
    1621 
    1722%description 
    18 Munin, formerly known as The Linpro RRD server, queries a number of 
    19 nodes, and processes the data using RRDtool and presents it on web 
    20 pages. 
     23Munin is a highly flexible and powerful solution used to create graphs of 
     24virtually everything imaginable throughout your network, while still 
     25maintaining a rattling ease of installation and configuration. 
     26 
     27This package contains the grapher/gatherer. You will only need one instance of 
     28it in your network. It will periodically poll all the nodes in your network 
     29it's aware of for data, which it in turn will use to create graphs and HTML 
     30pages, suitable for viewing with your graphical web browser of choice. 
     31 
     32Munin is written in Perl, and relies heavily on Tobi Oetiker's excellent 
     33RRDtool. To see a real example of Munin in action, take a peek at 
     34<http://www.linpro.no/projects/munin/example/>. 
    2135 
    2236%package node 
    2337Group: System Environment/Daemons 
    24 Summary: Linpro RRD data agent 
     38Summary: Network-wide graphing framework (node) 
    2539BuildArchitectures: noarch 
    2640Requires: perl-Net-Server 
     
    3145 
    3246%description node 
    33 The Munin node package returns statistical data on the request of a 
    34 Munin server. 
     47Munin is a highly flexible and powerful solution used to create graphs of 
     48virtually everything imaginable throughout your network, while still 
     49maintaining a rattling ease of installation and configuration. 
     50 
     51This package contains node software. You should install it on all the nodes 
     52in your network. It will know how to extract all sorts of data from the 
     53node it runs on, and will wait for the gatherer to request this data for 
     54further processing. 
     55 
     56It includes a range of plugins capable of extracting common values such as 
     57cpu usage, network usage, load average, and so on. Creating your own plugins 
     58which are capable of extracting other system-specific values is very easy, 
     59and is often done in a matter of minutes. You can also create plugins which 
     60relay information from other devices in your network that can't run Munin, 
     61such as a switch or a server running another operating system, by using 
     62SNMP or similar technology. 
     63 
     64Munin is written in Perl, and relies heavily on Tobi Oetiker's excellent 
     65RRDtool. To see a real example of Munin in action, take a peek at 
     66<http://www.linpro.no/projects/munin/example/>. 
     67 
    3568 
    3669%prep 
    3770%setup -q 
     71rm -rf %{buildroot} 
    3872mkdir -p %{buildroot} 
    3973 
     
    5589        MANDIR=%{buildroot}%{_mandir} \ 
    5690        DESTDIR=%{buildroot} \ 
    57         install-node install-node-plugins install-doc install-man 
    58  
    59 mkdir -p %{buildroot}/etc/init.d 
     91        install-main install-node install-node-plugins install-doc install-man 
     92 
     93mkdir -p %{buildroot}/etc/rc.d/init.d 
    6094mkdir -p %{buildroot}/etc/munin/plugins 
    6195mkdir -p %{buildroot}/etc/munin/plugin-conf.d 
     96mkdir -p %{buildroot}/etc/logrotate.d 
    6297mkdir -p %{buildroot}/var/lib/munin 
    6398mkdir -p %{buildroot}/var/log/munin 
    6499 
    65 #install -m 0755 node/redhat/munin-node %{buildroot}/etc/init.d/ 
    66 install -m0755 dists/redhat/munin-node.rc %{buildroot}/etc/init.d/munin-node 
    67 install -m 0644 dists/tarball/plugins.conf %{buildroot}/etc/munin/ 
     100install -m0755 dists/redhat/munin-node.rc %{buildroot}/etc/rc.d/init.d/munin-node 
     101install -m0644 dists/tarball/plugins.conf %{buildroot}/etc/munin/ 
    68102install -m0644 dists/tarball/plugins.conf %{buildroot}/etc/munin/plugin-conf.d/munin-node 
    69  
    70 chmod -x %{buildroot}%{_datadir}/munin/plugins/sybase_space 
     103install -m0644 dists/debian/munin.logrotate %{buildroot}/etc/logrotate.d/munin 
     104install -m0644 dists/debian/munin-node.logrotate %{buildroot}/etc/logrotate.d/munin-node 
     105 
     106# Prevent rpmbuild from adding a lot of perl dependencies 
     107chmod -x %{buildroot}%{_datadir}/munin/plugins/* 
     108chmod -x %{buildroot}%{_sbindir}/munin-node-configure-snmp 
     109chmod -x %{buildroot}%{_sbindir}/munin-node-configure 
     110chmod -x %{buildroot}%{_sbindir}/munin-run 
     111 
    71112## Server 
    72  
    73113make    CONFIG=dists/redhat/Makefile.config \ 
    74114        DESTDIR=%{buildroot} \ 
    75115        install-main 
    76116 
    77 # cf=%{buildroot}/etc/munin/munin.conf; sed 's,/var/www/munin,/var/www/html/munin,g' < $cf > $cf.patch && mv $cf.patch $cf 
     117# cf=%{buildroot}/etc/munin/munin.conf; sed 's,/var/www/munin,/var/www/html/munin,g' < $cf > $cf.patched && mv $cf.patched $cf 
    78118 
    79119mkdir -p %{buildroot}/var/www/html/munin 
     
    86126install -m 0644 server/munin-htaccess %{buildroot}/var/www/html/munin/.htaccess 
    87127install -m 0755 server/style.css %{buildroot}/var/www/html/munin 
    88  
    89128install -m 0644 ChangeLog %{buildroot}%{_docdir}/munin/ChangeLog 
    90  
    91129 
    92130%clean 
     
    99137%post node 
    100138chmod -R g+w /var/lib/munin/ 
     139chmod +x %{_datadir}/munin/plugins/* 
     140chmod +x %{_sbindir}/munin* 
     141 
    101142if [ $1 = 1 ] 
    102143then 
     
    119160 
    120161%post 
     162mkdir -p /var/run/munin 
     163chown -R munin /var/run/munin 
    121164chown -R munin /var/www/html/munin 
    122165chown -R munin /var/log/munin 
     
    136179%doc %{_docdir}/munin/COPYING 
    137180%doc %{_docdir}/munin/ChangeLog 
     181%doc %{_docdir}/munin/README-apache-cgi 
    138182%{_bindir}/munin-cron 
    139183%{_datadir}/munin/munin-graph 
     
    142186%{_datadir}/munin/munin-update 
    143187%{_libdir}/perl5/*perl/5.*/Munin.pm 
     188/var/www/html/munin/cgi/munin-cgi-graph 
    144189%dir /etc/munin/templates 
    145190%dir /etc/munin 
     
    147192/etc/cron.d/munin 
    148193%config(noreplace) /etc/munin/munin.conf 
     194%config(noreplace) /etc/logrotate.d/munin 
     195 
    149196%attr(-, munin, root) %dir /var/lib/munin 
    150197%attr(-, munin, root) %dir /var/log/munin 
    151198%attr(-, munin, root) %dir /var/www/html/munin 
    152 %attr(-, munin, root) %dir /var/www/html/munin/cgi/cgi 
     199%attr(-, munin, root) %dir /var/www/html/munin/cgi 
    153200%attr(-, munin, root) /var/www/html/munin/style.css 
    154201%config /var/www/html/munin/.htaccess 
     
    164211%config(noreplace) /etc/munin/munin-node.conf 
    165212%config(noreplace) /etc/munin/plugin-conf.d/munin-node 
    166 %config /etc/init.d/munin-node 
     213%config(noreplace) /etc/logrotate.d/munin-node 
     214%config /etc/rc.d/init.d/munin-node 
    167215%config(noreplace) /etc/munin/plugins.conf 
    168216%{_sbindir}/munin-run 
     
    183231%doc %{_mandir}/man8/munin-node* 
    184232%doc %{_mandir}/man5/munin-node* 
    185 #%doc %{_mandir}/man5/node.conf* 
    186233 
    187234%changelog 
     235* Thu Apr 21 2005 Ingvar Hagelund <ingvar@linpro.no> 1.2.3-4 
     236- Fixed a bug in the iostat plugin 
     237* Wed Apr 20 2005 Ingvar Hagelund <ingvar@linpro.no> 1.2.3-3 
     238- Added the missing /var/run/munin 
     239* Tue Apr 19 2005 Ingvar Hagelund <ingvar@linpro.no> 1.2.3-2 
     240- Removed a lot of unecessary perl dependencies 
     241* Mon Apr 18 2005 Ingvar Hagelund <ingvar@linpro.no> 1.2.3-1 
     242- Sync with svn 
     243* Tue Mar 22 2005 Ingvar Hagelund <ingvar@linpro.no> 1.2.2-5 
     244- Sync with release of 1.2.2 
     245- Add some nice text from the suse specfile 
     246- Minimal changes in the header 
     247- Some cosmetic changes 
     248- Added logrotate scripts (stolen from debian package) 
    188249* Sun Feb 01 2004 Ingvar Hagelund <ingvar@linpro.no> 
    189250- Sync with CVS. Version 1.0.0pre2 
     
    207268* Tue Jun 18 2002 Kjetil Torgrim Homme <kjetilho@linpro.no> 
    208269- new package 
    209  
    210  
  • people/ilmari/modularisation-branch/dists/suse/munin.spec.in

    r864 r1012  
    1 Name:      munin 
    2 Version:   @@VERSION@@ 
    3 Release:   1 
    4 Copyright: GPL 
    5 BuildRoot: %{_tmppath}/%{name}-%{version}-root 
    6 URL:       http://www.linpro.no/ 
    7 Source:    %{name}-%{version}.tar.gz 
    8 Group:     System Environment/Daemons 
    9 Summary:   Munin is the Linpro RRD data agent 
    10 BuildArchitectures: noarch 
    11 Provides: perl(RRDs) 
    12 Requires: perl-Config-General 
    13 Requires: perl-HTML-Template 
    14 Requires: perl-Net-Server 
    15 Requires: rrdtool 
    16 Obsoletes: lrrd-server 
     1Name:           munin 
     2Version:        @@VERSION@@ 
     3Release:        1 
     4 
     5Summary:        Network-wide graphing framework (grapher/gatherer) 
     6License:        GPL 
     7Group:          System Environment/Daemons 
     8URL:            http://munin.sourceforge.net 
     9Packager:       Rune Nordbøe Skillingstad <runesk@linpro.no> 
     10Vendor:         Linpro AS 
     11Distribution:   Linpro AS SuSE Linux Software Archives 
     12Source0:        %{name}_%{version}.tar.gz 
     13Source1:        Makefile.config 
     14Source2:        munin-node.rc 
     15Source3:        munin.cron.d 
     16Source4:        munin.logrotate 
     17Source5:        munin-node.logrotate 
     18Source6:        munin-node.cron.d 
     19Source7:        plugins.conf 
     20Patch0:         patch-001 
     21Patch1:         patch-002 
     22Requires:       perl-HTML-Template 
     23Requires:       rrdtool 
     24Obsoletes:      lrrd-server 
     25BuildArch:      noarch 
     26BuildRoot:      %{_tmppath}/%{name}-%{version}-root 
     27 
     28%define         confdir /etc/munin 
     29%define         libdir  /usr/share/munin 
     30%define         htmldir /srv/www/htdocs/munin 
     31%define         cgidir  /srv/www/cgi-bin 
     32%define         dbdir   /var/lib/munin 
     33%define         logdir  /var/log/munin 
     34%define         statedir /var/run/munin 
    1735 
    1836%description 
    19 Munin, formerly known as The Linpro RRD server, queries a number of 
    20 nodes, and processes the data using RRDtool and presents it on web 
    21 pages. 
     37Munin is a highly flexible and powerful solution used to create graphs of 
     38virtually everything imaginable throughout your network, while still 
     39maintaining a rattling ease of installation and configuration. 
     40 
     41This package contains the grapher/gatherer. You will only need one instance of 
     42it in your network. It will periodically poll all the nodes in your network 
     43it's aware of for data, which it in turn will use to create graphs and HTML 
     44pages, suitable for viewing with your graphical web browser of choice. 
     45 
     46Munin is written in Perl, and relies heavily on Tobi Oetiker's excellent 
     47RRDtool. To see a real example of Munin in action, take a peek at 
     48<http://www.linpro.no/projects/munin/example/>. 
    2249 
    2350%package node 
    24 Group: System Environment/Daemons 
    25 Summary: Linpro RRD data agent 
    26 BuildArchitectures: noarch 
    27 Requires: perl-Net-Server 
    28 #Requires: perl-Config-General 
    29 Requires: procps >= 2.0.7 
    30 Requires: sysstat 
    31 Obsoletes: lrrd-client 
     51Group:          System Environment/Daemons 
     52Summary:        Network-wide graphing framework (node) 
     53BuildArch:      noarch 
     54Requires:       perl-Net-Server 
     55Requires:       ps 
     56Requires:       sysstat 
     57Obsoletes:      lrrd-client 
    3258 
    3359%description node 
    34 The Munin node package returns statistical data on the request of a 
    35 Munin server. 
     60Munin is a highly flexible and powerful solution used to create graphs of 
     61virtually everything imaginable throughout your network, while still 
     62maintaining a rattling ease of installation and configuration. 
     63 
     64This package contains node software. You should install it on all the nodes 
     65in your network. It will know how to extract all sorts of data from the 
     66node it runs on, and will wait for the gatherer to request this data for 
     67further processing. 
     68 
     69It includes a range of plugins capable of extracting common values such as 
     70cpu usage, network usage, load average, and so on. Creating your own plugins 
     71which are capable of extracting other system-specific values is very easy, 
     72and is often done in a matter of minutes. You can also create plugins which 
     73relay information from other devices in your network that can't run Munin, 
     74such as a switch or a server running another operating system, by using 
     75SNMP or similar technology. 
     76 
     77Munin is written in Perl, and relies heavily on Tobi Oetiker's excellent 
     78RRDtool. To see a real example of Munin in action, take a peek at 
     79<http://www.linpro.no/projects/munin/example/>. 
    3680 
    3781%prep 
    3882%setup -q 
     83%patch0 
     84%patch1 -p1 
    3985mkdir -p %{buildroot} 
    4086 
     
    4591perl -pi -e 's,htmldoc munin,cat munin, or s,html(2text|doc),# $&,' Makefile 
    4692perl -pi -e 's,\$\(INSTALL.+\.(pdf|txt) \$\(DOCDIR,# $&,' Makefile 
     93 
    4794make    clean 
    48 make    CONFIG=dists/suse/Makefile.config \ 
    49         build 
     95make    CONFIG=%{SOURCE1} \ 
     96        DOCDIR=%{_docdir}/munin \ 
     97        MANDIR=%{_mandir} \ 
     98        HTMLDIR=%{htmldir} \ 
     99        CGIDIR=%{cgidir} \ 
     100        LIBDIR=%{libdir} \ 
     101        CONFDIR=%{confdir} \ 
     102        DESTDIR=%{buildroot} \ 
     103        DBDIR=%{dbdir} \ 
     104        SBINDIR=%{_sbindir} \ 
     105        LOGDIR=%{logdir} \ 
     106        STATEDIR=%{statedir} \ 
     107        build 
     108 
     109mkdir -p %{buildroot}%{dbdir}/plugin-state 
     110mkdir -p %{buildroot}%{logdir} 
     111mkdir -p %{buildroot}%{statedir} 
     112mkdir -p %{buildroot}/etc/init.d 
     113mkdir -p %{buildroot}/etc/cron.d 
     114mkdir -p %{buildroot}/etc/logrotate.d 
     115mkdir -p %{buildroot}%{htmldir} 
    50116 
    51117%install 
    52  
    53 #rm -rf ${buildroot}/var/www/html/munin/cgi/cgi 
    54 ## Node 
    55 make    CONFIG=dists/suse/Makefile.config \ 
    56         DOCDIR=%{buildroot}%{_docdir}/munin \ 
    57         MANDIR=%{buildroot}%{_mandir} \ 
    58         DESTDIR=%{buildroot} \ 
    59         install-node install-node-plugins install-doc install-man 
    60  
    61 mkdir -p %{buildroot}/etc/init.d 
    62 mkdir -p %{buildroot}/etc/munin/plugins 
    63 mkdir -p %{buildroot}/etc/munin/plugin-conf.d 
    64 mkdir -p %{buildroot}/var/lib/munin 
    65 mkdir -p %{buildroot}/var/log/munin 
    66  
    67 install -m0755 dists/suse/munin-node.rc %{buildroot}/etc/init.d/munin-node 
    68 install -m0644 dists/tarball/plugins.conf %{buildroot}/etc/munin/ 
    69 install -m0644 dists/tarball/plugins.conf %{buildroot}/etc/munin/plugin-conf.d/munin-node 
    70  
    71 chmod -x %{buildroot}%{_datadir}/munin/plugins/sybase_space 
    72 ## Server 
    73  
    74 make    CONFIG=dists/suse/Makefile.config \ 
    75         DESTDIR=%{buildroot} \ 
    76         install-main 
    77  
    78 # cf=%{buildroot}/etc/munin/munin.conf; sed 's,/var/www/munin,/var/www/html/munin,g' < $cf > $cf.patch && mv $cf.patch $cf 
    79  
    80 mkdir -p %{buildroot}/var/www/html/munin 
    81 mkdir -p %{buildroot}/var/www/html/munin/cgi 
    82 mkdir -p %{buildroot}/var/log/munin 
    83 mkdir -p %{buildroot}/etc/cron.d 
    84 # silly RPM triggers want to make debug enabled libraries.  let it try. 
    85 mkdir -p %{buildroot}/usr/lib/debug 
    86  
    87 install -m 0755 dists/suse/munin.cron.d %{buildroot}/etc/cron.d/munin 
    88 install -m 0644 server/munin-htaccess %{buildroot}/var/www/html/munin/.htaccess 
    89 install -m 0755 server/style.css %{buildroot}/var/www/html/munin 
    90 #install -m 0755 server/munin-cgi-graph %{buildroot}/var/www/html/munin/cgi 
    91 install -m 0644 ChangeLog %{buildroot}%{_docdir}/munin/ChangeLog 
    92  
     118make    CONFIG=%{SOURCE1} \ 
     119        DOCDIR=%{buildroot}%{_docdir}/munin \ 
     120        MANDIR=%{buildroot}%{_mandir} \ 
     121        HTMLDIR=%{buildroot}%{htmldir} \ 
     122        LIBDIR=%{buildroot}%{libdir} \ 
     123        CGIDIR=%{buildroot}%{cgidir} \ 
     124        CONFDIR=%{buildroot}%{confdir} \ 
     125        DESTDIR=%{buildroot} \ 
     126        DBDIR=%{buildroot}%{dbdir} \ 
     127        SBINDIR=%{buildroot}%{_sbindir} \ 
     128        LOGDIR=%{buildroot}%{logdir} \ 
     129        STATEDIR=%{buildroot}%{statedir} \ 
     130        install-main install-node install-node-plugins install-doc install-man  
     131                                                                 
     132install -m0755 %{SOURCE2} %{buildroot}/etc/init.d/munin-node 
     133install -m0644 %{SOURCE3} %{buildroot}/etc/cron.d/munin 
     134install -m0644 %{SOURCE4} %{buildroot}/etc/logrotate.d/munin 
     135install -m0644 %{SOURCE5} %{buildroot}/etc/logrotate.d/munin-node 
     136install -m0644 %{SOURCE6} %{buildroot}/etc/cron.d/munin-node 
     137install -m0644 %{SOURCE7} %{buildroot}%{confdir}/plugin-conf.d/munin-node 
     138install -m0644 ChangeLog %{buildroot}%{_docdir}/munin/ChangeLog 
    93139 
    94140%clean 
    95141[ -n "%{buildroot}" -a "%{buildroot}" != / ] && rm -rf %{buildroot} 
    96   
     142 
     143 
     144## Server 
     145 
     146%pre 
     147 
     148getent group munin >/dev/null || groupadd -r munin 
     149getent passwd munin > /dev/null || useradd -r -d %{dbdir} -g munin munin 
     150 
     151%post 
     152mkdir -p %{htmldir} 
     153mkdir -p %{logdir} 
     154mkdir -p %{dbdir} 
     155chown -R munin:munin %{htmldir} 
     156chown -R munin:munin %{logdir} 
     157chown -R munin:munin %{statedir} 
     158chown -R munin:munin %{dbdir} 
     159 
     160## Node 
    97161%pre node 
    98162getent group munin >/dev/null || groupadd -r munin 
    99 getent passwd munin > /dev/null || useradd -r -d /var/lib/munin -g munin munin 
     163getent passwd munin > /dev/null || useradd -r -d %{dbdir} -g munin munin 
    100164 
    101165%post node 
    102 chmod -R g+w /var/lib/munin/ 
    103166if [ $1 = 1 ] 
    104167then 
    105        /sbin/chkconfig --add munin-node 
     168        /sbin/chkconfig --add munin-node 
    106169        /usr/sbin/munin-node-configure --shell | sh 
    107170fi 
    108 chown -R munin /var/lib/munin 
    109  
     171%{fillup_and_insserv -n -s -y munin munin-node START_MUNIN_NODE} 
     172mkdir -p %{logdir} 
     173mkdir -p %{dbdir}/plugin-state 
     174chown -R munin:munin %{logdir} 
     175chown -R munin:munin %{dbdir} 
     176chmod g+w %{dbdir}/plugin-state 
     177/etc/init.d/munin-node status >/dev/null 2>&1 || /etc/init.d/munin-node start 
    110178 
    111179%preun node 
    112180if [ $1 = 0 ] 
    113181then 
    114         /sbin/chkconfig --del munin-node 
    115         rmdir /var/log/munin 2>/dev/null || echo " " 
     182        /sbin/service munin-node stop > /dev/null 2>&1 
     183        /sbin/chkconfig --del munin-node 
     184        rmdir %{logdir} 2>/dev/null || true 
    116185fi 
    117  
    118 %pre 
    119 getent group munin >/dev/null || groupadd -r munin 
    120 getent passwd munin > /dev/null || useradd -r -d /var/lib/munin -g munin munin 
    121  
    122 %post 
    123 chown -R munin /var/www/html/munin 
    124 chown -R munin /var/log/munin 
    125 chown -R munin /var/lib/munin 
    126  
    127 %postun 
    128 if [ $1 = 0 ] 
    129 then 
    130         userdel munin 
    131 fi 
     186%stop_on_removal munin-node 
     187 
     188%postun node 
     189%restart_on_update munin-node 
     190%{insserv_cleanup} 
     191 
    132192 
    133193%files 
    134194%defattr(-, root, root) 
    135195%doc %{_docdir}/munin/README.api 
    136 #%doc %{_docdir}/munin/README.config 
    137196%doc %{_docdir}/munin/README.plugins 
    138197%doc %{_docdir}/munin/COPYING 
    139198%doc %{_docdir}/munin/ChangeLog 
     199%doc %{_mandir}/man8/munin-graph* 
     200%doc %{_mandir}/man8/munin-update* 
     201%doc %{_mandir}/man8/munin-html* 
     202%doc %{_mandir}/man8/munin-cron* 
     203%doc %{_mandir}/man5/munin.conf* 
     204%doc %{_mandir}/man8/munin-limits.8.gz 
    140205%{_bindir}/munin-cron 
    141206%{_datadir}/munin/munin-graph 
    142207%{_datadir}/munin/munin-html 
    143 %{_datadir}/munin/munin-nagios 
    144208%{_datadir}/munin/munin-update 
    145209%{_libdir}/perl5/*perl/5.*/Munin.pm 
    146 %dir /etc/munin/templates 
    147 %dir /etc/munin 
    148 /etc/munin/templates/* 
    149 /etc/cron.d/munin 
    150 /var/www/html/munin/cgi/* 
    151 %config /etc/munin/munin.conf 
    152 %attr(-, munin, root) %dir /var/lib/munin 
    153 %attr(-, munin, root) %dir /var/log/munin 
    154 %attr(-, munin, root) %dir /var/www/html/munin 
    155 %attr(-, munin, root) %dir /var/www/html/munin/cgi 
    156 %attr(-, munin, root) /var/www/html/munin/style.css 
    157 %config /var/www/html/munin/.htaccess 
    158 %doc %{_mandir}/man8/munin-graph* 
    159 %doc %{_mandir}/man8/munin-update* 
    160 %doc %{_mandir}/man8/munin-nagios* 
    161 %doc %{_mandir}/man8/munin-html* 
    162 %doc %{_mandir}/man8/munin-cron* 
    163 %doc %{_mandir}/man5/munin.conf* 
    164  
     210%{_usr}/share/munin/munin-limits 
     211%{cgidir}/munin-cgi-graph 
     212%config %{confdir}/templates/* 
     213%config /etc/cron.d/munin 
     214%config(noreplace) %{confdir}/munin.conf 
     215%config /etc/logrotate.d/munin 
     216%dir %{statedir} 
     217 
     218             
    165219%files node 
    166220%defattr(-, root, root) 
    167 %config /etc/munin/munin-node.conf 
    168 %config /etc/munin/plugin-conf.d/munin-node 
    169 %config /etc/init.d/munin-node 
    170 %config /etc/munin/plugins.conf 
    171 %{_sbindir}/munin-run 
    172 %{_sbindir}/munin-node 
    173 %{_sbindir}/munin-node-configure 
    174 %dir /var/log/munin 
    175 %dir %{_datadir}/munin 
    176 %dir /etc/munin/plugins 
    177 %dir /etc/munin 
    178 %dir /var/lib/munin 
    179 %dir %attr(-, root, munin) /var/lib/munin/plugin-state 
    180 %{_datadir}/munin/plugins/* 
    181221%doc %{_docdir}/munin/COPYING 
    182222%doc %{_docdir}/munin/munin-doc.html 
     
    185225%doc %{_mandir}/man8/munin-node* 
    186226%doc %{_mandir}/man5/munin-node* 
    187 #%doc %{_mandir}/man5/node.conf* 
     227%{_sbindir}/munin-run 
     228%{_sbindir}/munin-node 
     229%{_sbindir}/munin-node-configure 
     230%{_sbindir}/munin-node-configure-snmp 
     231%{_datadir}/munin/plugins/* 
     232%config(noreplace) %{confdir}/munin-node.conf 
     233%config(noreplace) %{confdir}/plugin-conf.d/munin-node 
     234%config /etc/init.d/munin-node 
     235%config /etc/cron.d/munin-node 
     236%config /etc/logrotate.d/munin-node 
     237%dir %{confdir}/plugins 
    188238 
    189239%changelog 
     240* Mon Apr  3 2005 Rune Nordbøe Skillingstad <runesk@linpro.no> 
     241- 1.2.3 release 
     242* Fri Apr  1 2005 Rune Nordbøe Skillingstad <runesk@linpro.no> 
     243- 1.2.2 release 
     244- Fixed SF bug 1164481 (missing /srv/www/htdocs/munin) 
     245- Fixed SF bug 1164477 (patch for Net::Domain on PPC64) 
     246* Fri Mar 11 2005 Rune Nordbøe Skillingstad <runesk@linpro.no> 
     247- 1.2.1 release 
     248* Wed Mar  9 2005 Rune Nordbøe Skillingstad <runesk@linpro.no> 
     249- Fixed erronumous path to web directory 
     250- Added start of node if not running 
     251* Thu Mar  8 2005 Rune Nordbøe Skillingstad <runesk@linpro.no> 
     252- Fixed some build path problems 
     253* Thu Feb 24 2005 Rune Nordbøe Skillingstad <runesk@linpro.no> 
     254- New major release 
     255* Wed Feb  9 2005 Rune Nordbøe Skillingstad <runesk@linpro.no> 
     256- Updated to version 1.2.0rc2. 
     257- Removed Nagios stuff 
     258- Added noreplace for some central configuration files 
     259* Thu Nov 18 2004 Rune Nordbøe Skillingstad <runesk@linpro.no> 
     260- Updated to version 1.0.4 
     261* Mon Nov 08 2004 Rune Nordbøe Skillingstad <runesk@linpro.no> 
     262- Updated version 1.0.3 / sync with redhat-build 
    190263* Wed Aug 04 2004 Rune Nordbøe Skillingstad <runesk@linpro.no> 
    191264- Initial SuSE build 
  • people/ilmari/modularisation-branch/munin-doc-base.html

    • Property svn:mime-type set to text/html
    r864 r1012  
    109109 -u root %c</code>". Nice to avoid running munin-node as root. 
    110110 <dt><code>allow &lt;regex&gt;</code><dd>Allow hosts matching regex to run this plugin. 
     111 <dt><code>allow tls</code><dd>Allow hosts which use TLS with verified certificates to run this plugin. 
    111112 <dt><code>deny &lt;regex&gt;</code><dd>Deny hosts matching regex from running this plugin. 
     113 <dt><code>deny tls</code><dd>Deny hosts which use TLS with verified certificates to run this plugin. 
    112114 <dt><code>timeout &lt;seconds&gt;</code><dd>Use a timeout of &lt;seconds&gt; seconds instead of the default timeout 
    113115 of 10 seconds, when running this plugin. 
     
    234236 (e.g. laptops). NOTE: Deprecated. Use use_node_name instaed. 
    235237 <dt>contacts<dd>Set which contact entries to use for this node. Default is all contact entries existing under "contact" tree. 
    236  <dt>tls<dd>Set to force use of TLS when communicating with the node. (Default off.) 
     238 <dt>tls<dd>Configure TLS support when communicating with the node. Set to "enabled" to force TLS support, "disabled" to not use it, "paranoid" to force node certificate validation against a local CA file, and "auto" to try to get the most secure level of communication, but accept anything (including no TLS) if the node does not support it. (Default: "auto") 
     239 <dt>tls_private_key<dd>Set path to private key file. (Default "@@CONFDIR@@/munin.pem") 
     240 <dt>tls_certificate<dd>Set path to certificate file. (Default "@@CONFDIR@@/munin.pem") 
     241 <dt>tls_pem<dd>Set path to pem file (if you have both private key and certificate in the same file). (Default "@@CONFDIR@@/munin.pem") 
    237242</dl> 
    238243</tt> 
  • people/ilmari/modularisation-branch/munin-faq-base.html

    • Property svn:mime-type set to text/html
    • Property svn:eol-style deleted
    • Property svn:keywords deleted
  • people/ilmari/modularisation-branch/node/munin-node-configure-snmp.in

    r864 r1012  
    1818# 
    1919# 
    20 # $Log$ 
    21 # Revision 1.9  2005/02/16 20:14:21  jimmyo 
    22 # Added man page for munin-node-configure-snmp. 
    23 # 
    24 # Revision 1.8  2004/11/16 20:00:42  jimmyo 
    25 # License cleanups. 
    26 # 
    2720 
    2821use strict; 
     
    10396if ($do_version) 
    10497{ 
    105         print "munin-node-configure-snmp (munin-node) version $version.\n"; 
    106         print "Written by Jimmy Olsen\n"; 
    107         print "\n"; 
    108         print "Copyright (C) 2004 Jimmy Olsen\n"; 
    109         print "This is free software released under the GNU Public License. There is NO\n"; 
    110         print "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"; 
     98        print <<"EOT"; 
     99munin-node-configure-snmp (munin-node) version $version. 
     100Written by Jimmy Olsen 
     101 
     102Copyright (C) 2004-2005 Jimmy Olsen 
     103 
     104This is free software released under the GNU General Public License. There 
     105is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR 
     106PURPOSE. For details, please refer to the file COPYING that is included 
     107with this software or refer to 
     108  http://www.fsf.org/licensing/licenses/gpl.txt 
     109EOT 
    111110        exit 0; 
    112111} 
  • people/ilmari/modularisation-branch/node/munin-node-configure.in

    r864 r1012  
    1818# 
    1919# Program to suggest configurations and configuration changes. 
    20 # 
    21 # $Log$ 
    22 # Revision 1.12  2005/03/09 21:50:26  jimmyo 
    23 # munin-node-configure now properly respect user plugins. 
    24 # 
    25 # Revision 1.11  2004/12/10 10:40:12  jimmyo 
    26 # Fix bug with underscore in wildcard plugins. 
    27 # 
    28 # Revision 1.10  2004/11/16 20:00:42  jimmyo 
    29 # License cleanups. 
    30 # 
    31 # Revision 1.9  2004/09/07 19:33:32  jimmyo 
    32 # Documented the SNMP options a bit better. 
    33 # 
    34 # Revision 1.8  2004/09/05 12:00:18  jimmyo 
    35 # Set family and capabilities. 
    36 # 
    37 # Revision 1.7  2004/09/03 23:25:16  jimmyo 
    38 # Brushed up the SNMP probe functionality. 
    39 # 
    40 # Revision 1.6  2004/09/03 22:59:03  jimmyo 
    41 # Support comma-formatted snmp-options. 
    42 # 
    43 # Revision 1.5  2004/09/03 22:56:51  jimmyo 
    44 # Added support for SNMP probing. 
    45 # 
    46 # Revision 1.4  2004/01/29 19:25:52  jimmyo 
    47 # Fixed bad debug output (forgotten linebreaks) in munin-node-configure (SF#882385). 
    48 # 
    49 # Revision 1.3  2004/01/29 17:36:19  jimmyo 
    50 # Updated copyright information 
    51 # 
    52 # Revision 1.2  2004/01/15 15:20:00  jimmyo 
    53 # Making things workable after name change. Upping for test verwion. 
    54 # 
    55 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    56 # Renamed occurrances of lrrd -> munin 
    57 # 
    58 # Revision 1.1.1.1  2004/01/02 15:18:06  jimmyo 
    59 # Import of LRRD CVS tree after renaming to Munin 
    60 # 
    61 # Revision 1.11  2003/12/18 16:46:59  jimmyo 
    62 # now prints the reason for suggesting to not use a plugin, as long as the plugins gives one. 
    63 # 
    64 # Revision 1.10  2003/12/17 21:29:26  jimmyo 
    65 # Don\'t try to change uid/gid if not running as root. (Deb#224300) 
    66 # 
    67 # Revision 1.9  2003/11/10 22:05:42  toreanderson 
    68 # bugfux 
    69 # 
    70 # Revision 1.8  2003/11/10 17:52:33  jimmyo 
    71 # Small briainer-typo 
    72 # 
    73 # Revision 1.7  2003/11/10 17:32:18  jimmyo 
    74 # Check what to do with new plugins when upgrading. 
    75 # 
    76 # Revision 1.6  2003/11/07 17:43:16  jimmyo 
    77 # Cleanups and log entries 
    78 # 
    7920# 
    8021 
     
    15293if ($do_version) 
    15394{ 
    154     print "munin-node-configure (munin-node) version $version.\n"; 
    155     print "Written by Jimmy Olsen\n"; 
    156     print "\n"; 
    157     print "Copyright (C) 2003-2004 Jimmy Olsen\n"; 
    158     print "This is free software released under the GNU Public License. There is NO\n"; 
    159     print "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"; 
     95    print <<"EOT"; 
     96munin-node-configure (munin-node) version $version. 
     97Written by Jimmy Olsen 
     98 
     99Copyright (C) 2003-2005 Jimmy Olsen 
     100 
     101This is free software released under the GNU General Public License. There 
     102is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR 
     103PURPOSE. For details, please refer to the file COPYING that is included 
     104with this software or refer to 
     105  http://www.fsf.org/licensing/licenses/gpl.txt 
     106EOT 
    160107    exit 0; 
    161108} 
  • people/ilmari/modularisation-branch/node/munin-node-simple.in

    r864 r1012  
    2323# reviewing by sysadmins that want to do simple munin-stuff in high 
    2424# security environments. 
    25 # 
    26 # $Log$ 
    27 # Revision 1.3  2004/11/16 20:00:42  jimmyo 
    28 # License cleanups. 
    29 # 
    30 # Revision 1.2  2004/01/15 15:20:01  jimmyo 
    31 # Making things workable after name change. Upping for test verwion. 
    32 # 
    33 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    34 # Renamed occurrances of lrrd -> munin 
    35 # 
    36 # Revision 1.1.1.1  2004/01/02 15:18:06  jimmyo 
    37 # Import of LRRD CVS tree after renaming to Munin 
    38 # 
    39 # Revision 1.3  2003/11/24 10:15:56  jimmyo 
    40 # Ready for 0.9.9 release 
    41 # 
    42 # Revision 1.2  2003/11/19 17:26:30  jimmyo 
    43 # Now works with netcat 
    44 # 
    45 # Revision 1.1  2003/11/19 17:09:46  jimmyo 
    46 # New mini-client. Not finished yet (only talks on stdout right now). 
    47 # 
    4825# 
    4926 
  • people/ilmari/modularisation-branch/node/munin-node.in

    r864 r1012  
    2020# $Id$ 
    2121# 
    22 # $Log$ 
    23 # Revision 1.23  2005/02/16 17:11:33  jimmyo 
    24 # munin-node didn't treat default_plugin_user properly (Deb#295366). 
    25 # 
    26 # Revision 1.22  2005/01/24 17:25:37  jimmyo 
    27 # Made TLS mode work. 
    28 # 
    29 # Revision 1.21  2005/01/10 20:48:58  jimmyo 
    30 # Main/Node: Added support for TLS. 
    31 # 
    32 # Revision 1.20  2004/12/22 21:33:48  jimmyo 
    33 # Remove hardcoding of default user/group to run the plugin (SF#1083251). 
    34 # 
    35 # Revision 1.19  2004/12/09 20:03:25  jimmyo 
    36 # Added two new plugins contributed by Jacques Caruso, generic/exim_mailqueue_alt and generic/mailscanner. 
    37 # 
    38 # Revision 1.18  2004/12/09 19:34:54  jimmyo 
    39 # host_name in plugin-conf.d now overrides plugin output. 
    40 # 
    41 # Revision 1.17  2004/11/20 23:17:47  jimmyo 
    42 # Added per-plugin timeouts, contributed by Chan Wilson (SF#881044). 
    43 # 
    44 # Revision 1.16  2004/11/16 20:00:42  jimmyo 
    45 # License cleanups. 
    46 # 
    47 # Revision 1.15  2004/11/10 15:34:18  jimmyo 
    48 # Added new plugin generic/apc_nis to monitor APC UPS, contributed by xavier. 
    49 # 
    50 # Revision 1.14  2004/05/12 20:33:28  jimmyo 
    51 # Made the allow/deny syntax more flexible. 
    52 # 
    53 # Revision 1.13  2004/05/10 21:16:11  jimmyo 
    54 # Allow/deny in munin-node can now be configured per plugin, in addition to "globally" for the whole node. 
    55 # 
    56 # Revision 1.12  2004/04/27 21:18:33  jimmyo 
    57 # Fixed a problem in the node when running as a non-root user and using sudo to run the plugins (Deb#236694). 
    58 # 
    59 # Revision 1.11  2004/02/05 18:05:59  jimmyo 
    60 # Improved timeout-handling in node (Deb#224480). 
    61 # 
    62 # Revision 1.10  2004/02/05 17:35:41  jimmyo 
    63 # Made client timeouts configurable (not per plugin). 
    64 # 
    65 # Revision 1.9  2004/02/01 21:34:59  jimmyo 
    66 # Remove dependency on pgrep (use process groups instead). (SF#881049) 
    67 # 
    68 # Revision 1.8  2004/02/01 20:46:29  jimmyo 
    69 # Added better logging of plugin failures in the node. (SF#881045) 
    70 # 
    71 # Revision 1.7  2004/01/29 19:39:00  jimmyo 
    72 # Generic plugins now use printf instead of echo -n, as this is more portable (SF#885564) 
    73 # 
    74 # Revision 1.6  2004/01/29 18:07:52  jimmyo 
    75 # Bugfix from bug introduced 30 minutes ago 
    76 # 
    77 # Revision 1.5  2004/01/29 17:36:19  jimmyo 
    78 # Updated copyright information 
    79 # 
    80 # Revision 1.4  2004/01/29 16:56:54  jimmyo 
    81 # Fixed "group" bug. Added support for multiple and optional groups 
    82 # 
    83 # Revision 1.3  2004/01/17 22:04:29  toreanderson 
    84 # Change the name in process listing to contain only the path to the munin-node 
    85 # executable, without '/usr/bin/perl -wT' prepending it. 
    86 # 
    87 # Revision 1.2  2004/01/15 15:20:01  jimmyo 
    88 # Making things workable after name change. Upping for test verwion. 
    89 # 
    90 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    91 # Renamed occurrances of lrrd -> munin 
    92 # 
    93 # Revision 1.1.1.1  2004/01/02 15:18:06  jimmyo 
    94 # Import of LRRD CVS tree after renaming to Munin 
    95 # 
    96 # Revision 1.28  2003/12/18 18:51:37  jimmyo 
    97 # added configuration option "ignore_file", which takes regex for files to ignore (e.g. rpmnew/save) (Deb#224265). 
    98 # 
    99 # Revision 1.27  2003/12/18 17:58:18  jimmyo 
    100 # Do a fake clean of the environment because of the taint checking. 
    101 # 
    102 # Revision 1.26  2003/12/17 21:29:26  jimmyo 
    103 # Don\'t try to change uid/gid if not running as root. (Deb#224300) 
    104 # 
    105 # Revision 1.25  2003/12/10 15:30:02  jimmyo 
    106 # Set path before trying to get hostname 
    107 # 
    108 # Revision 1.24  2003/12/10 15:11:40  jimmyo 
    109 # A couple of bugfixes. 
    110 # 
    111 # Revision 1.23  2003/11/17 09:23:08  jimmyo 
    112 # Fix taint checking for getting hostname 
    113 # 
    114 # Revision 1.22  2003/11/17 09:20:09  jimmyo 
    115 # Fix for machines which don't have "host". 
    116 # 
    117 # Revision 1.21  2003/11/07 17:43:16  jimmyo 
    118 # Cleanups and log entries 
    119 # 
    120 # 
    12122 
    12223package MyPackage; 
     
    12627use Getopt::Long; 
    12728use Net::Server::Fork; # any personality will do 
    128 use Net::SSLeay qw(die_now die_if_ssl_error); 
    129  
    130 # TLS init 
    131 Net::SSLeay::load_error_strings(); 
    132 Net::SSLeay::SSLeay_add_ssl_algorithms(); 
    133 Net::SSLeay::randomize(); 
    134 my $ctx;  
     29 
    13530my $tls; 
     31my %tls_verified = ( "level" => 0, "cert" => "", "verified" => 0, "required_depth" => 5 ); 
    13632 
    13733chdir ("/"); 
     
    19793Written by Audun Ytterdal, Jimmy Olsen, Tore Anderson / Linpro AS 
    19894 
    199 Copyright (C) 2002-2004 
    200 This is free software released under the GNU Public License. There is NO 
    201 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
     95Copyright (C) 2002-2005 
     96 
     97This is free software released under the GNU General Public License. There 
     98is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR 
     99PURPOSE. For details, please refer to the file COPYING that is included 
     100with this software or refer to 
     101  http://www.fsf.org/licensing/licenses/gpl.txt 
    202102"; 
    203103        exit 0; 
     
    269169      $sconf{'timeout'} = $2; 
    270170  } 
     171  elsif (defined $1 and defined $2 and not defined $sconf{$1}) 
     172  { 
     173      $sconf{$1} = $2; 
     174  } 
    271175} 
    272176 
     
    297201sub show_nodes { 
    298202  for my $node (keys %nodes) { 
    299     print "$node\n"
     203    net_write ("$node\n")
    300204  } 
    301   print ".\n"
     205  net_write (".\n")
    302206} 
    303207 
     
    377281sub list_services { 
    378282    my $node = $_[0] || $FQDN; 
    379     net_write (join " ", grep { &has_access ($_); } keys %{$nodes{$node}})
     283    net_write join " ", grep { &has_access ($_); } keys %{$nodes{$node}} if exists $nodes{$node}
    380284    #print join " ", keys %{$nodes{$node}}; 
    381285    net_write ("\n"); 
     
    396300                foreach my $rule (@{$ruleset}) 
    397301                { 
    398                         print STDERR "DEBUG: Checking access: $host;$serv;", $rule->[0], $rule->[1], ";\n" if $DEBUG; 
    399 #                       if ($rule->[1] =~ /\//) 
     302                        logger ("DEBUG: Checking access: $host;$serv;". $rule->[0].";".$rule->[1]) if $DEBUG; 
     303                        if ($rule->[1] eq "tls" and $tls_verified{"verified"}) 
     304                        { # tls 
     305                                if ($rule->[0] eq "allow") 
     306                                { 
     307                                        return 1; 
     308                                } 
     309                                else 
     310                                { 
     311                                        return 0; 
     312                                } 
     313                        } 
     314#                       elsif ($rule->[1] =~ /\//) 
    400315#                       { # CIDR 
    401316#                               print "DEBUG: CIDR $host;$serv;$rule->[1];\n"; 
    402317#                               return 1; 
    403318#                       } 
    404 #                     else 
    405 #                     { # regex 
     319                      else 
     320                      { # regex 
    406321                                if ($host =~ m($rule->[1])) 
    407322                                { 
     
    415330                                        } 
    416331                                } 
    417 #                     } 
     332                      } 
    418333                } 
    419334        } 
     
    424339    my $text  = shift; 
    425340    my @date  = localtime (time); 
     341 
     342    chomp ($text); 
     343    $text =~ s/\n/\\n/g; 
    426344 
    427345    printf STDERR ("%d/%02d/%02d-%02d:%02d:%02d [$$] %s\n", $date[5]+1900, $date[4]+1,  
     
    504422                        ($sconf{$service}{'group'}?" $sconf{$service}{group}":""); 
    505423 
    506               net_write ("# Want to run as euid/egid $u/$g\n") if $DEBUG; 
     424#             net_write ("# Want to run as euid/egid $u/$g\n") if $DEBUG; 
    507425 
    508426                $( = $g    unless $g == 0; 
     
    513431                if ($> != $u or $g != (split (' ', $)))[0]) 
    514432                { 
    515                       net_write ("# Can't drop privileges. Bailing out. (wanted uid=", 
    516                           ($sconf{$service}{'user'} || $defuser), " gid=\"", 
    517                           $gs, "\"($g), got uid=$> gid=\"$)\"(",  
    518                           (split (' ', $)))[0], ").\n"); 
     433#                     net_write ("# Can't drop privileges. Bailing out. (wanted uid=", 
     434#                         ($sconf{$service}{'user'} || $defuser), " gid=\"", 
     435#                         $gs, "\"($g), got uid=$> gid=\"$)\"(",  
     436#                         (split (' ', $)))[0], ").\n"); 
    519437                        logger ("Plugin \"$service\" Can't drop privileges. ". 
    520438                            "Bailing out. (wanted uid=". 
     
    525443                } 
    526444        } 
    527       net_write ("# Running as uid/gid/euid/egid $</$(/$>/$)\n") if $DEBUG; 
     445#     net_write ("# Running as uid/gid/euid/egid $</$(/$>/$)\n") if $DEBUG; 
    528446        if (!&check_perms ("$servicedir/$service")) 
    529447        { 
    530           net_write ("# Error: unsafe permissions. Bailing out."); 
     448#         net_write ("# Error: unsafe permissions. Bailing out."); 
    531449            logger ("Error: unsafe permissions. Bailing out."); 
    532450            exit 2; 
     
    539457            foreach my $key (keys %{$sconf{$service}{'env'}}) 
    540458            { 
    541               net_write ("# Setting environment $key=$sconf{$service}{env}{$key}\n") if $DEBUG; 
     459#             net_write ("# Setting environment $key=$sconf{$service}{env}{$key}\n") if $DEBUG; 
    542460                $ENV{"$key"} = $sconf{$service}{'env'}{$key}; 
    543461            } 
     
    559477            } 
    560478            print STDERR "# About to run \"", join (' ', @run), "\"\n" if $DEBUG; 
    561           net_write ("# About to run \"", join (' ', @run), "\"\n") if $DEBUG; 
     479#         net_write ("# About to run \"", join (' ', @run), "\"\n") if $DEBUG; 
    562480            exec (@run) if @run; 
    563481        } 
    564482        else 
    565483        { 
    566           net_write ("# Execing...\n") if $DEBUG; 
     484#         net_write ("# Execing...\n") if $DEBUG; 
    567485            exec ("$servicedir/$service", $command); 
    568486        } 
    569487      } 
    570488      else { 
    571       net_write ("# Unable to fork.\n"); 
     489#     net_write ("# Unable to fork.\n"); 
    572490        logger ("Unable to fork."); 
    573491      } 
     
    613531    }  
    614532    elsif (/^starttls\s*$/i) { 
    615       start_tls (); 
     533      my $mode; 
     534      my $key; 
     535      my $cert; 
     536      my $depth; 
     537      $key = $cert = &get_var (\%sconf, "tls_pem"); 
     538      $key = &get_var (\%sconf, "tls_private_key") 
     539          unless defined $key; 
     540      $key = "@@CONFDIR@@/munin-node.pem" unless defined $key; 
     541      $cert = &get_var (\%sconf, "tls_certificate") 
     542          unless defined $cert; 
     543      $cert = "@@CONFDIR@@/munin-node.pem" unless defined $cert; 
     544      $mode = &get_var (\%sconf, 'tls'); 
     545      $mode = "auto" unless defined $mode and length $mode; 
     546      $depth = &get_var (\%sconf, 'tls_verify_depth'); 
     547      $depth = 5 unless defined $depth; 
     548      start_tls ($mode, $cert, $key, 
     549              &get_var (\%sconf, 'tls_verify_certificate'), 
     550              $depth 
     551              ); 
    616552      logger ("DEBUG: Returned from starttls.") if $DEBUG; 
    617553    } 
     
    622558} 
    623559 
    624 sub net_read 
     560sub net_read  
    625561{ 
    626562    if (defined $tls) 
    627563    { 
    628         eval { $_ = Net::SSLeay::read($tls); }  
     564        eval { $_ = Net::SSLeay::read($tls); }; 
     565        my $err = &Net::SSLeay::print_errs(); 
     566        if (defined $err and length $err) 
     567        { 
     568            logger ("TLS Warning in net_read: $err"); 
     569        } 
    629570    } 
    630571    else 
     
    636577} 
    637578 
    638 sub net_write 
     579sub net_write  
    639580{ 
    640581    my $text = shift; 
     
    642583    if (defined $tls) 
    643584    { 
    644         eval { Net::SSLeay::write ($tls, $text); } 
     585        eval { Net::SSLeay::write ($tls, $text); }; 
     586        my $err = &Net::SSLeay::print_errs(); 
     587        if (defined $err and length $err) 
     588        { 
     589            logger ("TLS Warning in net_write: $err"); 
     590        } 
    645591    } 
    646592    else 
     
    650596} 
    651597 
    652 sub start_tls 
    653 
    654     $ctx = Net::SSLeay::CTX_new()     or die_now "CTX_new ($ctx) ($!)"; 
    655     $tls = Net::SSLeay::new($ctx)     or die_now "new ($tls) ($!)"; 
    656     Net::SSLeay::set_options($tls, &Net::SSLeay::OP_ALL) 
    657         and die_if_ssl_error("ssl set options"); 
    658  
    659     Net::SSLeay::use_RSAPrivateKey_file ($tls, '/etc/munin/munin.pem', 
    660                                          &Net::SSLeay::FILETYPE_PEM); 
    661     die_if_ssl_error("Fatal TLS error with private key."); 
    662     Net::SSLeay::use_certificate_file ($tls, '/etc/munin/munin.pem', 
    663                                        &Net::SSLeay::FILETYPE_PEM); 
    664     die_if_ssl_error("Fatal TLS error with certificate."); 
    665  
    666     print "200 TLS OK\n"; 
    667  
    668     open(TLSSTDIN, "<&".fileno(STDIN)) or die $!; 
    669     open(TLSSTDOUT, "<&".fileno(STDIN)) or die $!; 
    670     logger ("DEBUG: Encrypted filehandles (fileno = ".fileno(TLSSTDIN).", ".fileno(TLSSTDOUT).").") if $DEBUG; 
    671     close (STDIN); 
    672     close (STDOUT); 
    673     Net::SSLeay::set_rfd($tls, fileno(TLSSTDIN)); 
    674     Net::SSLeay::set_wfd($tls, fileno(TLSSTDOUT)); 
    675     Net::SSLeay::accept($tls) and die_if_ssl_error("Fatal error in TLS accept."); 
    676     logger ("Cipher `" . Net::SSLeay::get_cipher($tls) . "'\n"); 
     598sub tls_verify_callback  
     599
     600    my ($ok, $subj_cert, $issuer_cert, $depth,  
     601            $errorcode, $arg, $chain) = @_; 
     602 
     603    $tls_verified{"level"}++; 
     604 
     605    if ($ok and $tls_verified{"level"} <= $tls_verified{"required_depth"}) 
     606    { 
     607        $tls_verified{"verified"} = 1; 
     608        logger ("TLS Notice: Verified certificate.") if $DEBUG; 
     609        return 1; # accept 
     610    } 
     611 
     612    return 1; # accept anyway 
     613
     614 
     615sub start_tls  
     616
     617    my $tls_paranoia = shift; 
     618    my $tls_cert     = shift; 
     619    my $tls_priv     = shift; 
     620    my $tls_verify   = shift; 
     621    my $tls_vdepth   = shift; 
     622 
     623    my $err; 
     624    my $ctx; 
     625    my $local_key = 0; 
     626 
     627    %tls_verified = ( "level" => 0, "cert" => "", "verified" => 0, "required_depth" => $tls_vdepth ); 
     628 
     629    if ($tls_paranoia eq "disabled") 
     630    { 
     631        logger ("TLS Notice: Refusing TLS request from peer."); 
     632        net_write ("TLS NOT AVAILABLE\n"); 
     633        return 0 
     634    } 
     635 
     636    logger("Enabling TLS.") if $DEBUG; 
     637    if (! eval "require Net::SSLeay;") 
     638    { 
     639        if ($tls_paranoia eq "auto") 
     640        { 
     641            logger ("Notice: TLS requested by peer, but Net::SSLeay unavailable."); 
     642            return 0; 
     643        } 
     644        else # tls really required 
     645        { 
     646            logger ("Fatal: TLS enabled but Net::SSLeay unavailable."); 
     647            exit 0; 
     648        } 
     649    } 
     650 
     651    # Init SSLeay 
     652    Net::SSLeay::load_error_strings(); 
     653    Net::SSLeay::SSLeay_add_ssl_algorithms(); 
     654    Net::SSLeay::randomize(); 
     655    $ctx = Net::SSLeay::CTX_new(); 
     656    if (!$ctx) 
     657    { 
     658        logger ("TLS Error: Could not create SSL_CTX: " . &Net::SSLeay::print_errs()); 
     659        return 0; 
     660    } 
     661 
     662    # Tune a few things... 
     663    if (Net::SSLeay::CTX_set_options($ctx, &Net::SSLeay::OP_ALL)) 
     664    { 
     665        logger ("TLS Error: Could not set SSL_CTX options: " . &Net::SSLeay::print_errs()); 
     666        return 0; 
     667    } 
     668 
     669    # Should we use a private key? 
     670    if (-e $tls_priv or $tls_paranoia eq "paranoid") 
     671    { 
     672        if (defined $tls_priv and length $tls_priv) 
     673        { 
     674            if (!Net::SSLeay::CTX_use_PrivateKey_file($ctx, $tls_priv,  
     675                    &Net::SSLeay::FILETYPE_PEM)) 
     676            { 
     677                logger ("TLS Notice: Problem occured when trying to read file with private key \"$tls_priv\": ".&Net::SSLeay::print_errs().". Continuing without private key."); 
     678            } 
     679            else 
     680            { 
     681                $local_key = 1; 
     682            } 
     683        } 
     684    } 
     685    else 
     686    { 
     687        logger ("TLS Notice: No key file \"$tls_priv\". Continuing without private key."); 
     688    } 
     689 
     690    # How about a certificate? 
     691    if (-e $tls_cert) 
     692    { 
     693        if (defined $tls_cert and length $tls_cert) 
     694        { 
     695            if (!Net::SSLeay::CTX_use_certificate_file($ctx, $tls_cert,  
     696                    &Net::SSLeay::FILETYPE_PEM)) 
     697            { 
     698                logger ("TLS Notice: Problem occured when trying to read file with certificate \"$tls_cert\": ".&Net::SSLeay::print_errs().". Continuing without certificate."); 
     699            } 
     700        } 
     701    } 
     702    else 
     703    { 
     704        logger ("TLS Notice: No certificate file \"$tls_cert\". Continuing without certificate."); 
     705    } 
     706 
     707    # Tell the other side that we're able to talk TLS 
     708    if ($local_key) 
     709    { 
     710        print "TLS OK\n"; 
     711    } 
     712    else 
     713    { 
     714        print "TLS MAYBE\n"; 
     715    } 
     716 
     717    # Now let's define our requirements of the node 
     718    $tls_vdepth = 5 unless defined $tls_vdepth; 
     719    Net::SSLeay::CTX_set_verify_depth ($ctx, $tls_vdepth); 
     720    $err = &Net::SSLeay::print_errs(); 
     721    if (defined $err and length $err) 
     722    { 
     723        logger ("TLS Warning in set_verify_depth: $err"); 
     724    } 
     725    Net::SSLeay::CTX_set_verify ($ctx, &Net::SSLeay::VERIFY_PEER, \&tls_verify_callback); 
     726    $err = &Net::SSLeay::print_errs(); 
     727    if (defined $err and length $err) 
     728    { 
     729        logger ("TLS Warning in set_verify: $err"); 
     730    } 
     731 
     732    # Create the local tls object 
     733    if (! ($tls = Net::SSLeay::new($ctx))) 
     734    { 
     735        logger ("TLS Error: Could not create TLS: " . &Net::SSLeay::print_errs()); 
     736        return 0; 
     737    } 
     738    if ($DEBUG) 
     739    { 
     740        my $i = 0; 
     741        my $p = ''; 
     742        my $cipher_list = 'Cipher list: '; 
     743        $p=Net::SSLeay::get_cipher_list($tls,$i); 
     744        $cipher_list .= $p if $p; 
     745        do { 
     746            $i++; 
     747            $cipher_list .= ', ' . $p if $p; 
     748            $p=Net::SSLeay::get_cipher_list($tls,$i); 
     749        } while $p; 
     750        $cipher_list .= '\n'; 
     751        logger ("TLS Notice: Available cipher list: $cipher_list."); 
     752    } 
     753 
     754    # Redirect stdout/stdin to the TLS 
     755    Net::SSLeay::set_rfd($tls, fileno(STDIN)); 
     756    $err = &Net::SSLeay::print_errs(); 
     757    if (defined $err and length $err) 
     758    { 
     759        logger ("TLS Warning in set_rfd: $err"); 
     760    } 
     761    Net::SSLeay::set_wfd($tls, fileno(STDOUT)); 
     762    $err = &Net::SSLeay::print_errs(); 
     763    if (defined $err and length $err) 
     764    { 
     765        logger ("TLS Warning in set_wfd: $err"); 
     766    } 
     767 
     768    # Try to negotiate the tls connection 
     769    my $res; 
     770    if ($local_key) 
     771    { 
     772        $res = Net::SSLeay::accept($tls); 
     773    } 
     774    else 
     775    { 
     776        $res = Net::SSLeay::connect($tls); 
     777    } 
     778    $err = &Net::SSLeay::print_errs(); 
     779    if (defined $err and length $err) 
     780    { 
     781        logger ("TLS Error: Could not enable TLS: " . $err); 
     782        Net::SSLeay::free ($tls); 
     783        Net::SSLeay::CTX_free ($ctx); 
     784        $tls = undef; 
     785    } 
     786    elsif (!$tls_verified{"verified"} and $tls_paranoia eq "paranoid") 
     787    { 
     788        logger ("TLS Error: Could not verify CA: " . Net::SSLeay::dump_peer_certificate($tls)); 
     789        Net::SSLeay::free ($tls); 
     790        Net::SSLeay::CTX_free ($ctx); 
     791        $tls = undef; 
     792    } 
     793    else 
     794    { 
     795        logger ("TLS Notice: TLS enabled."); 
     796        logger ("TLS Notice: Cipher `" . Net::SSLeay::get_cipher($tls) . "'."); 
     797        $tls_verified{"cert"} = Net::SSLeay::dump_peer_certificate($tls); 
     798        logger ("TLS Notice: client cert: " .$tls_verified{"cert"}); 
     799    } 
     800 
     801    return $tls; 
    677802} 
    678803 
     
    811936            $sconf->{$service}{'env'}{"lrrd_$1"} = $2; 
    812937            net_write ("Saving $service->env->lrrd_$1 = $2...\n") if $DEBUG; 
    813            warn "Warning: Deprecated format in \"$dir/$file\" under \"[$service]\" (\"$1 $2\" should be rewritten to \"env lrrd_$1=$2\")."; 
     938            warn "Warning: Deprecated format in \"$dir/$file\" under \"[$service]\" (\"$1 $2\" should be rewritten to \"env lrrd_$1=$2\")."; 
    814939        } 
    815940        elsif (/\S/) 
     
    8901015    my $env     = shift; 
    8911016 
     1017    if (!defined $var and defined $name) 
     1018    { 
     1019        return $sconf{$name}; 
     1020    } 
    8921021    if ($var eq 'env' and !defined $env) 
    8931022    { 
     
    9041033        (my $tmpservice = $wildservice) =~ s/\*$//; 
    9051034        next unless ($name =~ /^$tmpservice/); 
    906        net_write ("Checking $wildservice...\n") if $DEBUG; 
     1035#      net_write ("# Checking $wildservice...\n") if $DEBUG; 
    9071036 
    9081037        if ($var eq 'env') 
  • people/ilmari/modularisation-branch/node/munin-run.in

    r864 r1012  
    2020# $Id$ 
    2121# 
    22 # $Log$ 
    23 # Revision 1.12  2004/12/22 21:33:48  jimmyo 
    24 # Remove hardcoding of default user/group to run the plugin (SF#1083251). 
    25 # 
    26 # Revision 1.11  2004/12/22 20:48:23  jimmyo 
    27 # Fix bug when encountering strange environment. 
    28 # 
    29 # Revision 1.10  2004/12/09 17:13:36  jimmyo 
    30 # Munin-run: Now behaves properly when running invalid plugins (SF#1074242). 
    31 # 
    32 # Revision 1.9  2004/11/20 23:34:35  jimmyo 
    33 # Updated munin-run with extra options already checked into munin-node. 
    34 # 
    35 # Revision 1.8  2004/11/20 00:07:19  jimmyo 
    36 # Handle execution problems better. 
    37 # 
    38 # Revision 1.7  2004/11/16 20:00:42  jimmyo 
    39 # License cleanups. 
    40 # 
    41 # Revision 1.6  2004/04/30 13:14:53  jimmyo 
    42 # Added support for snmpconf option in plugins. 
    43 # 
    44 # Revision 1.5  2004/01/29 19:39:00  jimmyo 
    45 # Generic plugins now use printf instead of echo -n, as this is more portable (SF#885564) 
    46 # 
    47 # Revision 1.4  2004/01/29 17:36:19  jimmyo 
    48 # Updated copyright information 
    49 # 
    50 # Revision 1.3  2004/01/29 16:56:54  jimmyo 
    51 # Fixed "group" bug. Added support for multiple and optional groups 
    52 # 
    53 # Revision 1.2  2004/01/15 15:20:01  jimmyo 
    54 # Making things workable after name change. Upping for test verwion. 
    55 # 
    56 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    57 # Renamed occurrances of lrrd -> munin 
    58 # 
    59 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    60 # Import of LRRD CVS tree after renaming to Munin 
    61 # 
    62 # Revision 1.16  2003/12/18 18:51:37  jimmyo 
    63 # added configuration option "ignore_file", which takes regex for files to ignore (e.g. rpmnew/save) (Deb#224265). 
    64 # 
    65 # Revision 1.15  2003/12/18 17:58:18  jimmyo 
    66 # Do a fake clean of the environment because of the taint checking. 
    67 # 
    68 # Revision 1.14  2003/12/17 21:29:26  jimmyo 
    69 # Don\'t try to change uid/gid if not running as root. (Deb#224300) 
    70 # 
    71 # Revision 1.13  2003/12/10 15:30:02  jimmyo 
    72 # Set path before trying to get hostname 
    73 # 
    74 # Revision 1.12  2003/12/10 15:11:40  jimmyo 
    75 # A couple of bugfixes. 
    76 # 
    77 # Revision 1.11  2003/11/07 17:43:16  jimmyo 
    78 # Cleanups and log entries 
    79 # 
    80 # 
    8122 
    8223use strict; 
     
    187128if ($do_version) 
    188129{ 
    189         print "munin-run (munin-node) version $VERSION. 
     130        print <<"EOT"; 
     131munin-run (munin-node) version $VERSION. 
    190132Written by Jimmy Olsen / Linpro AS 
    191133 
    192 Copyright (C) 2002-2004 
    193 This is free software released under the GNU Public License. There is NO 
    194 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
    195 "; 
     134Copyright (C) 2002-2005 
     135 
     136This is free software released under the GNU General Public License. There 
     137is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR 
     138PURPOSE. For details, please refer to the file COPYING that is included 
     139with this software or refer to 
     140  http://www.fsf.org/licensing/licenses/gpl.txt 
     141EOT 
    196142        exit 0; 
    197143} 
  • people/ilmari/modularisation-branch/node/node.d.aix/cpu.in

    r864 r1012  
    33# Developed 05/28/2003 by Mike Discenza 
    44# mike.discenza@dillards.com 
    5 # 
    6 # $Log$ 
    7 # Revision 1.2  2004/02/18 16:39:35  jimmyo 
    8 # Turned off scaling of values for cpu-graphs (no more nano-percentages). 
    9 # 
    10 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    11 # Renamed occurrances of lrrd -> munin 
    12 # 
    13 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    14 # Import of LRRD CVS tree after renaming to Munin 
    15 # 
    16 # Revision 1.2  2003/11/07 17:43:16  jimmyo 
    17 # Cleanups and log entries 
    18 # 
    195# 
    206# Plugin to monitor CPU usage on AIX (4.3.3 and 5.x). 
  • people/ilmari/modularisation-branch/node/node.d.aix/df.in

    r864 r1012  
    22# 
    33# Script to monitor disk usage. 
    4 # 
    5 # $Log$ 
    6 # Revision 1.2  2004/05/18 22:04:29  jimmyo 
    7 # Use "sed 1d" instead of "tail +2" in df plugins (patch by Olivier Delhomme). 
    8 # 
    9 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    10 # Renamed occurrances of lrrd -> munin 
    11 # 
    12 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    13 # Import of LRRD CVS tree after renaming to Munin 
    14 # 
    15 # Revision 1.2  2003/11/07 17:43:16  jimmyo 
    16 # Cleanups and log entries 
    17 # 
    18 # 
    194# 
    205#   DESCRIPTION 
  • people/ilmari/modularisation-branch/node/node.d.aix/iostat.hd_only.in

    r864 r1012  
    11#!@@PERL@@ -w 
    2 # 
    3 # $Log$ 
    4 # Revision 1.4  2004/12/10 18:51:43  jimmyo 
    5 # linux/apt* has been forced to LANG=C, to get predictable output. 
    6 # 
    7 # Revision 1.3  2004/12/10 10:47:48  jimmyo 
    8 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    9 # 
    10 # Revision 1.2  2004/12/09 22:12:55  jimmyo 
    11 # Added "graph_period" option, to make "graph_sums" usable. 
    12 # 
    13 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    14 # Renamed occurrances of lrrd -> munin 
    15 # 
    16 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    17 # Import of LRRD CVS tree after renaming to Munin 
    18 # 
    19 # Revision 1.2  2003/11/07 17:43:16  jimmyo 
    20 # Cleanups and log entries 
    21 # 
    22 # 
    232# 
    243# Plugin for watching io-bound traffic (in KiloBytes) on disks. 
  • people/ilmari/modularisation-branch/node/node.d.aix/iostat.in

    r864 r1012  
    11#!@@PERL@@ -w 
    2 # 
    3 # $Log$ 
    4 # Revision 1.4  2004/12/10 18:51:43  jimmyo 
    5 # linux/apt* has been forced to LANG=C, to get predictable output. 
    6 # 
    7 # Revision 1.3  2004/12/10 10:47:49  jimmyo 
    8 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    9 # 
    10 # Revision 1.2  2004/12/09 22:12:55  jimmyo 
    11 # Added "graph_period" option, to make "graph_sums" usable. 
    12 # 
    13 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    14 # Renamed occurrances of lrrd -> munin 
    15 # 
    16 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    17 # Import of LRRD CVS tree after renaming to Munin 
    18 # 
    19 # Revision 1.2  2003/11/07 17:43:16  jimmyo 
    20 # Cleanups and log entries 
    21 # 
    22 # 
    232# 
    243# Plugin for watching io-bound traffic (in KiloBytes) on disks. 
  • people/ilmari/modularisation-branch/node/node.d.aix/iostat.vp_only.in

    r864 r1012  
    11#!@@PERL@@ -w 
    2 # 
    3 # $Log$ 
    4 # Revision 1.4  2004/12/10 18:51:43  jimmyo 
    5 # linux/apt* has been forced to LANG=C, to get predictable output. 
    6 # 
    7 # Revision 1.3  2004/12/10 10:47:49  jimmyo 
    8 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    9 # 
    10 # Revision 1.2  2004/12/09 22:12:55  jimmyo 
    11 # Added "graph_period" option, to make "graph_sums" usable. 
    12 # 
    13 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    14 # Renamed occurrances of lrrd -> munin 
    15 # 
    16 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    17 # Import of LRRD CVS tree after renaming to Munin 
    18 # 
    19 # Revision 1.2  2003/11/07 17:43:16  jimmyo 
    20 # Cleanups and log entries 
    21 # 
    22 # 
    232# 
    243# Plugin for watching io-bound traffic (in KiloBytes) on disks. 
  • people/ilmari/modularisation-branch/node/node.d.aix/memory.in

    r864 r1012  
    33# Developed 05/28/2003 by Mike Discenza 
    44# mike.discenza@dillards.com 
    5 # 
    6 # $Log$ 
    7 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    8 # Renamed occurrances of lrrd -> munin 
    9 # 
    10 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    11 # Import of LRRD CVS tree after renaming to Munin 
    12 # 
    13 # Revision 1.2  2003/11/07 17:43:16  jimmyo 
    14 # Cleanups and log entries 
    15 # 
    16 # 
    175# 
    186#Important Note: 
  • people/ilmari/modularisation-branch/node/node.d.aix/netstat.in

    r864 r1012  
    1414#      None known.  /usr/bin/netstat should be executable by everyone by 
    1515#      default. 
    16 # 
    17 # $Log$ 
    18 # Revision 1.4  2004/12/10 18:51:43  jimmyo 
    19 # linux/apt* has been forced to LANG=C, to get predictable output. 
    20 # 
    21 # Revision 1.3  2004/12/10 10:47:49  jimmyo 
    22 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    23 # 
    24 # Revision 1.2  2004/12/09 22:12:55  jimmyo 
    25 # Added "graph_period" option, to make "graph_sums" usable. 
    26 # 
    27 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    28 # Renamed occurrances of lrrd -> munin 
    29 # 
    30 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    31 # Import of LRRD CVS tree after renaming to Munin 
    32 # 
    33 # Revision 1.2  2003/11/07 17:43:16  jimmyo 
    34 # Cleanups and log entries 
    35 # 
    36 # 
    3716# 
    3817# Parameters: 
  • people/ilmari/modularisation-branch/node/node.d.aix/processes.in

    r864 r1012  
    1919# be graphed as well.  This can be useful for watching how many processes 
    2020# of a particular type are running. 
    21 # 
    22 # $Log$ 
    23 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    24 # Renamed occurrances of lrrd -> munin 
    25 # 
    26 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    27 # Import of LRRD CVS tree after renaming to Munin 
    28 # 
    29 # Revision 1.2  2003/11/07 17:43:16  jimmyo 
    30 # Cleanups and log entries 
    31 # 
    32 # 
    3321# 
    3422# Parameters: 
  • people/ilmari/modularisation-branch/node/node.d.aix/swap.in

    r864 r1012  
    33# Developed 05/28/2003 by Mike Discenza 
    44# mike.discenza@dillards.com 
    5 # 
    6 # $Log$ 
    7 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    8 # Renamed occurrances of lrrd -> munin 
    9 # 
    10 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    11 # Import of LRRD CVS tree after renaming to Munin 
    12 # 
    13 # Revision 1.2  2003/11/07 17:43:16  jimmyo 
    14 # Cleanups and log entries 
    15 # 
    16 # 
    17 # 
    185# 
    196# Plugin to monitor memory usage on AIX. 
  • people/ilmari/modularisation-branch/node/node.d.freebsd/cpu.in

    r864 r1012  
    99#       config   (required) 
    1010#       autoconf (optional - used by munin-config) 
    11 # 
    12 # $Log$ 
    13 # Revision 1.11  2005/01/28 16:34:15  lupe 
    14 # Minor corrections 
    15 # 
    16 # Revision 1.10  2005/01/28 14:47:31  lupe 
    17 # Add graph_info and some filed.info 
    18 # 
    19 # Revision 1.9  2005/01/25 08:48:28  lupe 
    20 # Correct multi-CPU bugs 
    21 # 
    22 # Revision 1.8  2004/12/09 22:12:55  jimmyo 
    23 # Added "graph_period" option, to make "graph_sums" usable. 
    24 # 
    25 # Revision 1.7  2004/11/28 09:43:54  lupe 
    26 # 6-CURRENT support 
    27 # 
    28 # Revision 1.6  2004/11/21 00:16:56  jimmyo 
    29 # Changed a lot of plugins so they use DERIVE instead of COUNTER. 
    30 # 
    31 # Revision 1.5  2004/05/20 19:02:36  jimmyo 
    32 # Set categories on a bunch of plugins 
    33 # 
    34 # Revision 1.4  2004/05/09 19:18:35  jimmyo 
    35 # Added support for scaleto100-parameter (patch from Lupe Christoph). 
    36 # 
    37 # Revision 1.3  2004/02/18 16:39:36  jimmyo 
    38 # Turned off scaling of values for cpu-graphs (no more nano-percentages). 
    39 # 
    40 # Revision 1.2  2004/02/01 18:59:54  lupe 
    41 # FreeBSD 5 compatibility. 
    42 # 
    43 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    44 # Renamed occurrances of lrrd -> munin 
    45 # 
    46 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    47 # Import of LRRD CVS tree after renaming to Munin 
    48 # 
    49 # Revision 1.3  2003/11/07 17:43:16  jimmyo 
    50 # Cleanups and log entries 
    51 # 
    52 # 
    5311# 
    5412# Magic markers - optional - used by installation scripts and 
  • people/ilmari/modularisation-branch/node/node.d.freebsd/df.in

    r864 r1012  
    77#       config   (required) 
    88#       autoconf (optional - used by munin-config) 
    9 # 
    10 # $Log$ 
    11 # Revision 1.7  2005/01/28 16:19:17  lupe 
    12 # Minor corrections 
    13 # 
    14 # Revision 1.6  2005/01/28 14:47:31  lupe 
    15 # Add graph_info and some filed.info 
    16 # 
    17 # Revision 1.5  2005/01/28 13:25:34  lupe 
    18 # Add support for FreeBSD 4.x ramdisks 
    19 # 
    20 # Revision 1.4  2004/05/20 19:02:36  jimmyo 
    21 # Set categories on a bunch of plugins 
    22 # 
    23 # Revision 1.3  2004/05/18 22:04:30  jimmyo 
    24 # Use "sed 1d" instead of "tail +2" in df plugins (patch by Olivier Delhomme). 
    25 # 
    26 # Revision 1.2.2.1  2005/01/25 10:32:40  lupe 
    27 # Add support for FreeBSD 4.x ramdisks 
    28 # 
    29 # Revision 1.2  2004/02/01 19:00:29  lupe 
    30 # Ignore devfs,fdescfs,linprocfs in addition to procfs,nfs. 
    31 # 
    32 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    33 # Renamed occurrances of lrrd -> munin 
    34 # 
    35 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    36 # Import of LRRD CVS tree after renaming to Munin 
    37 # 
    38 # Revision 1.3  2003/11/07 17:43:16  jimmyo 
    39 # Cleanups and log entries 
    40 # 
    41 # 
    429# 
    4310# Magic markers (optional - used by munin-config and installation 
  • people/ilmari/modularisation-branch/node/node.d.freebsd/df_inode.in

    r864 r1012  
    77#       config   (required) 
    88#       autoconf (optional - used by munin-config) 
    9 # 
    10 # $Log$ 
    11 # Revision 1.8  2005/02/03 13:28:10  lupe 
    12 # correct field.info 
    13 # 
    14 # Revision 1.7  2005/01/28 16:19:17  lupe 
    15 # Minor corrections 
    16 # 
    17 # Revision 1.6  2005/01/28 14:47:31  lupe 
    18 # Add graph_info and some filed.info 
    19 # 
    20 # Revision 1.5  2005/01/28 13:25:34  lupe 
    21 # Add support for FreeBSD 4.x ramdisks 
    22 # 
    23 # Revision 1.4  2004/05/20 19:02:36  jimmyo 
    24 # Set categories on a bunch of plugins 
    25 # 
    26 # Revision 1.3  2004/05/18 22:04:30  jimmyo 
    27 # Use "sed 1d" instead of "tail +2" in df plugins (patch by Olivier Delhomme). 
    28 # 
    29 # Revision 1.2.2.1  2005/01/25 10:32:40  lupe 
    30 # Add support for FreeBSD 4.x ramdisks 
    31 # 
    32 # Revision 1.2  2004/02/01 19:00:29  lupe 
    33 # Ignore devfs,fdescfs,linprocfs in addition to procfs,nfs. 
    34 # 
    35 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    36 # Renamed occurrances of lrrd -> munin 
    37 # 
    38 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    39 # Import of LRRD CVS tree after renaming to Munin 
    40 # 
    41 # Revision 1.3  2003/11/07 17:43:16  jimmyo 
    42 # Cleanups and log entries 
    43 # 
    44 # 
    459# 
    4610# Magic markers (optional - used by munin-config and installation 
  • people/ilmari/modularisation-branch/node/node.d.freebsd/if_.in

    r864 r1012  
    99# 
    1010# Any device found in /usr/bin/netstat can be monitored. 
    11 # 
    12 # $Log$ 
    13 # Revision 1.7  2005/02/17 11:09:05  lupe 
    14 # Added warning note in if_ output. 
    15 # 
    16 # Revision 1.6  2005/01/28 16:19:16  lupe 
    17 # Minor corrections 
    18 # 
    19 # Revision 1.5  2005/01/28 14:47:31  lupe 
    20 # Add graph_info and some filed.info 
    21 # 
    22 # Revision 1.4  2004/12/10 10:47:49  jimmyo 
    23 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    24 # 
    25 # Revision 1.3  2004/12/09 22:12:55  jimmyo 
    26 # Added "graph_period" option, to make "graph_sums" usable. 
    27 # 
    28 # Revision 1.2  2004/05/20 19:02:36  jimmyo 
    29 # Set categories on a bunch of plugins 
    30 # 
    31 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    32 # Renamed occurrances of lrrd -> munin 
    33 # 
    34 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    35 # Import of LRRD CVS tree after renaming to Munin 
    36 # 
    37 # Revision 1.3  2003/11/07 22:12:50  jimmyo 
    38 # Changed deprecated plugin options 
    39 # 
    40 # Revision 1.2  2003/11/07 17:43:16  jimmyo 
    41 # Cleanups and log entries 
    42 # 
    43 # 
    4411# 
    4512# Magic markers (optional - used by munin-config and some installation 
     
    9360/usr/bin/netstat -i -b -I $INTERFACE | awk ' 
    9461/<Link#[0-9]*>/ { 
    95         print "rbytes.value", $7; 
    96         print "obytes.value", $10; 
     62        if (NF == 10) {  
     63                print "rbytes.value", $6; 
     64                print "obytes.value", $9; 
     65        } else { 
     66                print "rbytes.value", $7; 
     67                print "obytes.value", $10; 
     68        } 
    9769}' 
  • people/ilmari/modularisation-branch/node/node.d.freebsd/if_errcoll_.in

    r864 r1012  
    99# 
    1010# Any device found in /usr/bin/netstat can be monitored. 
    11 # 
    12 # $Log$ 
    13 # Revision 1.5  2005/01/28 14:47:31  lupe 
    14 # Add graph_info and some filed.info 
    15 # 
    16 # Revision 1.4  2004/12/10 10:47:49  jimmyo 
    17 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    18 # 
    19 # Revision 1.3  2004/12/09 22:12:55  jimmyo 
    20 # Added "graph_period" option, to make "graph_sums" usable. 
    21 # 
    22 # Revision 1.2  2004/05/20 19:02:36  jimmyo 
    23 # Set categories on a bunch of plugins 
    24 # 
    25 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    26 # Renamed occurrances of lrrd -> munin 
    27 # 
    28 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    29 # Import of LRRD CVS tree after renaming to Munin 
    30 # 
    31 # Revision 1.2  2003/11/07 17:43:16  jimmyo 
    32 # Cleanups and log entries 
    33 # 
    34 # 
    3511# 
    3612# Magic markers (optional - used by munin-config and some installation 
     
    8056/usr/bin/netstat -i -b -I $INTERFACE | awk ' 
    8157/<Link#[0-9]*>/ { 
    82         print "ierrors.value", $6; 
    83         print "oerrors.value", $9; 
    84         print "collisions.value", $11; 
     58        if (NF == 10) { 
     59                print "ierrors.value", $5; 
     60                print "oerrors.value", $8; 
     61                print "collisions.value", $10; 
     62        } else { 
     63                print "ierrors.value", $6; 
     64                print "oerrors.value", $9; 
     65                print "collisions.value", $11; 
     66        } 
    8567}' 
  • people/ilmari/modularisation-branch/node/node.d.freebsd/load.in

    r864 r1012  
    77# Magic markers (optional - only used by munin-config and some 
    88# installation scripts): 
    9 # 
    10 # $Log$ 
    11 # Revision 1.4  2005/01/28 14:47:31  lupe 
    12 # Add graph_info and some filed.info 
    13 # 
    14 # Revision 1.3  2004/05/20 19:02:36  jimmyo 
    15 # Set categories on a bunch of plugins 
    16 # 
    17 # Revision 1.2  2004/01/15 16:58:10  jimmyo 
    18 # FreeBSD-plugin load bugfix from Robert Lindgren (SF#865928). 
    19 # 
    20 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    21 # Renamed occurrances of lrrd -> munin 
    22 # 
    23 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    24 # Import of LRRD CVS tree after renaming to Munin 
    25 # 
    26 # Revision 1.3  2003/11/07 17:43:16  jimmyo 
    27 # Cleanups and log entries 
    28 # 
    29 # 
    309# 
    3110#%# family=auto 
  • people/ilmari/modularisation-branch/node/node.d.freebsd/memory.in

    r864 r1012  
    77#       config   (required) 
    88#       autoconf (optional - only used by munin-config) 
    9 # 
    10 # $Log$ 
    11 # Revision 1.3  2005/01/28 14:47:31  lupe 
    12 # Add graph_info and some filed.info 
    13 # 
    14 # Revision 1.2  2004/05/20 19:02:36  jimmyo 
    15 # Set categories on a bunch of plugins 
    16 # 
    17 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    18 # Renamed occurrances of lrrd -> munin 
    19 # 
    20 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    21 # Import of LRRD CVS tree after renaming to Munin 
    22 # 
    23 # Revision 1.3  2003/11/07 17:43:16  jimmyo 
    24 # Cleanups and log entries 
    25 # 
    26 # 
    279# 
    2810# Magic markers (optional - only used by munin-config and some 
  • people/ilmari/modularisation-branch/node/node.d.freebsd/netstat.in

    r864 r1012  
    77#       config   (required) 
    88#       autoconf (optional - only used by munin-config) 
    9 # 
    10 # $Log$ 
    11 # Revision 1.6  2005/01/28 14:47:31  lupe 
    12 # Add graph_info and some filed.info 
    13 # 
    14 # Revision 1.5  2004/12/10 10:47:49  jimmyo 
    15 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    16 # 
    17 # Revision 1.4  2004/12/09 22:12:55  jimmyo 
    18 # Added "graph_period" option, to make "graph_sums" usable. 
    19 # 
    20 # Revision 1.3  2004/11/21 00:16:56  jimmyo 
    21 # Changed a lot of plugins so they use DERIVE instead of COUNTER. 
    22 # 
    23 # Revision 1.2  2004/05/20 19:02:36  jimmyo 
    24 # Set categories on a bunch of plugins 
    25 # 
    26 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    27 # Renamed occurrances of lrrd -> munin 
    28 # 
    29 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    30 # Import of LRRD CVS tree after renaming to Munin 
    31 # 
    32 # Revision 1.3  2003/11/07 17:43:16  jimmyo 
    33 # Cleanups and log entries 
    34 # 
    35 # 
    369# 
    3710# Magic markers (optional - used by munin-config and some installation 
  • people/ilmari/modularisation-branch/node/node.d.freebsd/open_files.in

    r864 r1012  
    77#       config   (required) 
    88#       autoconf (optional - used by munin-config) 
    9 # 
    10 # $Log$ 
    11 # Revision 1.3  2005/01/28 14:47:31  lupe 
    12 # Add graph_info and some filed.info 
    13 # 
    14 # Revision 1.2  2004/05/20 19:02:36  jimmyo 
    15 # Set categories on a bunch of plugins 
    16 # 
    17 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    18 # Renamed occurrances of lrrd -> munin 
    19 # 
    20 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    21 # Import of LRRD CVS tree after renaming to Munin 
    22 # 
    23 # Revision 1.3  2003/11/07 17:43:16  jimmyo 
    24 # Cleanups and log entries 
    25 # 
    26 # 
    279# 
    2810# Magic markers (Used by munin-config and some installation scripts. 
  • people/ilmari/modularisation-branch/node/node.d.freebsd/processes.in

    r864 r1012  
    88#       config   (required) 
    99#       autoconf (optional - used by munin-config) 
    10 # 
    11 # $Log$ 
    12 # Revision 1.3  2005/01/28 14:47:31  lupe 
    13 # Add graph_info and some filed.info 
    14 # 
    15 # Revision 1.2  2004/05/20 19:02:36  jimmyo 
    16 # Set categories on a bunch of plugins 
    17 # 
    18 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    19 # Renamed occurrances of lrrd -> munin 
    20 # 
    21 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    22 # Import of LRRD CVS tree after renaming to Munin 
    23 # 
    24 # Revision 1.2  2003/11/07 17:43:16  jimmyo 
    25 # Cleanups and log entries 
    26 # 
    27 # 
    2810# 
    2911# Magick markers (optional - used by munin-config and som installation 
  • people/ilmari/modularisation-branch/node/node.d.freebsd/swap.in

    r864 r1012  
    77#       config   (required) 
    88#       autoconf (optional - used by munin-config) 
    9 # 
    10 # $Log$ 
    11 # Revision 1.7  2005/01/28 16:19:16  lupe 
    12 # Minor corrections 
    13 # 
    14 # Revision 1.6  2005/01/28 14:47:31  lupe 
    15 # Add graph_info and some filed.info 
    16 # 
    17 # Revision 1.5  2004/12/10 10:47:49  jimmyo 
    18 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    19 # 
    20 # Revision 1.4  2004/12/09 22:12:56  jimmyo 
    21 # Added "graph_period" option, to make "graph_sums" usable. 
    22 # 
    23 # Revision 1.3  2004/11/21 00:16:56  jimmyo 
    24 # Changed a lot of plugins so they use DERIVE instead of COUNTER. 
    25 # 
    26 # Revision 1.2  2004/05/20 19:02:36  jimmyo 
    27 # Set categories on a bunch of plugins 
    28 # 
    29 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    30 # Renamed occurrances of lrrd -> munin 
    31 # 
    32 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    33 # Import of LRRD CVS tree after renaming to Munin 
    34 # 
    35 # Revision 1.4  2003/11/07 22:12:50  jimmyo 
    36 # Changed deprecated plugin options 
    37 # 
    38 # Revision 1.3  2003/11/07 17:43:16  jimmyo 
    39 # Cleanups and log entries 
    40 # 
    41 # 
    429# 
    4310# Magic markers (used by munin-config and some installation scripts (i.e. 
  • people/ilmari/modularisation-branch/node/node.d.freebsd/vmstat.in

    r864 r1012  
    88#       config   (required) 
    99#       autoconf (optional - used by munin-config) 
    10 # 
    11 # $Log$ 
    12 # Revision 1.5  2005/01/28 14:47:31  lupe 
    13 # Add graph_info and some filed.info 
    14 # 
    15 # Revision 1.4  2004/11/28 09:43:54  lupe 
    16 # 6-CURRENT support 
    17 # 
    18 # Revision 1.3  2004/05/20 19:02:36  jimmyo 
    19 # Set categories on a bunch of plugins 
    20 # 
    21 # Revision 1.2  2004/02/01 18:59:54  lupe 
    22 # FreeBSD 5 compatibility. 
    23 # 
    24 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    25 # Renamed occurrances of lrrd -> munin 
    26 # 
    27 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    28 # Import of LRRD CVS tree after renaming to Munin 
    29 # 
    30 # Revision 1.2  2003/11/07 17:43:16  jimmyo 
    31 # Cleanups and log entries 
    32 # 
    33 # 
    3410# 
    3511# Magick markers (optional): 
  • people/ilmari/modularisation-branch/node/node.d.linux/apt.in

    r864 r1012  
    2525#               update.  Otherwise, there is a a 1 in <probability> 
    2626#               chance that an update will occur. 
    27 # 
    28 # $Log$ 
    29 # Revision 1.4  2004/12/10 18:51:44  jimmyo 
    30 # linux/apt* has been forced to LANG=C, to get predictable output. 
    31 # 
    32 # Revision 1.3  2004/11/26 15:16:42  jimmyo 
    33 # Force plugin linux/apt to use C locale (SF#1072470). 
    34 # 
    35 # Revision 1.2  2004/11/04 19:07:01  jimmyo 
    36 # Adapt linux/apt plugin to work properly with Debian testing/unstable 
    37 # (patch from Rune N. Skillingstad). 
    38 # 
    39 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    40 # Renamed occurrances of lrrd -> munin 
    41 # 
    42 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    43 # Import of LRRD CVS tree after renaming to Munin 
    44 # 
    45 # Revision 1.3  2003/11/07 17:43:16  jimmyo 
    46 # Cleanups and log entries 
    47 # 
    48 # 
    4927# 
    5028# Magic markers - optional - used by installation scripts and 
  • people/ilmari/modularisation-branch/node/node.d.linux/apt_all.in

    r864 r1012  
    3030#               chance that an update will occur. 
    3131# 
    32 # $Log$ 
    33 # Revision 1.2  2004/12/10 18:51:44  jimmyo 
    34 # linux/apt* has been forced to LANG=C, to get predictable output. 
    35 # 
    36 # Revision 1.1  2004/10/19 16:57:15  jimmyo 
    37 # Added new plugin linux/apt_all, contributed by xavier. 
    38 # 
    39 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    40 # Renamed occurrances of lrrd -> munin 
    41 # 
    42 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    43 # Import of LRRD CVS tree after renaming to Munin 
    44 # 
    45 # Revision 1.3  2003/11/07 17:43:16  jimmyo 
    46 # Cleanups and log entries 
    47 # 
    48 # 
    49 # 
    5032# Magic markers - optional - used by installation scripts and 
    5133# munin-config: 
     
    6143$ENV{'LC_ALL'}="C"; 
    6244 
    63 my $statefile = "/var/lib/munin/plugin-state/plugin-apt.state"; 
    64 my @releases = ("testing","unstable"); 
    65  
     45my $statefile = "@@PLUGSTATE@@/plugin-apt.state"; 
     46my @releases = ("stable", "testing","unstable"); 
     47 
     48 
     49sub print_state() { 
     50        if(-l $statefile) { 
     51                die("$statefile is a symbolic link, refusing to read it."); 
     52        } 
     53        if (! -e "$statefile") { 
     54            update_state (); 
     55        } 
     56        if (! -e "$statefile") { 
     57            die ("$statefile does not exist. Something wicked happened."); 
     58        } 
     59        open(STATE, "$statefile") 
     60                or die("Couldn't open state file $statefile for reading."); 
     61        print while <STATE>; 
     62        close STATE; 
     63
    6664 
    6765sub update_state() { 
     
    7169        open(STATE, ">$statefile") 
    7270                or die("Couldn't open state file $statefile for writing."); 
    73         print STATE "Last update: " . localtime() . "\n"; 
     71        foreach my $release (@releases) { 
     72            my $apt="apt-get -u dist-upgrade --print-uris --yes -t $release |"; 
     73            open (APT, "$apt") or exit 22; 
     74 
     75            my @pending = (); 
     76            my $hold    = 0; 
     77            my @remove  = (); 
     78            my @install = (); 
     79 
     80            while (<APT>) 
     81            { 
     82                    if (/^The following packages will be REMOVED:/) 
     83                    { 
     84                            my $where = 0; 
     85                            while (<APT>) 
     86                            { 
     87                                    last if (/^\S/); 
     88                                    foreach my $package (split /\s+/) 
     89                                    { 
     90                                            next unless ($package =~ /\S/); 
     91                                            push (@remove, "-$package"); 
     92                                    } 
     93                            } 
     94                    } 
     95                    if (/^The following NEW packages will be installed:/) 
     96                    { 
     97                            my $where = 0; 
     98                            while (<APT>) 
     99                            { 
     100                                    last if (/^\S/); 
     101                                    foreach my $package (split /\s+/) 
     102                                    { 
     103                                            next unless ($package =~ /\S/); 
     104                                            push (@install, "+$package"); 
     105                                    } 
     106                            } 
     107                    } 
     108                    if (/^The following packages will be upgraded/) 
     109                    { 
     110                            my $where = 0; 
     111                            while (<APT>) 
     112                            { 
     113                                    last if (/^\S/); 
     114                                    foreach my $package (split /\s+/) 
     115                                    { 
     116                                            next unless ($package =~ /\S/); 
     117                                            push (@pending, $package); 
     118                                    } 
     119                            } 
     120                    } 
     121                    if (/^\d+\spackages upgraded,\s\d+\snewly installed, \d+ to remove and (\d+)  not upgraded/) 
     122                    { 
     123                            $hold = $1; 
     124                    } 
     125            } 
     126 
     127            push (@pending, @install) if @install; 
     128            push (@pending, @remove ) if @remove; 
     129            close APT; 
     130 
     131            print STATE "pending_$release.value ", scalar (@pending), "\n"; 
     132            if (@pending) 
     133            { 
     134                    print STATE "pending_$release.extinfo ", join (' ', @pending), "\n"; 
     135            } 
     136            print STATE "hold_$release.value $hold\n"; 
     137 
     138        } 
    74139        close(STATE); 
    75140} 
     
    141206} 
    142207 
    143  
    144 foreach my $release (@releases) { 
    145     my $apt="apt-get -u dist-upgrade --print-uris --yes -t $release |"; 
    146 open (APT, "$apt") or exit 22; 
    147  
    148 my @pending = (); 
    149 my $hold    = 0; 
    150 my @remove  = (); 
    151 my @install = (); 
    152  
    153 while (<APT>) 
    154 
    155         if (/^The following packages will be REMOVED:/) 
    156         { 
    157                 my $where = 0; 
    158                 while (<APT>) 
    159                 { 
    160                         last if (/^\S/); 
    161                         foreach my $package (split /\s+/) 
    162                         { 
    163                                 next unless ($package =~ /\S/); 
    164                                 push (@remove, "-$package"); 
    165                         } 
    166                 } 
    167         } 
    168         if (/^The following NEW packages will be installed:/) 
    169         { 
    170                 my $where = 0; 
    171                 while (<APT>) 
    172                 { 
    173                         last if (/^\S/); 
    174                         foreach my $package (split /\s+/) 
    175                         { 
    176                                 next unless ($package =~ /\S/); 
    177                                 push (@install, "+$package"); 
    178                         } 
    179                 } 
    180         } 
    181         if (/^The following packages will be upgraded/) 
    182         { 
    183                 my $where = 0; 
    184                 while (<APT>) 
    185                 { 
    186                         last if (/^\S/); 
    187                         foreach my $package (split /\s+/) 
    188                         { 
    189                                 next unless ($package =~ /\S/); 
    190                                 push (@pending, $package); 
    191                         } 
    192                 } 
    193         } 
    194         if (/^\d+\spackages upgraded,\s\d+\snewly installed, \d+ to remove and (\d+)  not upgraded/) 
    195         { 
    196                 $hold = $1; 
    197         } 
    198 
    199  
    200 push (@pending, @install) if @install; 
    201 push (@pending, @remove ) if @remove; 
    202 close APT; 
    203  
    204 print "pending_$release.value ", scalar (@pending), "\n"; 
    205 if (@pending) 
    206 
    207         print "pending_$release.extinfo ", join (' ', @pending), "\n"; 
    208 
    209 print "hold_$release.value $hold\n"; 
    210  
    211 
     208print_state (); 
     209 
    212210exit 0; 
    213211 
  • people/ilmari/modularisation-branch/node/node.d.linux/cps_.in

    r864 r1012  
    2121#       autoconf (optional - used by munin-config) 
    2222#       suggest  (optional - used by munin-config) 
    23 # 
    24 # $Log$ 
    25 # Revision 1.8  2004/12/10 18:55:14  jimmyo 
    26 # Removed hardcoded host_name in linux/cps_. 
    27 # 
    28 # Revision 1.7  2004/12/10 18:51:44  jimmyo 
    29 # linux/apt* has been forced to LANG=C, to get predictable output. 
    30 # 
    31 # Revision 1.6  2004/12/10 11:48:42  jimmyo 
    32 # linux/cps_ plugin now groks high numbers. 
    33 # 
    34 # Revision 1.5  2004/12/10 10:47:49  jimmyo 
    35 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    36 # 
    37 # Revision 1.4  2004/12/09 22:12:56  jimmyo 
    38 # Added "graph_period" option, to make "graph_sums" usable. 
    39 # 
    40 # Revision 1.3  2004/11/21 00:16:57  jimmyo 
    41 # Changed a lot of plugins so they use DERIVE instead of COUNTER. 
    42 # 
    43 # Revision 1.2  2004/05/20 19:02:37  jimmyo 
    44 # Set categories on a bunch of plugins 
    45 # 
    46 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    47 # Renamed occurrances of lrrd -> munin 
    48 # 
    49 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    50 # Import of LRRD CVS tree after renaming to Munin 
    51 # 
    52 # Revision 1.4  2003/11/07 17:43:16  jimmyo 
    53 # Cleanups and log entries 
    54 # 
    55 # 
    5623# 
    5724# Magic markers - optional - used by installation scripts and munin-config: 
  • people/ilmari/modularisation-branch/node/node.d.linux/cpu.in

    r864 r1012  
    99#       config   (required) 
    1010#       autoconf (optional - used by munin-config) 
    11 # 
    12 # $Log$ 
    13 # Revision 1.8  2004/12/09 22:12:56  jimmyo 
    14 # Added "graph_period" option, to make "graph_sums" usable. 
    15 # 
    16 # Revision 1.7  2004/11/21 00:17:12  jimmyo 
    17 # Changed a lot of plugins so they use DERIVE instead of COUNTER. 
    18 # 
    19 # Revision 1.6  2004/05/20 13:57:12  jimmyo 
    20 # Set categories to some of the plugins. 
    21 # 
    22 # Revision 1.5  2004/05/16 12:34:26  jimmyo 
    23 # Added "info"-fields to linux/cpu and linux/load plugins, to demonstrate how it works. 
    24 # 
    25 # Revision 1.4  2004/05/06 21:39:54  jimmyo 
    26 # Added plugin acpi, contributed by Alexandre Dupouy. 
    27 # 
    28 # Revision 1.3  2004/02/18 16:39:36  jimmyo 
    29 # Turned off scaling of values for cpu-graphs (no more nano-percentages). 
    30 # 
    31 # Revision 1.2  2004/01/31 19:56:37  jimmyo 
    32 # Linux/cpu now graphs all values on a 2.6 kernel (Deb#227946). 
    33 # 
    34 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    35 # Renamed occurrances of lrrd -> munin 
    36 # 
    37 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    38 # Import of LRRD CVS tree after renaming to Munin 
    39 # 
    40 # Revision 1.2  2003/11/07 17:43:16  jimmyo 
    41 # Cleanups and log entries 
    42 # 
    43 # 
    4411# 
    4512# Magic markers - optional - used by installation scripts and 
  • people/ilmari/modularisation-branch/node/node.d.linux/df.in

    r864 r1012  
    77#       config   (required) 
    88#       autoconf (optional - used by munin-config) 
    9 # 
    10 # $Log$ 
    11 # Revision 1.9  2005/03/12 21:33:02  jimmyo 
    12 # Correct fieldname-generation logic. 
    13 # 
    14 # Revision 1.8  2005/03/10 10:07:54  jimmyo 
    15 # Fixed minor bug introduced with yesterdays change. 
    16 # 
    17 # Revision 1.7  2005/03/09 19:09:13  jimmyo 
    18 # Made linux/df work properly with tmpfs and devmapper (Deb#298442) 
    19 # 
    20 # Revision 1.6  2005/02/16 22:48:56  jimmyo 
    21 # linux/df* now ignores bind mounts. 
    22 # 
    23 # Revision 1.5  2004/12/09 20:27:45  jimmyo 
    24 # Sort fields in df*-plugins alphabetically. 
    25 # 
    26 # Revision 1.4  2004/09/25 22:29:16  jimmyo 
    27 # Added info fields to a bunch of plugins. 
    28 # 
    29 # Revision 1.3  2004/05/20 13:57:12  jimmyo 
    30 # Set categories to some of the plugins. 
    31 # 
    32 # Revision 1.2  2004/05/18 22:04:30  jimmyo 
    33 # Use "sed 1d" instead of "tail +2" in df plugins (patch by Olivier Delhomme). 
    34 # 
    35 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    36 # Renamed occurrances of lrrd -> munin 
    37 # 
    38 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    39 # Import of LRRD CVS tree after renaming to Munin 
    40 # 
    41 # Revision 1.2  2003/11/07 17:43:16  jimmyo 
    42 # Cleanups and log entries 
    43 # 
    44 # 
    459# 
    4610# Magic markers (optional - used by munin-config and installation 
  • people/ilmari/modularisation-branch/node/node.d.linux/df_abs.in

    r864 r1012  
    77#       config   (required) 
    88#       autoconf (optional - used by munin-config) 
    9 # 
    10 # $Log$ 
    11 # Revision 1.3  2005/02/16 22:48:56  jimmyo 
    12 # linux/df* now ignores bind mounts. 
    13 # 
    14 # Revision 1.2  2004/08/24 13:37:29  ilmari 
    15 # Add total line 
    16 # 
    17 # Revision 1.1  2004/08/24 12:26:48  ilmari 
    18 # Added plugin linux/df_abs 
    199# 
    2010# Magic markers (optional - used by munin-config and installation 
  • people/ilmari/modularisation-branch/node/node.d.linux/df_inode.in

    r864 r1012  
    77#       config   (required) 
    88#       autoconf (optional - used by munin-config) 
    9 # 
    10 # $Log$ 
    11 # Revision 1.8  2005/03/12 21:33:02  jimmyo 
    12 # Correct fieldname-generation logic. 
    13 # 
    14 # Revision 1.7  2005/02/16 22:48:56  jimmyo 
    15 # linux/df* now ignores bind mounts. 
    16 # 
    17 # Revision 1.6  2004/12/09 20:27:45  jimmyo 
    18 # Sort fields in df*-plugins alphabetically. 
    19 # 
    20 # Revision 1.5  2004/09/25 22:29:16  jimmyo 
    21 # Added info fields to a bunch of plugins. 
    22 # 
    23 # Revision 1.4  2004/05/20 13:57:12  jimmyo 
    24 # Set categories to some of the plugins. 
    25 # 
    26 # Revision 1.3  2004/05/18 22:04:30  jimmyo 
    27 # Use "sed 1d" instead of "tail +2" in df plugins (patch by Olivier Delhomme). 
    28 # 
    29 # Revision 1.2  2004/05/16 11:23:36  jimmyo 
    30 # Bugfix in the linux/df_inode plugin, regarding filesystems without inodes. 
    31 # 
    32 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    33 # Renamed occurrances of lrrd -> munin 
    34 # 
    35 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    36 # Import of LRRD CVS tree after renaming to Munin 
    37 # 
    38 # Revision 1.2  2003/11/07 17:43:16  jimmyo 
    39 # Cleanups and log entries 
    40 # 
    41 # 
    429# 
    4310# Magic markers (optional - used by munin-config and installation 
  • people/ilmari/modularisation-branch/node/node.d.linux/entropy.in

    r864 r1012  
    44# 
    55# Usage: Link or copy into /etc/munin/node.d/ 
    6 # 
    7 # $Log$ 
    8 # Revision 1.3  2004/09/25 22:29:16  jimmyo 
    9 # Added info fields to a bunch of plugins. 
    10 # 
    11 # Revision 1.2  2004/05/20 13:57:12  jimmyo 
    12 # Set categories to some of the plugins. 
    13 # 
    14 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    15 # Renamed occurrances of lrrd -> munin 
    16 # 
    17 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    18 # Import of LRRD CVS tree after renaming to Munin 
    19 # 
    20 # Revision 1.3  2003/11/15 11:10:28  jimmyo 
    21 # Various fixes 
    22 # 
    23 # Revision 1.2  2003/11/07 17:43:16  jimmyo 
    24 # Cleanups and log entries 
    25 # 
    26 # 
    276# 
    287# Magic markers (optional - only used by munin-config and some 
  • people/ilmari/modularisation-branch/node/node.d.linux/files_.in

    r864 r1012  
    22#  
    33# Plugin to monitor the number of open files in the system. 
    4 # 
    5 # $Log$ 
    6 # Revision 1.2  2004/05/20 13:57:12  jimmyo 
    7 # Set categories to some of the plugins. 
    8 # 
    9 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    10 # Renamed occurrances of lrrd -> munin 
    11 # 
    12 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    13 # Import of LRRD CVS tree after renaming to Munin 
    14 # 
    15 # Revision 1.1  2003/11/24 09:57:27  jimmyo 
    16 # Finn-Arne rewrote files_slapd to a generic files_ 
    17 # 
    18 # Revision 1.1  2003/11/10 18:04:32  jimmyo 
    19 # Contribution by Finn-Arne Johansen (SF#839212) 
    204# 
    215# Parameters: 
  • people/ilmari/modularisation-branch/node/node.d.linux/forks.in

    r864 r1012  
    77#       config   (required) 
    88#       autoconf (optional - used by munin-config) 
    9 # 
    10 # $Log$ 
    11 # Revision 1.4  2004/12/10 10:47:49  jimmyo 
    12 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    13 # 
    14 # Revision 1.3  2004/12/09 22:12:56  jimmyo 
    15 # Added "graph_period" option, to make "graph_sums" usable. 
    16 # 
    17 # Revision 1.2  2004/11/21 00:01:18  jimmyo 
    18 # Moved the forks plugin to the processes category, where it belongs. 
    19 # 
    20 # Revision 1.1  2004/11/20 23:32:16  jimmyo 
    21 # Added new plugin linux/forks, to graph forks per second. 
    22 # 
    23 # 
    249# 
    2510# Magick markers (optional - used by munin-config and som installation 
  • people/ilmari/modularisation-branch/node/node.d.linux/fw_conntrack.in

    r864 r1012  
    2929#   Therefore ASSURED is plotted but not UNREPLIED. 
    3030# NATed will almost always be the same as the total 
    31 # 
    32 # $Log$ 
    33 # Revision 1.4  2004/05/20 19:02:37  jimmyo 
    34 # Set categories on a bunch of plugins 
    35 # 
    36 # Revision 1.3  2004/05/15 21:33:29  jimmyo 
    37 # "Upped" som plugins from contrib/manual to manual or auto. 
    38 # 
    39 # Revision 1.2  2004/05/09 19:12:08  jimmyo 
    40 # Cleanup of linux/fw*-plugins, by Nicolai Langfeldt 
    41 # 
    4231# 
    4332# Magic markers? 
  • people/ilmari/modularisation-branch/node/node.d.linux/fw_forwarded_local.in

    r864 r1012  
    77#       config   (required) 
    88#       autoconf (optional - only used by munin-config) 
    9 # 
    10 # 
    11 # $Log$ 
    12 # Revision 1.5  2004/12/09 18:00:00  jimmyo 
    13 # linux/fw_forwarded_local now initialises properly (Deb#284673). 
    14 # 
    15 # Revision 1.4  2004/10/27 17:50:01  jimmyo 
    16 # Fixed typo in linux/fw_forwarded_local (Deb#275535). 
    17 # 
    18 # Revision 1.3  2004/05/20 19:02:37  jimmyo 
    19 # Set categories on a bunch of plugins 
    20 # 
    21 # Revision 1.2  2004/05/15 21:33:29  jimmyo 
    22 # "Upped" som plugins from contrib/manual to manual or auto. 
    23 # 
    24 # Revision 1.1  2004/05/09 21:20:31  jimmyo 
    25 # Added fw_forwarded_local (by Xavier). 
    269# 
    2710# 
  • people/ilmari/modularisation-branch/node/node.d.linux/fw_packets.in

    r864 r1012  
    1111# 
    1212# Config variables: 
    13 # 
    14 # $Log$ 
    15 # Revision 1.8  2004/12/10 18:51:44  jimmyo 
    16 # linux/apt* has been forced to LANG=C, to get predictable output. 
    17 # 
    18 # Revision 1.7  2004/12/10 10:47:49  jimmyo 
    19 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    20 # 
    21 # Revision 1.6  2004/12/09 22:12:56  jimmyo 
    22 # Added "graph_period" option, to make "graph_sums" usable. 
    23 # 
    24 # Revision 1.5  2004/11/21 00:17:12  jimmyo 
    25 # Changed a lot of plugins so they use DERIVE instead of COUNTER. 
    26 # 
    27 # Revision 1.4  2004/10/27 17:53:48  jimmyo 
    28 # Fixed typo in linux/fw_packets (Deb#275537). 
    29 # 
    30 # Revision 1.3  2004/05/20 19:02:37  jimmyo 
    31 # Set categories on a bunch of plugins 
    32 # 
    33 # Revision 1.2  2004/05/15 21:33:29  jimmyo 
    34 # "Upped" som plugins from contrib/manual to manual or auto. 
    35 # 
    36 # Revision 1.1  2004/05/09 19:12:08  jimmyo 
    37 # Cleanup of linux/fw*-plugins, by Nicolai Langfeldt 
    38 # 
    39 # Revision 1.0  2004/05/06 21:39:54  jimmyo 
    40 # fw_packets contributed by S. Banerian 
    4113# 
    4214# Magic markers (optional - used by munin-config and some installation 
  • people/ilmari/modularisation-branch/node/node.d.linux/i2c.in

    r864 r1012  
    22# 
    33# NOTE: This plugins is outdated. Use the sensors_ wildcard plugin instead. 
    4 # 
    5 # $Log$ 
    6 # Revision 1.2  2004/02/05 16:47:02  jimmyo 
    7 # Added new wildcard plugin linux/sensors_ that replaces the i2c plugins (SF#890952). 
    8 # 
    9 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    10 # Renamed occurrances of lrrd -> munin 
    11 # 
    12 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    13 # Import of LRRD CVS tree after renaming to Munin 
    14 # 
    15 # Revision 1.4  2003/11/07 17:43:16  jimmyo 
    16 # Cleanups and log entries 
    174# 
    185 
  • people/ilmari/modularisation-branch/node/node.d.linux/i2c_fan.in

    r864 r1012  
    22# 
    33# NOTE: This plugins is outdated. Use the sensors_ wildcard plugin instead. 
    4 # 
    5 # $Log$ 
    6 # Revision 1.2  2004/02/05 16:47:02  jimmyo 
    7 # Added new wildcard plugin linux/sensors_ that replaces the i2c plugins (SF#890952). 
    8 # 
    9 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    10 # Renamed occurrances of lrrd -> munin 
    11 # 
    12 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    13 # Import of LRRD CVS tree after renaming to Munin 
    14 # 
    15 # Revision 1.5  2003/11/07 22:12:50  jimmyo 
    16 # Changed deprecated plugin options 
    17 # 
    18 # Revision 1.4  2003/11/07 17:43:16  jimmyo 
    19 # Cleanups and log entries 
    20 # 
    214# 
    225#%# family=contrib 
  • people/ilmari/modularisation-branch/node/node.d.linux/if_.in

    r864 r1012  
    1111# ipsec*, eth*, irda* and lo. Please note that aliases cannot be 
    1212# monitored with this plugin. 
    13 # 
    14 # $Log$ 
    15 # Revision 1.16  2005/03/07 19:22:20  jimmyo 
    16 # Made linux/if_ work with more versions of iwlist (SF#1150954). 
    17 # 
    18 # Revision 1.15  2005/02/17 11:35:11  jimmyo 
    19 # Typo fixes. 
    20 # 
    21 # Revision 1.14  2005/02/16 21:46:19  jimmyo 
    22 # Modified warning note in linux/if_ output. 
    23 # 
    24 # Revision 1.13  2005/02/16 21:27:36  jimmyo 
    25 # Added warning note in linux/if_ output. 
    26 # 
    27 # Revision 1.12  2005/02/16 21:00:29  jimmyo 
    28 # Make suggest a tad less trigger happy. 
    29 # 
    30 # Revision 1.11  2005/02/16 20:32:17  jimmyo 
    31 # Minor bugfix in linux/if_, with info fields. 
    32 # 
    33 # Revision 1.10  2005/02/16 17:08:24  jimmyo 
    34 # linux/if* now treats ra* interfaces as wireless. 
    35 # 
    36 # Revision 1.9  2005/01/29 21:17:27  jimmyo 
    37 # Added madwifi support to linux/if_* plugins. 
    38 # 
    39 # Revision 1.8  2004/12/10 10:47:49  jimmyo 
    40 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    41 # 
    42 # Revision 1.7  2004/12/09 22:12:56  jimmyo 
    43 # Added "graph_period" option, to make "graph_sums" usable. 
    44 # 
    45 # Revision 1.6  2004/11/12 20:08:01  ilmari 
    46 # Fixed linux/if_(err_) braindamage affecting hosts with vlans or 
    47 # multi-digit interface numbers. 
    48 # 
    49 # Revision 1.5  2004/09/26 22:28:42  jimmyo 
    50 # Suggest wlan interfaces as well as eth interfaces. 
    51 # 
    52 # Revision 1.4  2004/09/25 22:29:16  jimmyo 
    53 # Added info fields to a bunch of plugins. 
    54 # 
    55 # Revision 1.3  2004/09/12 20:54:24  jimmyo 
    56 # Plugin now sets max value. 
    57 # 
    58 # Revision 1.2  2004/05/20 13:57:12  jimmyo 
    59 # Set categories to some of the plugins. 
    60 # 
    61 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    62 # Renamed occurrances of lrrd -> munin 
    63 # 
    64 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    65 # Import of LRRD CVS tree after renaming to Munin 
    66 # 
    67 # Revision 1.3  2003/11/07 22:12:50  jimmyo 
    68 # Changed deprecated plugin options 
    69 # 
    70 # Revision 1.2  2003/11/07 17:43:16  jimmyo 
    71 # Cleanups and log entries 
    72 # 
    73 # 
    7413# 
    7514# Magic markers (optional - used by munin-config and some installation 
     
    13271fi; 
    13372 
    134 # Escape dots in the interface name (eg. vlans) before using it as a regex 
    135 awk -v interface="$INTERFACE" \ 
    136     'BEGIN { gsub(/\./, "\\.", interface) } \ 
    137     $1 ~ "^" interface ":" { 
    138         split($0, a, /: */); $0 = a[2]; \ 
    139         print "down.value " $1 "\nup.value " $9 \ 
    140     }' \ 
     73awk -F '[: \t]+' -v interface="$INTERFACE" \ 
     74    '$1 == interface { print "down.value " $2 "\nup.value " $10; exit } 
     75     $2 == interface { print "down.value " $3 "\nup.value " $11; exit }' \ 
    14176    /proc/net/dev 
    14277 
  • people/ilmari/modularisation-branch/node/node.d.linux/if_err_.in

    r864 r1012  
    1111# ipsec*, eth*, irda* and lo. Please note that aliases cannot be 
    1212# monitored with this plugin. 
    13 # 
    14 # $Log$ 
    15 # Revision 1.11  2005/02/16 21:00:29  jimmyo 
    16 # Make suggest a tad less trigger happy. 
    17 # 
    18 # Revision 1.10  2005/02/16 17:08:24  jimmyo 
    19 # linux/if* now treats ra* interfaces as wireless. 
    20 # 
    21 # Revision 1.9  2005/01/29 21:17:27  jimmyo 
    22 # Added madwifi support to linux/if_* plugins. 
    23 # 
    24 # Revision 1.8  2004/12/10 10:47:49  jimmyo 
    25 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    26 # 
    27 # Revision 1.7  2004/12/09 22:12:56  jimmyo 
    28 # Added "graph_period" option, to make "graph_sums" usable. 
    29 # 
    30 # Revision 1.6  2004/11/12 20:09:06  ilmari 
    31 # Remove deprecated host_name outputting 
    32 # 
    33 # Revision 1.5  2004/11/12 20:08:01  ilmari 
    34 # Fixed linux/if_(err_) braindamage affecting hosts with vlans or 
    35 # multi-digit interface numbers. 
    36 # 
    37 # Revision 1.4  2004/09/26 22:28:42  jimmyo 
    38 # Suggest wlan interfaces as well as eth interfaces. 
    39 # 
    40 # Revision 1.3  2004/09/25 22:29:16  jimmyo 
    41 # Added info fields to a bunch of plugins. 
    42 # 
    43 # Revision 1.2  2004/05/20 13:57:12  jimmyo 
    44 # Set categories to some of the plugins. 
    45 # 
    46 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    47 # Renamed occurrances of lrrd -> munin 
    48 # 
    49 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    50 # Import of LRRD CVS tree after renaming to Munin 
    51 # 
    52 # Revision 1.3  2003/11/07 22:12:50  jimmyo 
    53 # Changed deprecated plugin options 
    54 # 
    55 # Revision 1.2  2003/11/07 17:43:16  jimmyo 
    56 # Cleanups and log entries 
    57 # 
    58 # 
    5913# 
    6014# Magic markers (optional - used by munin-config and some installation 
  • people/ilmari/modularisation-branch/node/node.d.linux/interrupts.in

    r864 r1012  
    66# 
    77# Usage: Link or copy into /etc/munin/node.d/ 
    8 # 
    9 # $Log$ 
    10 # Revision 1.6  2004/12/10 10:47:49  jimmyo 
    11 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    12 # 
    13 # Revision 1.5  2004/12/09 22:12:56  jimmyo 
    14 # Added "graph_period" option, to make "graph_sums" usable. 
    15 # 
    16 # Revision 1.4  2004/11/21 00:17:12  jimmyo 
    17 # Changed a lot of plugins so they use DERIVE instead of COUNTER. 
    18 # 
    19 # Revision 1.3  2004/09/25 22:29:16  jimmyo 
    20 # Added info fields to a bunch of plugins. 
    21 # 
    22 # Revision 1.2  2004/05/20 13:57:12  jimmyo 
    23 # Set categories to some of the plugins. 
    24 # 
    25 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    26 # Renamed occurrances of lrrd -> munin 
    27 # 
    28 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    29 # Import of LRRD CVS tree after renaming to Munin 
    30 # 
    31 # Revision 1.3  2003/12/06 16:24:34  jimmyo 
    32 # Plugin interrupts: context switch graphing added by Mike Fedyk 
    33 # 
    34 # Revision 1.2  2003/11/07 17:43:16  jimmyo 
    35 # Cleanups and log entries 
    36 # 
    378# 
    389# Magic markers (optional - only used by munin-config and some 
  • people/ilmari/modularisation-branch/node/node.d.linux/iostat.in

    r864 r1012  
    99#       config   (required) 
    1010#       autoconf (optional - used by lrrd-config) 
    11 # 
    12 # $Log$ 
    13 # Revision 1.14  2004/12/10 18:51:44  jimmyo 
    14 # linux/apt* has been forced to LANG=C, to get predictable output. 
    15 # 
    16 # Revision 1.13  2004/12/10 10:47:49  jimmyo 
    17 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    18 # 
    19 # Revision 1.12  2004/12/09 22:12:56  jimmyo 
    20 # Added "graph_period" option, to make "graph_sums" usable. 
    21 # 
    22 # Revision 1.11  2004/11/21 00:17:12  jimmyo 
    23 # Changed a lot of plugins so they use DERIVE instead of COUNTER. 
    24 # 
    25 # Revision 1.10  2004/11/20 23:58:22  jimmyo 
    26 # The linux/iostat plugin now ignores devices without traffic (Deb#267195). 
    27 # 
    28 # Revision 1.9  2004/09/25 22:29:16  jimmyo 
    29 # Added info fields to a bunch of plugins. 
    30 # 
    31 # Revision 1.8  2004/08/24 13:37:29  ilmari 
    32 # Add total line 
    33 # 
    34 # Revision 1.7  2004/05/20 13:57:12  jimmyo 
    35 # Set categories to some of the plugins. 
    36 # 
    37 # Revision 1.6  2004/02/02 18:18:07  jimmyo 
    38 # Changed to an informative vlabel, since the field.label information has been made shorter. 
    39 # 
    40 # Revision 1.5  2004/02/02 17:52:32  jimmyo 
    41 # Linux/iostat now shows only disks also on machines without devfs. 
    42 # 
    43 # Revision 1.4  2004/02/02 16:54:38  jimmyo 
    44 # Make the iostat plugin work properly. 
    45 # 
    46 # Revision 1.3  2004/02/02 16:53:53  jimmyo 
    47 # Make the iostat plugin work properly. 
    48 # 
    49 # Revision 1.2  2004/01/31 19:24:52  jimmyo 
    50 # Rewrite of linux/iostat by Mike Fedyk (Deb##223373,224113). 
    51 # 
    52 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    53 # Renamed occurrances of lrrd -> munin 
    54 # 
    55 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    56 # Import of LRRD CVS tree after renaming to Munin 
    57 # 
    58 # Revision 1.5  2003/12/18 18:09:32  jimmyo 
    59 # Added total line 
    60 # 
    61 # Revision 1.4  2003/12/18 11:01:51  jimmyo 
    62 # Fix by_dev compare issue. 
    63 # 
    64 # Revision 1.3  2003/12/16 17:51:08  jimmyo 
    65 # Plugin linux/iostat modified. Now runs on 2.6, and now "mirrors" i/o like eth* et al. (Deb#224113, Deb#223373) 
    66 # 
    67 # Revision 1.2  2003/11/07 17:43:16  jimmyo 
    68 # Cleanups and log entries 
    69 # 
    70 # 
    7111# 
    7212# Magic markers (optional - used by lrrd-config and some installation 
     
    203143                                my $tmpnam = $2; 
    204144                                my $major  = $1; 
    205                                 next if ($tmpnam =~ /\d+$/); 
     145                                if ($tmpnam =~ /\d+$/ ) { 
     146                                        # Special case for devices like cXdXpX, 
     147                                        # like the cciss driver 
     148                                        next unless $tmpnam =~ /\/c\d+d\d+$/ 
     149                                } 
    206150                                next unless grep { $_ } @fields; 
    207151 
  • people/ilmari/modularisation-branch/node/node.d.linux/iostat_ios.in

    r864 r1012  
    1010#       config   (required) 
    1111#       autoconf (optional - used by munin-config) 
    12 # 
    13 # $Log$ 
    14 # Revision 1.8  2004/09/25 23:47:11  jimmyo 
    15 # Downgraded plugin from manual to contrib. 
    16 # 
    17 # Revision 1.7  2004/09/25 22:15:20  jimmyo 
    18 # Corrected statedir. 
    19 # 
    20 # Revision 1.6  2004/09/09 11:12:42  ilmari 
    21 # Remove Data::Dumper dependency 
    22 # 
    23 # Revision 1.5  2004/08/04 20:37:45  toreanderson 
    24 # Run iostat_ios with Perl warnings. 
    25 # 
    26 # Revision 1.4  2004/06/28 12:08:54  jimmyo 
    27 # Plugin bugfixes from Jacques Caruso, in linux/iostat_ios and generic/ipacng. 
    28 # 
    29 # Revision 1.3  2004/05/20 13:57:12  jimmyo 
    30 # Set categories to some of the plugins. 
    31 # 
    32 # Revision 1.2  2004/05/15 21:33:29  jimmyo 
    33 # "Upped" som plugins from contrib/manual to manual or auto. 
    34 # 
    3512# 
    3613# Magic markers (optional - used by munin-config and some installation  
  • people/ilmari/modularisation-branch/node/node.d.linux/ip_.in

    r864 r1012  
    1616# 
    1717# This plugin is based on the if_ plugin. 
    18 # 
    19 #$Log$ 
    20 #Revision 1.7  2004/12/10 10:47:49  jimmyo 
    21 #Change name from ${scale} to ${graph_period}, to be more consistent. 
    22 # 
    23 #Revision 1.6  2004/12/09 22:12:56  jimmyo 
    24 #Added "graph_period" option, to make "graph_sums" usable. 
    25 # 
    26 #Revision 1.5  2004/11/21 00:17:12  jimmyo 
    27 #Changed a lot of plugins so they use DERIVE instead of COUNTER. 
    28 # 
    29 #Revision 1.4  2004/09/10 23:06:30  jimmyo 
    30 #Added accidentally deleted exit. 
    31 # 
    32 #Revision 1.3  2004/09/10 23:02:22  jimmyo 
    33 #Plugin linux/ip_ now does more proper autoconfig/suggest. 
    34 # 
    35 #Revision 1.2  2004/05/20 13:57:12  jimmyo 
    36 #Set categories to some of the plugins. 
    37 # 
    38 #Revision 1.1  2004/05/16 16:28:40  jimmyo 
    39 #Linux/ip_ wildcard plugin contributed by Mathy Vanvoorden (SF#954851). 
    40 # 
    4118# 
    4219# Magic markers (optional - used by munin-config and some installation 
  • people/ilmari/modularisation-branch/node/node.d.linux/irqstats.in

    r864 r1012  
    22#  
    33# Plugin to monitor individual interrupts 
    4 # 
    5 # $Log$ 
    6 # Revision 1.8  2005/02/24 17:33:20  jimmyo 
    7 # linux/irqstats should no longer fail on some systems (Deb#296452). 
    8 # 
    9 # Revision 1.7  2004/12/10 18:51:44  jimmyo 
    10 # linux/apt* has been forced to LANG=C, to get predictable output. 
    11 # 
    12 # Revision 1.6  2004/12/10 10:47:49  jimmyo 
    13 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    14 # 
    15 # Revision 1.5  2004/12/09 22:12:56  jimmyo 
    16 # Added "graph_period" option, to make "graph_sums" usable. 
    17 # 
    18 # Revision 1.4  2004/11/20 19:53:04  jimmyo 
    19 # Removed debuging-settings. Sorry about that. 
    20 # 
    21 # Revision 1.3  2004/11/20 18:17:51  jimmyo 
    22 # Added i-prefix to value lines as well (forgot earlier). 
    23 # 
    24 # Revision 1.2  2004/11/19 23:01:40  jimmyo 
    25 # Fixed irqstats plugin so it doesn't use numbers as field names. Also expanded the label if possible, since munin-graph now handles long labels. 
    26 # 
    27 # Revision 1.1  2004/10/26 09:31:04  ilmari 
    28 # Added plugin linux/irqstast, showing individual interrupt rates. 
    29 # 
    304# 
    315#%# family=auto 
  • people/ilmari/modularisation-branch/node/node.d.linux/load.in

    r864 r1012  
    44# 
    55# Usage: Link or copy into /etc/munin/node.d/ 
    6 # 
    7 # $Log$ 
    8 # Revision 1.5  2004/05/20 19:02:37  jimmyo 
    9 # Set categories on a bunch of plugins 
    10 # 
    11 # Revision 1.4  2004/05/20 13:57:12  jimmyo 
    12 # Set categories to some of the plugins. 
    13 # 
    14 # Revision 1.3  2004/05/16 12:41:04  jimmyo 
    15 # Changed load plot from lastminute to last 5 minutes. 
    16 # 
    17 # Revision 1.2  2004/05/16 12:34:26  jimmyo 
    18 # Added "info"-fields to linux/cpu and linux/load plugins, to demonstrate how it works. 
    19 # 
    20 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    21 # Renamed occurrances of lrrd -> munin 
    22 # 
    23 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    24 # Import of LRRD CVS tree after renaming to Munin 
    25 # 
    26 # Revision 1.4  2003/11/15 11:10:28  jimmyo 
    27 # Various fixes 
    28 # 
    29 # Revision 1.3  2003/11/07 17:43:16  jimmyo 
    30 # Cleanups and log entries 
    31 # 
    32 # 
    336# 
    347# Magic markers (optional - only used by munin-config and some 
  • people/ilmari/modularisation-branch/node/node.d.linux/memory.in

    r864 r1012  
    1111#       config   (required) 
    1212#       autoconf (optional - only used by munin-config) 
    13 # 
    14 # $Log$ 
    15 # Revision 1.4  2004/09/25 18:24:03  jimmyo 
    16 # Added some more info lines. 
    17 # 
    18 # Revision 1.3  2004/09/24 17:18:19  jimmyo 
    19 # Started documenting the plugin. 
    20 # 
    21 # Revision 1.2  2004/05/20 13:57:12  jimmyo 
    22 # Set categories to some of the plugins. 
    23 # 
    24 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    25 # Renamed occurrances of lrrd -> munin 
    26 # 
    27 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    28 # Import of LRRD CVS tree after renaming to Munin 
    29 # 
    30 # Revision 1.6  2003/12/18 15:28:04  jimmyo 
    31 # Plugin linux/memory has been improved greatly by Mike Fedyk (Deb#223346) 
    32 # 
    33 # Revision 2.0  2003/12/17 12:20:16  mfedyk 
    34 # Major Enhancements 
    3513# 
    3614# Magic markers (optional - only used by munin-config and some 
  • people/ilmari/modularisation-branch/node/node.d.linux/netopia.in

    r864 r1012  
    11#!/bin/sh 
    22 
    3 # $Log$ 
    4 # Revision 1.4  2004/12/10 10:47:49  jimmyo 
    5 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    6 # 
    7 # Revision 1.3  2004/12/09 22:12:56  jimmyo 
    8 # Added "graph_period" option, to make "graph_sums" usable. 
    9 # 
    10 # Revision 1.2  2004/11/21 00:17:12  jimmyo 
    11 # Changed a lot of plugins so they use DERIVE instead of COUNTER. 
    12 # 
    13 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    14 # Renamed occurrances of lrrd -> munin 
    15 # 
    16 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    17 # Import of LRRD CVS tree after renaming to Munin 
    18 # 
    19 # Revision 1.4  2003/11/07 22:12:50  jimmyo 
    20 # Changed deprecated plugin options 
    21 # 
    22 # Revision 1.3  2003/11/07 17:43:16  jimmyo 
    23 # Cleanups and log entries 
    24 # 
    253 
    264if [ "$1" = "config" ]; then 
  • people/ilmari/modularisation-branch/node/node.d.linux/netstat.in

    r864 r1012  
    77#       config   (required) 
    88#       autoconf (optional - only used by munin-config) 
    9 # 
    10 # $Log$ 
    11 # Revision 1.5  2004/12/09 22:12:56  jimmyo 
    12 # Added "graph_period" option, to make "graph_sums" usable. 
    13 # 
    14 # Revision 1.4  2004/11/21 00:17:12  jimmyo 
    15 # Changed a lot of plugins so they use DERIVE instead of COUNTER. 
    16 # 
    17 # Revision 1.3  2004/09/25 22:29:16  jimmyo 
    18 # Added info fields to a bunch of plugins. 
    19 # 
    20 # Revision 1.2  2004/05/20 13:57:12  jimmyo 
    21 # Set categories to some of the plugins. 
    22 # 
    23 # Revision 1.1  2004/01/29 19:21:20  jimmyo 
    24 # Moved generic netstat to linux-dir, as it is too spesific. Added Solaris version of the plugin as well. (SF#882354) 
    25 # 
    26 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    27 # Renamed occurrances of lrrd -> munin 
    28 # 
    29 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    30 # Import of LRRD CVS tree after renaming to Munin 
    31 # 
    32 # Revision 1.2  2003/11/07 17:43:16  jimmyo 
    33 # Cleanups and log entries 
    34 # 
    35 # 
    369# 
    3710# Magic markers (optional - used by munin-config and some installation 
  • people/ilmari/modularisation-branch/node/node.d.linux/nfs_client.in

    r864 r1012  
    22# 
    33# Plugin to monitor NFS client traffic 
    4 # 
    5 # $Log$ 
    6 # Revision 1.8  2004/12/10 10:47:49  jimmyo 
    7 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    8 # 
    9 # Revision 1.7  2004/12/09 22:12:56  jimmyo 
    10 # Added "graph_period" option, to make "graph_sums" usable. 
    11 # 
    12 # Revision 1.6  2004/11/21 00:17:12  jimmyo 
    13 # Changed a lot of plugins so they use DERIVE instead of COUNTER. 
    14 # 
    15 # Revision 1.5  2004/10/01 12:32:09  ilmari 
    16 # complete "rpc" removal 
    17 # 
    18 # Revision 1.4  2004/10/01 08:40:50  ilmari 
    19 # Remove useless 'rpc' field, add total field 
    20 # 
    21 # Revision 1.3  2004/05/20 19:02:37  jimmyo 
    22 # Set categories on a bunch of plugins 
    23 # 
    24 # Revision 1.2  2004/05/15 21:33:29  jimmyo 
    25 # "Upped" som plugins from contrib/manual to manual or auto. 
    26 # 
    274# 
    285#%# family=auto 
  • people/ilmari/modularisation-branch/node/node.d.linux/nfsd.in

    r864 r1012  
    22# 
    33# Plugin created by Alexandre Dupouy, with the assistance of Mike Fedyk 
    4 # 
    5 # $Log$ 
    6 # Revision 1.9  2004/12/10 10:47:49  jimmyo 
    7 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    8 # 
    9 # Revision 1.8  2004/12/09 22:12:56  jimmyo 
    10 # Added "graph_period" option, to make "graph_sums" usable. 
    11 # 
    12 # Revision 1.7  2004/11/21 00:17:12  jimmyo 
    13 # Changed a lot of plugins so they use DERIVE instead of COUNTER. 
    14 # 
    15 # Revision 1.6  2004/10/01 12:32:09  ilmari 
    16 # complete "rpc" removal 
    17 # 
    18 # Revision 1.5  2004/10/01 08:40:50  ilmari 
    19 # Remove useless 'rpc' field, add total field 
    20 # 
    21 # Revision 1.4  2004/05/20 19:02:37  jimmyo 
    22 # Set categories on a bunch of plugins 
    23 # 
    24 # Revision 1.3  2004/05/15 21:33:29  jimmyo 
    25 # "Upped" som plugins from contrib/manual to manual or auto. 
    26 # 
    27 # Revision 1.2  2004/05/06 21:55:18  jimmyo 
    28 # Added patch to contrib-plugin linux/nfsd, to graph rpc count (Alexandre Dupouy). 
    29 # 
    30 # Revision 1.1  2004/02/18 18:41:54  jimmyo 
    31 # Plugin created by Alexandre Dupouy, with the assistance of Mike Fedyk 
    32 # 
    334# 
    345#%# family=auto 
  • people/ilmari/modularisation-branch/node/node.d.linux/open_files.in

    r864 r1012  
    77#       config   (required) 
    88#       autoconf (optional - used by munin-config) 
    9 # 
    10 # $Log$ 
    11 # Revision 1.3  2004/09/25 22:29:16  jimmyo 
    12 # Added info fields to a bunch of plugins. 
    13 # 
    14 # Revision 1.2  2004/05/20 13:57:12  jimmyo 
    15 # Set categories to some of the plugins. 
    16 # 
    17 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    18 # Renamed occurrances of lrrd -> munin 
    19 # 
    20 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    21 # Import of LRRD CVS tree after renaming to Munin 
    22 # 
    23 # Revision 1.2  2003/11/07 17:43:16  jimmyo 
    24 # Cleanups and log entries 
    25 # 
    26 # 
    279# 
    2810# Magic markers (Used by munin-config and some installation scripts. 
  • people/ilmari/modularisation-branch/node/node.d.linux/open_inodes.in

    r864 r1012  
    22#  
    33# Plugin to monitor the number of open files in the system. 
    4 # 
    5 # $Log$ 
    6 # Revision 1.3  2004/09/25 22:29:16  jimmyo 
    7 # Added info fields to a bunch of plugins. 
    8 # 
    9 # Revision 1.2  2004/05/20 13:57:12  jimmyo 
    10 # Set categories to some of the plugins. 
    11 # 
    12 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    13 # Renamed occurrances of lrrd -> munin 
    14 # 
    15 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    16 # Import of LRRD CVS tree after renaming to Munin 
    17 # 
    18 # Revision 1.2  2003/11/12 11:49:41  jimmyo 
    19 # Removed warning/critical (floating max) 
    20 # 
    21 # Revision 1.1  2003/11/10 17:46:50  jimmyo 
    22 # Contribution by Finn-Arn Johansen (SF#839210) 
    23 # 
    244# 
    255# Parameters: 
  • people/ilmari/modularisation-branch/node/node.d.linux/port_.in

    r864 r1012  
    1414#       autoconf (optional - used by munin-config) 
    1515#       suggest  (optional - used by munin-config) 
    16 # 
    17 # $Log$ 
    18 # Revision 1.4  2005/02/26 17:13:54  kjetilho 
    19 # ugh, forgot to remove interpreter line used during development. 
    20 # 
    21 # Revision 1.3  2005/02/26 17:11:59  kjetilho 
    22 # Add support for caching of network state.  Replace hardcoded offsets with 
    23 # offsets computed from the header of /proc/net/tcp. 
    24 # 
    25 # Revision 1.2  2004/05/20 13:57:12  jimmyo 
    26 # Set categories to some of the plugins. 
    27 # 
    28 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    29 # Renamed occurrances of lrrd -> munin 
    30 # 
    31 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    32 # Import of LRRD CVS tree after renaming to Munin 
    33 # 
    34 # Revision 1.4  2003/12/16 16:22:36  jimmyo 
    35 # Typo fix. 
    36 # 
    37 # Revision 1.3  2003/11/07 17:43:16  jimmyo 
    38 # Cleanups and log entries 
    39 # 
    40 # 
    4116# 
    4217# Magic markers (optional - used by munin-config and some installation 
  • people/ilmari/modularisation-branch/node/node.d.linux/processes.in

    r864 r1012  
    88#       config   (required) 
    99#       autoconf (optional - used by munin-config) 
    10 # 
    11 # $Log$ 
    12 # Revision 1.3  2004/09/25 22:29:16  jimmyo 
    13 # Added info fields to a bunch of plugins. 
    14 # 
    15 # Revision 1.2  2004/05/20 13:57:12  jimmyo 
    16 # Set categories to some of the plugins. 
    17 # 
    18 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    19 # Renamed occurrances of lrrd -> munin 
    20 # 
    21 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    22 # Import of LRRD CVS tree after renaming to Munin 
    23 # 
    24 # Revision 1.2  2003/11/07 17:43:16  jimmyo 
    25 # Cleanups and log entries 
    26 # 
    27 # 
    2810# 
    2911# Magick markers (optional - used by munin-config and som installation 
  • people/ilmari/modularisation-branch/node/node.d.linux/sensors_.in

    r864 r1012  
    2727#                           Narrow the voltage bracket by this. 
    2828# 
    29 # $Log$ 
    30 # Revision 1.10  2004/12/15 15:40:12  jimmyo 
    31 # Fixed typo in graph_category. 
    32 # 
    33 # Revision 1.9  2004/11/23 17:08:25  ilmari 
    34 # Fixed linux/sensors_ plugin to report warning and critical values for temperatures and voltages if sensors reports them. 
    35 # 
    36 # Revision 1.3.2.3  2004/08/18 17:27:15  jimmyo 
    37 # Made linux/sensors_volt work with negative voltages (Deb#256734). 
    38 # 
    39 # Revision 1.3.2.2  2004/08/18 17:20:29  jimmyo 
    40 # linux/sensors_temp now understand temp lines without hyst or max settings (Deb#256380). 
    41 # 
    42 # Revision 1.3.2.1  2004/08/18 17:01:01  jimmyo 
    43 # Force LANG/LC_ALL=C in linux/sensors_ and generic/hddtemp2, to remove problems in parsing of sensors output (SF#972749, SF#972748, Deb#255312) 
    44 # 
    45 # Revision 1.3  2004/04/28 21:46:41  jimmyo 
    46 # Sensors-* patch from SF#906868. 
    47 # 
    48 # Revision 1.2  2004/04/27 21:55:43  jimmyo 
    49 # Patched temp-part of linux-pugin sensors_* with better regexp (Deb#245289). 
    50 # 
    51 # Revision 1.1  2004/02/05 16:47:02  jimmyo 
    52 # Added new wildcard plugin linux/sensors_ that replaces the i2c plugins (SF#890952). 
    53 # 
    54 # 
    55 # 
    5629# Magic markers: 
    5730#%# family=manual 
     
    6538my %config = ( 
    6639               fan => { 
    67                          regex => qr/^([^:]*)\s*:\s+\+?(\d+) RPM.*?(\d+) RPM/m, 
     40                         regex => qr/^(\S[^:]*)\s*:\s+\+?(\d+) RPM.*?(\d+) RPM/m, 
    6841                         title => 'Fans', 
    6942                         vtitle => 'RPM', 
     
    7245                       }, 
    7346               temp => { 
    74                          regex => qr/^([^:]*)\s*:\s+\+?(\d+(?:\.\d+)?)[° ]C(?:\s+\((?:high|limit)\s*=\s*\+?(\d+(?:\.\d+)?)[° ]C,\s*hyst(?:eresis)?\s*=\s*\+?(\d+(?:\.\d+)?)[° ]C\))?/m, 
     47                         regex => qr/^(\S[^:]*)\s*:\s+\+?(\d+(?:\.\d+)?)[° ]C(?:\s+\((?:high|limit)\s*=\s*\+?(\d+(?:\.\d+)?)[° ]C,\s*hyst(?:eresis)?\s*=\s*\+?(\d+(?:\.\d+)?)[° ]C\))?/m, 
    7548                         title => 'Temperatures', 
    7649                         vtitle => 'Celsius', 
     
    7952                       }, 
    8053               volt => { 
    81                          regex => qr/^([^:]*)\s*:\s+\+?(-?\d+(?:\.\d+)?) V(?:\s+\(min\s*=\s*\+?(-?\d+(?:\.\d+)?) V,\s*max\s*=\s*\+?(-?\d+(?:\.\d+)?) V\))/m, 
     54                         regex => qr/^(\S[^:]*)\s*:\s+\+?(-?\d+(?:\.\d+)?) V(?:\s+\(min\s*=\s*\+?(-?\d+(?:\.\d+)?) V,\s*max\s*=\s*\+?(-?\d+(?:\.\d+)?) V\))/m, 
    8255                         title => 'Voltages', 
    8356                         vtitle => 'Volt', 
     
    8760             ); 
    8861 
    89 if ( exists $ARGV[0] and $ARGV[0] eq 'autoconf' ) { 
     62if ( defined $ARGV[0] and $ARGV[0] eq 'autoconf' ) { 
    9063  # Now see if "sensors" can run 
    9164  my $text = `$SENSORS`; 
     
    10881} 
    10982 
    110 if ($ARGV[0] and $ARGV[0] eq 'suggest') { 
     83if (defined $ARGV[0] and $ARGV[0] eq 'suggest') { 
    11184  my $text = `$SENSORS`; 
    11285  foreach my $func (keys %config) { 
     
    12093exit 2 unless defined $func; 
    12194 
    122 if ( exists $ARGV[0] and $ARGV[0] eq 'config' ) { 
     95if ( defined $ARGV[0] and $ARGV[0] eq 'config' ) { 
    12396  print "graph_title $config{$func}->{title}\n"; 
    12497  print "graph_vtitle $config{$func}->{vtitle}\n"; 
  • people/ilmari/modularisation-branch/node/node.d.linux/swap.in

    r864 r1012  
    77#       config   (required) 
    88#       autoconf (optional - used by munin-config) 
    9 # 
    10 # $Log$ 
    11 # Revision 1.5  2004/12/10 10:47:49  jimmyo 
    12 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    13 # 
    14 # Revision 1.4  2004/12/09 22:12:56  jimmyo 
    15 # Added "graph_period" option, to make "graph_sums" usable. 
    16 # 
    17 # Revision 1.3  2004/11/21 00:17:12  jimmyo 
    18 # Changed a lot of plugins so they use DERIVE instead of COUNTER. 
    19 # 
    20 # Revision 1.2  2004/05/20 13:57:12  jimmyo 
    21 # Set categories to some of the plugins. 
    22 # 
    23 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    24 # Renamed occurrances of lrrd -> munin 
    25 # 
    26 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    27 # Import of LRRD CVS tree after renaming to Munin 
    28 # 
    29 # Revision 1.4  2003/11/07 22:12:50  jimmyo 
    30 # Changed deprecated plugin options 
    31 # 
    32 # Revision 1.3  2003/11/07 17:43:16  jimmyo 
    33 # Cleanups and log entries 
    34 # 
    35 # 
    369# 
    3710# Magic markers (used by munin-config and some installation scripts (i.e. 
  • people/ilmari/modularisation-branch/node/node.d.linux/uptime.in

    r864 r1012  
    55# 
    66# Contributed by Nicolas Salles 
    7 # 
    8 # $Log$ 
    9 # Revision 1.1  2004/12/09 16:20:06  jimmyo 
    10 # generic/uptime was re-classified as linux/uptime (SF#1074576). 
    11 # 
    12 # Revision 1.2  2004/09/10 21:27:07  jimmyo 
    13 # "Downed" uptime plugin from auto to manual. 
    14 # 
    15 # Revision 1.1  2004/08/18 17:58:39  jimmyo 
    16 # Added plugin generic/uptime contributed by Nicolas Salles (SF#998665). 
    17 # 
    187# 
    198# Magic markers - optional - used by installation scripts and 
  • people/ilmari/modularisation-branch/node/node.d.linux/users.in

    r864 r1012  
    2020# 
    2121# $Id$ 
    22 # 
    23 # $Log$ 
    24 # Revision 1.2  2005/01/24 17:25:39  jimmyo 
    25 # Made TLS mode work. 
    26 # 
    27 # Revision 1.1  2004/12/20 13:43:36  jimmyo 
    28 # Added plugin linux/users, created by Michael Kaiser. 
    29 # 
    3022# 
    3123#%# family=contrib 
  • people/ilmari/modularisation-branch/node/node.d.linux/vlan_.in

    r864 r1012  
    1313#       autoconf 
    1414#       suggest 
    15 # 
    16 # $Log$ 
    17 # Revision 1.5  2004/12/10 10:47:49  jimmyo 
    18 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    19 # 
    20 # Revision 1.4  2004/12/09 22:12:56  jimmyo 
    21 # Added "graph_period" option, to make "graph_sums" usable. 
    22 # 
    23 # Revision 1.3  2004/11/21 00:17:12  jimmyo 
    24 # Changed a lot of plugins so they use DERIVE instead of COUNTER. 
    25 # 
    26 # Revision 1.2  2004/05/20 19:02:37  jimmyo 
    27 # Set categories on a bunch of plugins 
    28 # 
    29 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    30 # Renamed occurrances of lrrd -> munin 
    31 # 
    32 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    33 # Import of LRRD CVS tree after renaming to Munin 
    34 # 
    35 # Revision 1.3  2003/11/07 22:12:50  jimmyo 
    36 # Changed deprecated plugin options 
    37 # 
    38 # Revision 1.2  2003/11/07 17:43:16  jimmyo 
    39 # Cleanups and log entries 
    40 # 
    41 # 
    4215# 
    4316#%# family=manual 
  • people/ilmari/modularisation-branch/node/node.d.linux/vlan_inetuse_.in

    r864 r1012  
    2525# existing for examples. 
    2626# 
    27 # $Log$ 
    28 # Revision 1.7  2004/12/10 18:51:44  jimmyo 
    29 # linux/apt* has been forced to LANG=C, to get predictable output. 
    30 # 
    31 # Revision 1.6  2004/12/10 10:47:49  jimmyo 
    32 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    33 # 
    34 # Revision 1.5  2004/12/09 22:12:56  jimmyo 
    35 # Added "graph_period" option, to make "graph_sums" usable. 
    36 # 
    37 # Revision 1.4  2004/11/21 00:17:12  jimmyo 
    38 # Changed a lot of plugins so they use DERIVE instead of COUNTER. 
    39 # 
    40 # Revision 1.3  2004/05/20 19:02:37  jimmyo 
    41 # Set categories on a bunch of plugins 
    42 # 
    43 # Revision 1.2  2004/05/15 21:33:29  jimmyo 
    44 # "Upped" som plugins from contrib/manual to manual or auto. 
    45 # 
    46 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    47 # Renamed occurrances of lrrd -> munin 
    48 # 
    49 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    50 # Import of LRRD CVS tree after renaming to Munin 
    51 # 
    52 # Revision 1.4  2003/11/07 22:12:50  jimmyo 
    53 # Changed deprecated plugin options 
    54 # 
    55 # Revision 1.3  2003/11/07 17:43:16  jimmyo 
    56 # Cleanups and log entries 
    57 # 
    5827#%# family=manual 
    5928 
  • people/ilmari/modularisation-branch/node/node.d.linux/vlan_linkuse_.in

    r864 r1012  
    1515# ...which will make the out-traffic graphable. (Both in and out-files must 
    1616# have such rules. Look at the existing for examples. 
    17 # 
    18 # $Log$ 
    19 # Revision 1.7  2004/12/10 18:51:44  jimmyo 
    20 # linux/apt* has been forced to LANG=C, to get predictable output. 
    21 # 
    22 # Revision 1.6  2004/12/10 10:47:49  jimmyo 
    23 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    24 # 
    25 # Revision 1.5  2004/12/09 22:12:56  jimmyo 
    26 # Added "graph_period" option, to make "graph_sums" usable. 
    27 # 
    28 # Revision 1.4  2004/11/21 00:17:12  jimmyo 
    29 # Changed a lot of plugins so they use DERIVE instead of COUNTER. 
    30 # 
    31 # Revision 1.3  2004/05/20 19:02:37  jimmyo 
    32 # Set categories on a bunch of plugins 
    33 # 
    34 # Revision 1.2  2004/05/15 21:33:29  jimmyo 
    35 # "Upped" som plugins from contrib/manual to manual or auto. 
    36 # 
    37 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    38 # Renamed occurrances of lrrd -> munin 
    39 # 
    40 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    41 # Import of LRRD CVS tree after renaming to Munin 
    42 # 
    43 # Revision 1.3  2003/11/07 22:12:50  jimmyo 
    44 # Changed deprecated plugin options 
    45 # 
    46 # Revision 1.2  2003/11/07 17:43:16  jimmyo 
    47 # Cleanups and log entries 
    48 # 
    4917# 
    5018#%# family=manual 
  • people/ilmari/modularisation-branch/node/node.d.sunos/cpu.in

    r864 r1012  
    99#       config   (required) 
    1010#       autoconf (optional - used by munin-config) 
    11 # 
    12 # $Log$ 
    13 # Revision 1.9  2004/12/10 10:47:50  jimmyo 
    14 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    15 # 
    16 # Revision 1.8  2004/12/09 22:12:56  jimmyo 
    17 # Added "graph_period" option, to make "graph_sums" usable. 
    18 # 
    19 # Revision 1.7  2004/12/09 17:20:16  jimmyo 
    20 # Patched sunos/cpu to work on Solaris 9 (SF#1077899). 
    21 # 
    22 # Revision 1.6  2004/11/21 00:17:12  jimmyo 
    23 # Changed a lot of plugins so they use DERIVE instead of COUNTER. 
    24 # 
    25 # Revision 1.5  2004/05/20 19:02:38  jimmyo 
    26 # Set categories on a bunch of plugins 
    27 # 
    28 # Revision 1.4  2004/05/06 21:39:54  jimmyo 
    29 # Added plugin acpi, contributed by Alexandre Dupouy. 
    30 # 
    31 # Revision 1.3  2004/04/30 16:43:00  jimmyo 
    32 # Cleaned up Solaris plugins. 
    33 # 
    34 # Revision 1.2  2004/02/18 16:39:37  jimmyo 
    35 # Turned off scaling of values for cpu-graphs (no more nano-percentages). 
    36 # 
    37 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    38 # Renamed occurrances of lrrd -> munin 
    39 # 
    40 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    41 # Import of LRRD CVS tree after renaming to Munin 
    42 # 
    43 # Revision 1.5  2003/11/07 22:12:51  jimmyo 
    44 # Changed deprecated plugin options 
    45 # 
    46 # Revision 1.4  2003/11/07 17:43:16  jimmyo 
    47 # Cleanups and log entries 
    48 # 
    49 # 
    5011# 
    5112# Magic markers - optional - used by installation scripts and 
  • people/ilmari/modularisation-branch/node/node.d.sunos/fs_df.in

    r864 r1012  
    11#!/bin/sh 
    22 
    3 # $Log$ 
    4 # Revision 1.4  2004/05/20 19:02:38  jimmyo 
    5 # Set categories on a bunch of plugins 
    6 # 
    7 # Revision 1.3  2004/05/15 21:33:30  jimmyo 
    8 # "Upped" som plugins from contrib/manual to manual or auto. 
    9 # 
    10 # Revision 1.2  2004/05/06 19:38:30  jimmyo 
    11 # Made solaris-plugin fs_df work without GNU df (SF#944389). 
    12 # 
    13 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    14 # Renamed occurrances of lrrd -> munin 
    15 # 
    16 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    17 # Import of LRRD CVS tree after renaming to Munin 
    18 # 
    19 # Revision 1.2  2003/11/07 17:43:16  jimmyo 
    20 # Cleanups and log entries 
    21 # 
    22 # 
    233#%# family=manual 
    244 
     
    3212                echo 'graph_category disk' 
    3313        $DF -k -l | $TAIL +2 | while read i; do 
    34                 name=`echo $i | sed 's/[\/.]/_/g' | awk '{ print $6 }' | $TAIL -15c` 
     14                name=`echo $i | sed 's/[\/.-]/_/g' | awk '{ print $6 }' | $TAIL -15c` 
    3515                printf "$name.label " 
    3616                echo $i | awk '{ print $6 }' 
     
    4222 
    4323$DF -k -l | $TAIL +2 | while read i; do 
    44         name=`echo $i | sed 's/[\/.]/_/g' | awk '{ print $6 }' | $TAIL -15c` 
     24        name=`echo $i | sed 's/[\/.-]/_/g' | awk '{ print $6 }' | $TAIL -15c` 
    4525        printf "$name.value " 
    4626        echo $i | awk '{ print $5 }' | cut -f1 -d%  
  • people/ilmari/modularisation-branch/node/node.d.sunos/fs_inodes.in

    r864 r1012  
    44# 
    55#   fs_df  - path to df executable (GNU df makes life easier) 
    6 # 
    7 # $Log$ 
    8 # Revision 1.4  2004/12/09 17:53:38  jimmyo 
    9 # Portability enhancementes to sunos/fs_df (SF#1077903). 
    10 # 
    11 # Revision 1.3  2004/05/20 19:02:38  jimmyo 
    12 # Set categories on a bunch of plugins 
    13 # 
    14 # Revision 1.2  2004/05/15 21:33:30  jimmyo 
    15 # "Upped" som plugins from contrib/manual to manual or auto. 
    16 # 
    17 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    18 # Renamed occurrances of lrrd -> munin 
    19 # 
    20 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    21 # Import of LRRD CVS tree after renaming to Munin 
    22 # 
    23 # Revision 1.2  2003/11/07 17:43:16  jimmyo 
    24 # Cleanups and log entries 
    256# 
    267#%# family=manual 
     
    4526                echo 'graph_category disk' 
    4627        eval $DF | $TAIL +2 | while read i; do 
    47                 name=`echo $i | sed 's/[\/.]/_/g' | awk '{ print $1 }'` 
     28                name=`echo $i | sed 's/[\/.-]/_/g' | awk '{ print $1 }'` 
    4829                # Ignore tmpfs. 
    4930                if [ "$name" != "swap" ]; then 
     
    5839 
    5940eval $DF | $TAIL +2 | while read i; do 
    60         name=`echo $i | sed 's/[\/.]/_/g' | awk '{ print $1 }'` 
     41        name=`echo $i | sed 's/[\/.-]/_/g' | awk '{ print $1 }'` 
    6142        # Ignore tmpfs. 
    6243        if [ "$name" != "swap" ]; then 
  • people/ilmari/modularisation-branch/node/node.d.sunos/if_.in

    r864 r1012  
    99# 
    1010# Any device found in /usr/bin/kstat can be monitored. 
    11 # 
    12 # $Log$ 
    13 # Revision 1.5  2004/12/10 10:47:50  jimmyo 
    14 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    15 # 
    16 # Revision 1.4  2004/12/09 22:12:56  jimmyo 
    17 # Added "graph_period" option, to make "graph_sums" usable. 
    18 # 
    19 # Revision 1.3  2004/05/20 19:02:38  jimmyo 
    20 # Set categories on a bunch of plugins 
    21 # 
    22 # Revision 1.2  2004/04/30 16:43:00  jimmyo 
    23 # Cleaned up Solaris plugins. 
    24 # 
    25 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    26 # Renamed occurrances of lrrd -> munin 
    27 # 
    28 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    29 # Import of LRRD CVS tree after renaming to Munin 
    30 # 
    31 # Revision 1.3  2003/11/07 22:12:51  jimmyo 
    32 # Changed deprecated plugin options 
    33 # 
    34 # Revision 1.2  2003/11/07 17:43:16  jimmyo 
    35 # Cleanups and log entries 
    36 # 
    37 # 
    3811# 
    3912# Magic markers (optional - used by munin-config and some installation 
  • people/ilmari/modularisation-branch/node/node.d.sunos/if_errcoll_.in

    r864 r1012  
    99# 
    1010# Any device found in /usr/bin/kstat can be monitored. 
    11 # 
    12 # $Log$ 
    13 # Revision 1.5  2004/12/10 10:47:50  jimmyo 
    14 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    15 # 
    16 # Revision 1.4  2004/12/09 22:12:56  jimmyo 
    17 # Added "graph_period" option, to make "graph_sums" usable. 
    18 # 
    19 # Revision 1.3  2004/05/20 19:02:38  jimmyo 
    20 # Set categories on a bunch of plugins 
    21 # 
    22 # Revision 1.2  2004/04/30 16:43:00  jimmyo 
    23 # Cleaned up Solaris plugins. 
    24 # 
    25 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    26 # Renamed occurrances of lrrd -> munin 
    27 # 
    28 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    29 # Import of LRRD CVS tree after renaming to Munin 
    30 # 
    31 # Revision 1.2  2003/11/07 17:43:16  jimmyo 
    32 # Cleanups and log entries 
    33 # 
    34 # 
    3511# 
    3612# Magic markers (optional - used by munin-config and some installation 
  • people/ilmari/modularisation-branch/node/node.d.sunos/io_busy_.in

    r864 r1012  
    2222#   $F[1] is the instance number. $F[2] is the device name , e.g. 
    2323#   'dad0'. 
    24 # 
    25 # $Log$ 
    26 # Revision 1.5  2004/12/09 17:48:19  jimmyo 
    27 # Major improvements to sunos/io_ops,bytes,busy, by Lupe Christoph (SF#1077898). 
    28 # 
    29 # Revision 1.4  2004/11/21 00:17:12  jimmyo 
    30 # Changed a lot of plugins so they use DERIVE instead of COUNTER. 
    31 # 
    32 # Revision 1.3  2004/05/20 19:02:38  jimmyo 
    33 # Set categories on a bunch of plugins 
    34 # 
    35 # Revision 1.2  2004/04/30 16:43:00  jimmyo 
    36 # Cleaned up Solaris plugins. 
    37 # 
    38 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    39 # Renamed occurrances of lrrd -> munin 
    40 # 
    41 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    42 # Import of LRRD CVS tree after renaming to Munin 
    43 # 
    44 # Revision 1.2  2003/11/07 17:43:16  jimmyo 
    45 # Cleanups and log entries 
    46 # 
    47 # 
    4824# 
    4925# Magic markers (optional - used by munin-config and some installation 
  • people/ilmari/modularisation-branch/node/node.d.sunos/io_bytes_.in

    r864 r1012  
    2222#   $F[1] is the instance number. $F[2] is the device name , e.g. 
    2323#   'dad0'. 
    24 # 
    25 # $Log$ 
    26 # Revision 1.5  2004/12/09 17:48:34  jimmyo 
    27 # Major improvements to sunos/io_ops,bytes,busy, by Lupe Christoph (SF#1077898). 
    28 # 
    29 # Revision 1.4  2004/11/21 00:17:12  jimmyo 
    30 # Changed a lot of plugins so they use DERIVE instead of COUNTER. 
    31 # 
    32 # Revision 1.3  2004/05/20 19:02:38  jimmyo 
    33 # Set categories on a bunch of plugins 
    34 # 
    35 # Revision 1.2  2004/04/30 16:43:00  jimmyo 
    36 # Cleaned up Solaris plugins. 
    37 # 
    38 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    39 # Renamed occurrances of lrrd -> munin 
    40 # 
    41 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    42 # Import of LRRD CVS tree after renaming to Munin 
    43 # 
    44 # Revision 1.2  2003/11/07 17:43:16  jimmyo 
    45 # Cleanups and log entries 
    46 # 
    47 # 
    4824# 
    4925# Magic markers (optional - used by munin-config and some installation 
  • people/ilmari/modularisation-branch/node/node.d.sunos/io_ops_.in

    r864 r1012  
    2222#   $F[1] is the instance number. $F[2] is the device name , e.g. 
    2323#   'dad0'. 
    24 # 
    25 # $Log$ 
    26 # Revision 1.5  2004/12/09 17:48:34  jimmyo 
    27 # Major improvements to sunos/io_ops,bytes,busy, by Lupe Christoph (SF#1077898). 
    28 # 
    29 # Revision 1.4  2004/11/21 00:17:12  jimmyo 
    30 # Changed a lot of plugins so they use DERIVE instead of COUNTER. 
    31 # 
    32 # Revision 1.3  2004/05/20 19:02:38  jimmyo 
    33 # Set categories on a bunch of plugins 
    34 # 
    35 # Revision 1.2  2004/04/30 16:43:00  jimmyo 
    36 # Cleaned up Solaris plugins. 
    37 # 
    38 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    39 # Renamed occurrances of lrrd -> munin 
    40 # 
    41 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    42 # Import of LRRD CVS tree after renaming to Munin 
    43 # 
    44 # Revision 1.2  2003/11/07 17:43:16  jimmyo 
    45 # Cleanups and log entries 
    46 # 
    47 # 
    4824# 
    4925# Magic markers (optional - used by munin-config and some installation 
  • people/ilmari/modularisation-branch/node/node.d.sunos/load.in

    r864 r1012  
    11#!/bin/sh 
    22 
    3 # $Log$ 
    4 # Revision 1.3  2004/05/20 19:02:38  jimmyo 
    5 # Set categories on a bunch of plugins 
    6 # 
    7 # Revision 1.2  2004/05/15 21:33:30  jimmyo 
    8 # "Upped" som plugins from contrib/manual to manual or auto. 
    9 # 
    10 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    11 # Renamed occurrances of lrrd -> munin 
    12 # 
    13 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    14 # Import of LRRD CVS tree after renaming to Munin 
    15 # 
    16 # Revision 1.3  2003/11/07 17:43:16  jimmyo 
    17 # Cleanups and log entries 
    18 # 
    193#%# family=auto 
    204#%# capabilities=autoconf 
  • people/ilmari/modularisation-branch/node/node.d.sunos/memory.in

    r864 r1012  
    11#!/bin/sh 
    2 # 
    3 # $Log$ 
    4 # Revision 1.5  2005/03/07 19:05:30  jimmyo 
    5 # sunos/memory repaired (SF#1143610). 
    6 # 
    7 # Revision 1.4  2004/05/20 19:02:38  jimmyo 
    8 # Set categories on a bunch of plugins 
    9 # 
    10 # Revision 1.3  2004/05/15 21:33:30  jimmyo 
    11 # "Upped" som plugins from contrib/manual to manual or auto. 
    12 # 
    13 # Revision 1.2  2004/05/09 20:42:08  jimmyo 
    14 # Fixed problem with sunos/memory, when memory was reported in gigabytes (SF#930964). 
    15 # 
    16 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    17 # Renamed occurrances of lrrd -> munin 
    18 # 
    19 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    20 # Import of LRRD CVS tree after renaming to Munin 
    21 # 
    22 # Revision 1.2  2003/11/07 17:43:16  jimmyo 
    23 # Cleanups and log entries 
    24 # 
    25 # 
    262# 
    273#%# family=manual 
     
    4521# Memory: 320M real, 142M free, 129M swap in use, 1095M swap free 
    4622 
    47 MEMLINE=`$TOP -n -u | /bin/grep "^Memory"` 
     23$TOP -n -u | nawk ' 
     24function scale(value) { 
     25  if (value ~ /G$/) { sub("G", "", value); value *= 1024 } 
     26  else if (value ~ /M$/) sub("M", "", value) 
     27  else if (value ~ /K$/) { sub("K", "", value); value /= 1024 } 
     28  else value /= 1024 * 1024; 
     29  return value; 
     30
     31/^Memory/ { 
     32  real  = scale($2); 
     33  free  = scale($4); 
     34  swapu = scale($6); 
     35  swapf = scale($10); 
    4836 
    49 REAL=`echo $MEMLINE | nawk '$2~/G$/ {sub("G","",$2);$2=$2 * 1024} $2~/M$/ {printf "%d\n", $2}'` 
    50 FREE=`echo $MEMLINE | nawk '$4~/G$/ {sub("G","",$4);$4=$4 * 1024} $2~/M$/ {printf "%d\n", $4}'` 
    51 SWAPU=`echo $MEMLINE | nawk '$6~/G$/ {sub("G","",$6);$6=$6 * 1024} $2~/M$/ {printf "%d\n", $6}'` 
    52 SWAPF=`echo $MEMLINE | nawk '$10~/G$/ {sub("G","",$10);$10=$10 * 1024} $2~/M$/ {printf "%d\n", $10}'` 
     37  memused = real - free 
     38  swaptot = swapu + swapf 
    5339 
    54 MEMUSED=`expr $REAL - $FREE` 
    55 SWAPTOT=`expr $SWAPU + $SWAPF` 
    56  
    57 echo "real.value $REAL" 
    58 echo "used.value $MEMUSED" 
    59 echo "swapt.value $SWAPTOT" 
    60 echo "swapu.value $SWAPU" 
     40  print "real.value", real 
     41  print "used.value", memused 
     42  print "swapt.value", swaptot 
     43  print "swapu.value", swapu 
     44}' 
  • people/ilmari/modularisation-branch/node/node.d.sunos/netstat.in

    r864 r1012  
    22# 
    33# $Id$ 
    4 # 
    5 # $Log$ 
    6 # Revision 1.6  2004/12/10 18:51:44  jimmyo 
    7 # linux/apt* has been forced to LANG=C, to get predictable output. 
    8 # 
    9 # Revision 1.5  2004/12/10 10:47:50  jimmyo 
    10 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    11 # 
    12 # Revision 1.4  2004/12/09 22:12:56  jimmyo 
    13 # Added "graph_period" option, to make "graph_sums" usable. 
    14 # 
    15 # Revision 1.3  2004/11/21 00:17:12  jimmyo 
    16 # Changed a lot of plugins so they use DERIVE instead of COUNTER. 
    17 # 
    18 # Revision 1.2  2004/05/20 19:02:38  jimmyo 
    19 # Set categories on a bunch of plugins 
    20 # 
    21 # Revision 1.1  2004/01/29 19:21:20  jimmyo 
    22 # Moved generic netstat to linux-dir, as it is too spesific. Added Solaris version of the plugin as well. (SF#882354) 
    23 # 
    244# 
    255# Parameters: 
     
    3313use strict; 
    3414 
    35 if (exists $ARGV[0] and $ARGV[0] eq "autoconf") { 
     15if (defined $ARGV[0] and $ARGV[0] eq "autoconf") { 
    3616  print "yes\n"; 
    3717  exit; 
    38 } elsif (exists $ARGV[0] and $ARGV[0] eq "config") { 
     18} elsif (defined $ARGV[0] and $ARGV[0] eq "config") { 
    3919  print "graph_title Netstat\n"; 
    4020  print "graph_args -l 0 --base 1000\n"; 
  • people/ilmari/modularisation-branch/node/node.d.sunos/paging_in.in

    r864 r1012  
    99#       config   (required) 
    1010#       autoconf (optional - used by munin-config) 
    11 # 
    12 # $Log$ 
    13 # Revision 1.4  2004/11/21 00:17:12  jimmyo 
    14 # Changed a lot of plugins so they use DERIVE instead of COUNTER. 
    15 # 
    16 # Revision 1.3  2004/05/20 19:02:38  jimmyo 
    17 # Set categories on a bunch of plugins 
    18 # 
    19 # Revision 1.2  2004/04/30 16:43:00  jimmyo 
    20 # Cleaned up Solaris plugins. 
    21 # 
    22 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    23 # Renamed occurrances of lrrd -> munin 
    24 # 
    25 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    26 # Import of LRRD CVS tree after renaming to Munin 
    27 # 
    28 # Revision 1.2  2003/11/07 17:43:16  jimmyo 
    29 # Cleanups and log entries 
    30 # 
    31 # 
    3211# 
    3312# Magic markers - optional - used by installation scripts and 
  • people/ilmari/modularisation-branch/node/node.d.sunos/paging_out.in

    r864 r1012  
    99#       config   (required) 
    1010#       autoconf (optional - used by munin-config) 
    11 # 
    12 # $Log$ 
    13 # Revision 1.4  2004/11/21 00:17:12  jimmyo 
    14 # Changed a lot of plugins so they use DERIVE instead of COUNTER. 
    15 # 
    16 # Revision 1.3  2004/05/20 19:02:38  jimmyo 
    17 # Set categories on a bunch of plugins 
    18 # 
    19 # Revision 1.2  2004/04/30 16:43:00  jimmyo 
    20 # Cleaned up Solaris plugins. 
    21 # 
    22 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    23 # Renamed occurrances of lrrd -> munin 
    24 # 
    25 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    26 # Import of LRRD CVS tree after renaming to Munin 
    27 # 
    28 # Revision 1.2  2003/11/07 17:43:16  jimmyo 
    29 # Cleanups and log entries 
    30 # 
    31 # 
    3211# 
    3312# Magic markers - optional - used by installation scripts and 
  • people/ilmari/modularisation-branch/node/node.d.sunos/processes.in

    r864 r1012  
    11#!/bin/sh 
    2 # 
    3 # $Log$ 
    4 # Revision 1.3  2004/05/20 19:02:38  jimmyo 
    5 # Set categories on a bunch of plugins 
    6 # 
    7 # Revision 1.2  2004/05/15 21:33:30  jimmyo 
    8 # "Upped" som plugins from contrib/manual to manual or auto. 
    9 # 
    10 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    11 # Renamed occurrances of lrrd -> munin 
    12 # 
    13 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    14 # Import of LRRD CVS tree after renaming to Munin 
    15 # 
    16 # Revision 1.3  2003/11/07 17:43:16  jimmyo 
    17 # Cleanups and log entries 
    182# 
    193#%# family=auto 
     
    4731fi 
    4832 
    49 # STATS=`/usr/bin/ps -el | /bin/cut -b4 | /bin/tr -s '[\n]' '[ ]'` 
    50 STATS=`/usr/bin/ps -el | /bin/cut -b4` 
    51  
    52 /bin/printf "total.value" 
    53 /bin/echo $STATS | /bin/wc -w 
    54  
    55 /bin/printf "running.value " 
    56 # /bin/echo $STATS | /usr/local/bin/perl -ne 'print y/O//, "\n"' 
    57 /usr/local/bin/expr length "`echo $STATS | tr -cd O`" 
    58 # FOO=$(echo $STATS |tr -cd O); echo ${#FOO} 
    59  
    60 /bin/printf "sleeping.value " 
    61 # /bin/echo $STATS | /usr/local/bin/perl -ne 'print y/S//, "\n"' 
    62 /usr/local/bin/expr length "`echo $STATS | tr -cd S`" 
    63 # FOO=$(echo $STATS |tr -cd S); echo ${#FOO} 
    64  
    65 /bin/printf "runnable.value " 
    66 # /bin/echo $STATS | /usr/local/bin/perl -ne 'print y/R//, "\n"' 
    67 /usr/local/bin/expr length "`echo $STATS | tr -cd R`" 
    68 # FOO=$(echo $STATS |tr -cd R); echo ${#FOO} 
    69  
    70 /bin/printf "stopped.value " 
    71 # /bin/echo $STATS | /usr/local/bin/perl -ne 'print y/T//, "\n"' 
    72 /usr/local/bin/expr length "`echo $STATS | tr -cd T`" 
    73 # FOO=$(echo $STATS |tr -cd T); echo ${#FOO} 
    74  
    75 /bin/printf "zombie.value " 
    76 # /bin/echo $STATS | /usr/local/bin/perl -ne 'print y/Z//, "\n"' 
    77 /usr/local/bin/expr length "`echo $STATS | tr -cd Z`" 
    78 # FOO=$(echo $STATS |tr -cd Z); echo ${#FOO} 
     33/usr/bin/ps -el | awk ' 
     34{ total++; stat[$2]++ } 
     35END { 
     36print "total.value "    0+total; 
     37print "running.value "  0+stat["O"]; 
     38print "sleeping.value " 0+stat["S"]; 
     39print "runnable.value " 0+stat["R"]; 
     40print "stopped.value "  0+stat["T"]; 
     41print "zombie.value "   0+stat["Z"]; 
     42}' 
  • people/ilmari/modularisation-branch/node/node.d.sunos/temperature.in

    r864 r1012  
    1111# 
    1212# Revision 1.1  2004/04/16 Richard van den Berg <richard@vdberg.org> 
    13 # 
    14 # $Log$ 
    15 # Revision 1.3  2004/05/20 19:02:38  jimmyo 
    16 # Set categories on a bunch of plugins 
    17 # 
    18 # Revision 1.2  2004/05/15 21:33:30  jimmyo 
    19 # "Upped" som plugins from contrib/manual to manual or auto. 
    20 # 
    2113# 
    2214#%# family=auto 
  • people/ilmari/modularisation-branch/node/node.d/acpi.in

    r864 r1012  
    77# 
    88#       acpi      - Override path to acpi program 
    9 # 
    10 # 
    11 # $Log$ 
    12 # Revision 1.6  2004/10/19 19:14:18  jimmyo 
    13 # Plugin generic/acpi now autodetects even if the acpi version does not contain the acpi_available program. 
    14 # 
    15 # Revision 1.5  2004/09/14 20:47:34  jimmyo 
    16 # Updated/simplified plugin. 
    17 # 
    18 # Revision 1.4  2004/05/20 19:02:36  jimmyo 
    19 # Set categories on a bunch of plugins 
    20 # 
    21 # Revision 1.3  2004/05/14 21:16:46  jimmyo 
    22 # "Upped" som plugins from contrib/manual to auto. 
    23 # 
    24 # Revision 1.2  2004/05/14 20:32:06  jimmyo 
    25 # Improved autoconf mechanism 
    26 # 
    27 # Revision 1.1  2004/05/06 21:39:54  jimmyo 
    28 # Added plugin acpi, contributed by Alexandre Dupouy. 
    299# 
    3010# 
  • people/ilmari/modularisation-branch/node/node.d/amavis.in

    r864 r1012  
    1515# 
    1616 
    17 TEMP_FILE=`mktemp /tmp/lrrd-amavis.XXXXXX` 
     17mktempfile () { 
     18@@MKTEMP@@ 
     19
     20 
    1821AMAVIS_LOG=${logfile:-/var/log/mail/mail.info} 
    1922LOGTAIL=${logtail:-`which logtail`} 
     
    5760spams=U 
    5861 
    59 if [ -e $TEMP_FILE -a -f $TEMP_FILE ] 
     62TEMP_FILE=`mktempfile munin-amavis.XXXXXX` 
     63 
     64if [ -n "$TEMP_FILE" -a -f "$TEMP_FILE" ] 
    6065then 
    6166        if [ $ARGS != 0 ]; then 
     
    6873        spamm=`grep 'Passed.*Hits: 1[0-9][.]' ${TEMP_FILE} | wc -l` 
    6974        spams=`grep 'Passed.*Hits: [2-9][0-9][0-9]*[.]' ${TEMP_FILE} | wc -l` 
    70         /bin/rm $TEMP_FILE 
     75 
     76        /bin/rm -f $TEMP_FILE 
    7177fi 
    7278 
  • people/ilmari/modularisation-branch/node/node.d/apache_accesses.in

    r864 r1012  
    2424#       ports    - HTTP port numbers 
    2525# 
    26 # $Log$ 
    27 # Revision 1.12  2004/12/10 18:51:43  jimmyo 
    28 # linux/apt* has been forced to LANG=C, to get predictable output. 
    29 # 
    30 # Revision 1.11  2004/12/10 10:47:47  jimmyo 
    31 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    32 # 
    33 # Revision 1.10  2004/12/09 22:12:54  jimmyo 
    34 # Added "graph_period" option, to make "graph_sums" usable. 
    35 # 
    36 # Revision 1.9  2004/09/26 22:14:39  jimmyo 
    37 # Changd COUNTER -> DERIVE for some plugins. Set min/max values. 
    38 # 
    39 # Revision 1.8  2004/05/20 13:57:11  jimmyo 
    40 # Set categories to some of the plugins. 
    41 # 
    42 # Revision 1.7  2004/05/14 21:16:46  jimmyo 
    43 # "Upped" som plugins from contrib/manual to auto. 
    44 # 
    45 # Revision 1.6  2004/04/27 21:32:06  jimmyo 
    46 # Clarified the vlabels in the apache-plugins (Deb#238594). 
    47 # 
    48 # Revision 1.5  2004/04/27 08:46:57  jimmyo 
    49 # Fixed broken autoconf in apache-* plugins (Deb#236144). 
    50 # 
    51 # Revision 1.4  2004/02/18 15:47:35  jimmyo 
    52 # The generic/apache_* plugins now have defined max values. 
    53 # 
    54 # Revision 1.3  2004/02/03 17:17:25  jimmyo 
    55 # Generic/apache-plugins have been modified to properly to report the correct autoconf value. Also, bugfixes in _processes and _volume. 
    56 # 
    57 # Revision 1.2  2004/01/29 18:47:30  jimmyo 
    58 # Made plugins apache_* compatible with older versions of LWP::UserAgent (SF#881411). 
    59 # 
    60 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    61 # Renamed occurrances of lrrd -> munin 
    62 # 
    63 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    64 # Import of LRRD CVS tree after renaming to Munin 
    65 # 
    66 # Revision 1.4  2003/12/18 16:35:33  jimmyo 
    67 # fail more gracefully when using uninstalled perl modules. 
    68 # 
    69 # Revision 1.3  2003/11/07 17:43:16  jimmyo 
    70 # Cleanups and log entries 
    71 # 
    72 # 
    73 # 
    7426# Magic markers: 
    7527#%# family=auto 
     
    8638my @PORTS = exists $ENV{'ports'} ? split(' ', $ENV{'ports'}) : (80); 
    8739 
    88 if ( exists $ARGV[0] and $ARGV[0] eq "autoconf" ) 
     40if ( defined $ARGV[0] and $ARGV[0] eq "autoconf" ) 
    8941{ 
    9042        if ($ret) 
     
    11163} 
    11264 
    113 if ( exists $ARGV[0] and $ARGV[0] eq "config" ) 
     65if ( defined $ARGV[0] and $ARGV[0] eq "config" ) 
    11466{ 
    11567        print "graph_title Apache accesses\n"; 
  • people/ilmari/modularisation-branch/node/node.d/apache_processes.in

    r864 r1012  
    2323#       url      - Override default status-url 
    2424# 
    25 # $Log$ 
    26 # Revision 1.8  2005/02/24 17:50:40  jimmyo 
    27 # modified graph_args of generic/apache_processes, to work around an rrdtool bug (Deb#296528). 
    28 # 
    29 # Revision 1.7  2004/05/20 13:57:11  jimmyo 
    30 # Set categories to some of the plugins. 
    31 # 
    32 # Revision 1.6  2004/05/14 21:16:46  jimmyo 
    33 # "Upped" som plugins from contrib/manual to auto. 
    34 # 
    35 # Revision 1.5  2004/04/27 08:46:57  jimmyo 
    36 # Fixed broken autoconf in apache-* plugins (Deb#236144). 
    37 # 
    38 # Revision 1.4  2004/02/03 17:17:25  jimmyo 
    39 # Generic/apache-plugins have been modified to properly to report the correct autoconf value. Also, bugfixes in _processes and _volume. 
    40 # 
    41 # Revision 1.3  2004/01/29 18:47:30  jimmyo 
    42 # Made plugins apache_* compatible with older versions of LWP::UserAgent (SF#881411). 
    43 # 
    44 # Revision 1.2  2004/01/29 18:26:12  jimmyo 
    45 # Bugfix, apache_processes now takes port numbers into account. (SF#882263) 
    46 # 
    47 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    48 # Renamed occurrances of lrrd -> munin 
    49 # 
    50 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    51 # Import of LRRD CVS tree after renaming to Munin 
    52 # 
    53 # Revision 1.4  2003/12/18 16:55:45  jimmyo 
    54 # Enabled multiple ports 
    55 # 
    56 # Revision 1.3  2003/12/18 16:35:33  jimmyo 
    57 # fail more gracefully when using uninstalled perl modules. 
    58 # 
    59 # Revision 1.2  2003/11/07 17:43:16  jimmyo 
    60 # Cleanups and log entries 
    61 # 
    62 # 
    63 # 
    6425# Magic markers: 
    6526#%# family=auto 
     
    7536my @PORTS = exists $ENV{'ports'} ? split(' ', $ENV{'ports'}) : (80); 
    7637 
    77 if ( exists $ARGV[0] and $ARGV[0] eq "autoconf" ) 
     38if ( defined $ARGV[0] and $ARGV[0] eq "autoconf" ) 
    7839{ 
    7940        if ($ret) 
     
    10364} 
    10465 
    105 if ( exists $ARGV[0] and $ARGV[0] eq "config" ) 
     66if ( defined $ARGV[0] and $ARGV[0] eq "config" ) 
    10667{ 
    10768        print "graph_title Apache processes\n"; 
  • people/ilmari/modularisation-branch/node/node.d/apache_volume.in

    r864 r1012  
    2424#       ports    - HTTP port numbers 
    2525# 
    26 # $Log$ 
    27 # Revision 1.12  2004/12/10 18:51:43  jimmyo 
    28 # linux/apt* has been forced to LANG=C, to get predictable output. 
    29 # 
    30 # Revision 1.11  2004/12/10 10:47:47  jimmyo 
    31 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    32 # 
    33 # Revision 1.10  2004/12/09 22:12:54  jimmyo 
    34 # Added "graph_period" option, to make "graph_sums" usable. 
    35 # 
    36 # Revision 1.9  2004/09/26 22:14:39  jimmyo 
    37 # Changd COUNTER -> DERIVE for some plugins. Set min/max values. 
    38 # 
    39 # Revision 1.8  2004/05/20 13:57:12  jimmyo 
    40 # Set categories to some of the plugins. 
    41 # 
    42 # Revision 1.7  2004/05/14 21:16:46  jimmyo 
    43 # "Upped" som plugins from contrib/manual to auto. 
    44 # 
    45 # Revision 1.6  2004/04/27 21:32:06  jimmyo 
    46 # Clarified the vlabels in the apache-plugins (Deb#238594). 
    47 # 
    48 # Revision 1.5  2004/04/27 08:46:57  jimmyo 
    49 # Fixed broken autoconf in apache-* plugins (Deb#236144). 
    50 # 
    51 # Revision 1.4  2004/02/18 15:47:35  jimmyo 
    52 # The generic/apache_* plugins now have defined max values. 
    53 # 
    54 # Revision 1.3  2004/02/03 17:17:25  jimmyo 
    55 # Generic/apache-plugins have been modified to properly to report the correct autoconf value. Also, bugfixes in _processes and _volume. 
    56 # 
    57 # Revision 1.2  2004/01/29 18:47:30  jimmyo 
    58 # Made plugins apache_* compatible with older versions of LWP::UserAgent (SF#881411). 
    59 # 
    60 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    61 # Renamed occurrances of lrrd -> munin 
    62 # 
    63 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    64 # Import of LRRD CVS tree after renaming to Munin 
    65 # 
    66 # Revision 1.4  2003/12/18 16:35:33  jimmyo 
    67 # fail more gracefully when using uninstalled perl modules. 
    68 # 
    69 # Revision 1.3  2003/11/07 17:43:16  jimmyo 
    70 # Cleanups and log entries 
    71 # 
    72 # 
    73 # 
    7426# Magic markers: 
    7527#%# family=auto 
     
    8537my @PORTS = exists $ENV{'ports'} ? split(' ', $ENV{'ports'}) : (80); 
    8638 
    87 if ( exists $ARGV[0] and $ARGV[0] eq "autoconf" ) 
     39if ( defined $ARGV[0] and $ARGV[0] eq "autoconf" ) 
    8840{ 
    8941        if ($ret) 
     
    11062} 
    11163 
    112 if ( exists $ARGV[0] and $ARGV[0] eq "config" ) 
     64if ( defined $ARGV[0] and $ARGV[0] eq "config" ) 
    11365{ 
    11466        print "graph_title Apache volume\n"; 
  • people/ilmari/modularisation-branch/node/node.d/apc_nis.in

    r864 r1012  
    1 #!/usr/bin/perl -w 
     1#!@@PERL@@ -w 
    22# 
    33# Plugin to monitor APC UPS via the nis port of apcupsd. 
     
    66# 
    77#   config   (required) 
    8 # 
    9 # $Log$ 
    10 # Revision 1.1  2004/11/10 15:34:18  jimmyo 
    11 # Added new plugin generic/apc_nis to monitor APC UPS, contributed by xavier. 
    12 # 
    138# 
    149# Magic markers (optional - used by munin-config and some installation 
  • people/ilmari/modularisation-branch/node/node.d/bind9.in

    r864 r1012  
    99# 
    1010# Contributed by Nicolai Langfeldt 
    11 # 
    12 # $Log$ 
    13 # Revision 1.10  2005/03/07 19:05:29  jimmyo 
    14 # sunos/memory repaired (SF#1143610). 
    15 # 
    16 # Revision 1.9  2005/02/16 18:04:14  jimmyo 
    17 # minor bugfix in generic/bind9. 
    18 # 
    19 # Revision 1.8  2004/12/10 18:51:43  jimmyo 
    20 # linux/apt* has been forced to LANG=C, to get predictable output. 
    21 # 
    22 # Revision 1.7  2004/12/10 14:21:39  jimmyo 
    23 # Patch generic/bind9 to report "unnamed" as "other" (Nicolas Stransky). 
    24 # 
    25 # Revision 1.6  2004/12/10 10:47:47  jimmyo 
    26 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    27 # 
    28 # Revision 1.5  2004/12/09 22:12:54  jimmyo 
    29 # Added "graph_period" option, to make "graph_sums" usable. 
    30 # 
    31 # Revision 1.4  2004/12/09 20:16:29  jimmyo 
    32 # generic/bind9 now handles syslog format as well (by xavier). 
    33 # 
    34 # Revision 1.3  2004/09/14 20:29:20  jimmyo 
    35 # Added statefile parameter. 
    36 # 
    37 # Revision 1.2  2004/05/14 21:16:46  jimmyo 
    38 # "Upped" som plugins from contrib/manual to auto. 
    39 # 
    40 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    41 # Renamed occurrances of lrrd -> munin 
    42 # 
    43 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    44 # Import of LRRD CVS tree after renaming to Munin 
    45 # 
    46 # Revision 1.1  2003/12/18 21:45:47  jimmyo 
    47 # Plugin contributed by Nicolai Langfeldt 
    48 # 
    4911# 
    5012#%# family=contrib 
  • people/ilmari/modularisation-branch/node/node.d/bind9_rndc.in

    r864 r1012  
    2020#                       set to empty if the stats are updated otherwise 
    2121#       querystats      location of the statistics file 
    22 # 
    23 # $Log$ 
    24 # Revision 1.5  2004/12/15 18:05:40  ilmari 
    25 # - Don't use a state file (the statistics file is enough). 
    26 # - Make rndc and statistics file location configurable. 
    27 # - Linearize control flow. 
    28 # - General style cleanup. 
    29 # 
    3022# 
    3123#%# family=contrib 
  • people/ilmari/modularisation-branch/node/node.d/courier_.in

    r864 r1012  
    2727# courierpop3login: 
    2828# Jan 22 06:28:24 raven courierpop3login: Connection, ip=[::ffff:192.168.0.1] 
     295B 
    2930# Jan 22 06:48:22 raven courierpop3login: DISCONNECTED, user=someuser, ip=[::ffff:192.168.0.1], top=0, retr=0, time=21 
    3031# Jan 22 06:28:24 raven courierpop3login: LOGIN, user=someuser, ip=[::ffff:192.168.0.1] 
     
    3536COURIER_LOG=${logfile:-/var/log/mail.log} 
    3637SERVICE=${service:-`basename $0 | sed 's/^courier_//g'`} 
    37 TEMP_FILE=`mktemp -p /tmp/ munin-courier.XXXXXX` 
    3838OFFSET_FILE=@@PLUGSTATE@@/courier_${SERVICE}.offset 
    3939LOGTAIL=${logtail:-/usr/sbin/logtail} 
    4040 
    41 if [ ! -f "$TEMP_FILE" ]; then 
    42     exit 3 
    43 fi 
     41mktempfile () { 
     42@@MKTEMP@@ 
     43
    4444 
    4545case $1 in 
     
    7676fi 
    7777 
     78TEMP_FILE=`mktempfile munin-courier.XXXXXX` 
     79 
     80if [ -z "$TEMP_FILE" -o ! -f "$TEMP_FILE" ]; then 
     81    exit 3 
     82fi 
     83 
    7884if [ $ARGS != 0 ]; then 
    7985    ${LOGTAIL} -f ${COURIER_LOG} -o ${OFFSET_FILE} | grep "$SERVICE" > ${TEMP_FILE} 
  • people/ilmari/modularisation-branch/node/node.d/courier_mta_mailqueue.in

    r864 r1012  
    1515# 
    1616#       spooldir     - Where to find mails in queue 
    17 # 
    18 # $Log$ 
    19 # Revision 1.1  2004/10/19 18:45:30  jimmyo 
    20 # Added new plugins generic/courier_mta*, contributed by Rune N. Skillingstad. 
    21 # 
    2217# 
    2318# Magic markers (optional - used by munin-config and some installation 
  • people/ilmari/modularisation-branch/node/node.d/courier_mta_mailstats.in

    r864 r1012  
    1616#       logdir       - Where to find logfiles 
    1717#       logfile      - What file to read in logdir 
    18 # 
    19 # $Log$ 
    20 # Revision 1.4  2004/12/10 18:51:43  jimmyo 
    21 # linux/apt* has been forced to LANG=C, to get predictable output. 
    22 # 
    23 # Revision 1.3  2004/12/10 10:47:47  jimmyo 
    24 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    25 # 
    26 # Revision 1.2  2004/12/09 22:12:54  jimmyo 
    27 # Added "graph_period" option, to make "graph_sums" usable. 
    28 # 
    29 # Revision 1.1  2004/10/19 18:45:30  jimmyo 
    30 # Added new plugins generic/courier_mta*, contributed by Rune N. Skillingstad. 
    31 # 
    3218# 
    3319# Magic markers (optional - used by munin-config and some installation 
  • people/ilmari/modularisation-branch/node/node.d/courier_mta_mailvolume.in

    r864 r1012  
    1616#       logdir       - Where to find logfiles 
    1717#       logfile      - What file to read in logdir 
    18 # 
    19 # $Log$ 
    20 # Revision 1.4  2004/12/10 18:51:43  jimmyo 
    21 # linux/apt* has been forced to LANG=C, to get predictable output. 
    22 # 
    23 # Revision 1.3  2004/12/10 10:47:47  jimmyo 
    24 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    25 # 
    26 # Revision 1.2  2004/12/09 22:12:54  jimmyo 
    27 # Added "graph_period" option, to make "graph_sums" usable. 
    28 # 
    29 # Revision 1.1  2004/10/19 18:45:30  jimmyo 
    30 # Added new plugins generic/courier_mta*, contributed by Rune N. Skillingstad. 
    31 # 
    3218# 
    3319# Magic markers (optional - used by munin-config and some installation 
  • people/ilmari/modularisation-branch/node/node.d/cupsys_pages.in

    r864 r1012  
    1515#       logfile      - What file to read in logdir 
    1616#       maxlabel     - Maximum printers to plot 
    17 # 
    18 # $Log$ 
    19 # Revision 1.5  2004/12/10 18:51:43  jimmyo 
    20 # linux/apt* has been forced to LANG=C, to get predictable output. 
    21 # 
    22 # Revision 1.4  2004/12/10 10:47:47  jimmyo 
    23 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    24 # 
    25 # Revision 1.3  2004/12/09 22:12:54  jimmyo 
    26 # Added "graph_period" option, to make "graph_sums" usable. 
    27 # 
    28 # Revision 1.2  2004/11/21 00:16:56  jimmyo 
    29 # Changed a lot of plugins so they use DERIVE instead of COUNTER. 
    30 # 
    31 # Revision 1.1  2004/06/08 14:12:19  jimmyo 
    32 # Added contributed plugin generic/cupsys_pages, contributed by Rune N. Skillingstad. 
    33 # 
    34 # 
    3517# 
    3618# Magic markers (optinal - used by munin-config and some installation 
  • people/ilmari/modularisation-branch/node/node.d/df.in

    r864 r1012  
    77#       config   (required) 
    88#       autoconf (optional - used by munin-config) 
    9 # 
    10 # $Log$ 
    11 # Revision 1.5  2004/12/09 20:27:45  jimmyo 
    12 # Sort fields in df*-plugins alphabetically. 
    13 # 
    14 # Revision 1.4  2004/05/18 22:04:29  jimmyo 
    15 # Use "sed 1d" instead of "tail +2" in df plugins (patch by Olivier Delhomme). 
    16 # 
    17 # Revision 1.3  2004/01/29 19:39:00  jimmyo 
    18 # Generic plugins now use printf instead of echo -n, as this is more portable (SF#885564) 
    19 # 
    20 # Revision 1.2  2004/01/29 18:57:39  jimmyo 
    21 # Disabled plugins df and df_inode on Solaris (SF#882274). 
    22 # 
    23 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    24 # Renamed occurrances of lrrd -> munin 
    25 # 
    26 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    27 # Import of LRRD CVS tree after renaming to Munin 
    28 # 
    29 # Revision 1.6  2003/11/07 17:43:16  jimmyo 
    30 # Cleanups and log entries 
    31 # 
    32 # 
    339# 
    3410# Magic markers (optional - used by munin-config and installation 
  • people/ilmari/modularisation-branch/node/node.d/df_inode.in

    r864 r1012  
    77#       config   (required) 
    88#       autoconf (optional - used by munin-config) 
    9 # 
    10 # $Log$ 
    11 # Revision 1.5  2004/12/09 20:27:45  jimmyo 
    12 # Sort fields in df*-plugins alphabetically. 
    13 # 
    14 # Revision 1.4  2004/05/18 22:04:29  jimmyo 
    15 # Use "sed 1d" instead of "tail +2" in df plugins (patch by Olivier Delhomme). 
    16 # 
    17 # Revision 1.3  2004/01/29 19:39:00  jimmyo 
    18 # Generic plugins now use printf instead of echo -n, as this is more portable (SF#885564) 
    19 # 
    20 # Revision 1.2  2004/01/29 18:57:39  jimmyo 
    21 # Disabled plugins df and df_inode on Solaris (SF#882274). 
    22 # 
    23 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    24 # Renamed occurrances of lrrd -> munin 
    25 # 
    26 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    27 # Import of LRRD CVS tree after renaming to Munin 
    28 # 
    29 # Revision 1.6  2003/11/07 17:43:16  jimmyo 
    30 # Cleanups and log entries 
    31 # 
    32 # 
    339# 
    3410# Magic markers (optional - used by munin-config and installation 
  • people/ilmari/modularisation-branch/node/node.d/dhcpd3.in

    r864 r1012  
    2020#       HTTP::Date 
    2121#        
    22 # $Log$ 
    23 # Revision 1.1  2004/12/10 13:16:19  jimmyo 
    24 # Added plugin generic/dhcpd3, created by Rune N. Skillingstad. 
    25 # 
    26 # 
    27 # 
    2822# Magic markers (optinal - used by munin-config and some installation 
    2923# scripts): 
  • people/ilmari/modularisation-branch/node/node.d/exim_mailqueue.in

    r864 r1012  
    1616#       queuewarn    - When to warn 
    1717#       queuecrit    - When to crit 
    18 # 
    19 # $Log$ 
    20 # Revision 1.4  2004/11/10 15:47:10  jimmyo 
    21 # Made graph_title a parameter for generic/exim_mailqueue (patch by Torstein T. Svendsen, SF#1060834). 
    22 # 
    23 # Revision 1.3  2004/05/20 13:57:12  jimmyo 
    24 # Set categories to some of the plugins. 
    25 # 
    26 # Revision 1.2  2004/01/29 19:39:00  jimmyo 
    27 # Generic plugins now use printf instead of echo -n, as this is more portable (SF#885564) 
    28 # 
    29 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    30 # Renamed occurrances of lrrd -> munin 
    31 # 
    32 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    33 # Import of LRRD CVS tree after renaming to Munin 
    34 # 
    35 # Revision 1.5  2003/11/07 17:43:16  jimmyo 
    36 # Cleanups and log entries 
    37 # 
    38 # 
    3918# 
    4019# Magic markers (optional - used by installation scripts and 
  • people/ilmari/modularisation-branch/node/node.d/exim_mailqueue_alt.in

    r864 r1012  
    1818#       queuewarn       - warning limit 
    1919#       queuecrit       - critical limit 
    20 # 
    21 # $Log$ 
    22 # Revision 1.2  2005/03/17 19:18:36  ilmari 
    23 # Only run 'exim -bpr' once in generic/exim_mailqueue_alt, 
    24 # and use only awk to process the data. 
    25 # 
    26 # Revision 1.1  2004/12/09 20:03:26  jimmyo 
    27 # Added two new plugins contributed by Jacques Caruso, generic/exim_mailqueue_alt and generic/mailscanner. 
    28 # 
    2920# 
    3021# Magic markers: 
  • people/ilmari/modularisation-branch/node/node.d/exim_mailstats.in

    r864 r1012  
    1414#       logdir       - Override what exim says 
    1515#       exim         - Where's exim? 
    16 # 
    17 # $Log$ 
    18 # Revision 1.9  2005/03/12 23:06:30  jimmyo 
    19 # Avoid negative spike in generic/exim_mailstats. 
    20 # 
    21 # Revision 1.8  2005/03/09 19:24:15  jimmyo 
    22 # Thanks to Stephen Gran, generic/exim_mailstats now graphs rejects (Deb#295799). 
    23 # 
    24 # Revision 1.7  2004/12/10 18:51:43  jimmyo 
    25 # linux/apt* has been forced to LANG=C, to get predictable output. 
    26 # 
    27 # Revision 1.6  2004/12/10 10:47:47  jimmyo 
    28 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    29 # 
    30 # Revision 1.5  2004/12/09 22:12:54  jimmyo 
    31 # Added "graph_period" option, to make "graph_sums" usable. 
    32 # 
    33 # Revision 1.4  2004/11/21 00:16:56  jimmyo 
    34 # Changed a lot of plugins so they use DERIVE instead of COUNTER. 
    35 # 
    36 # Revision 1.3  2004/11/10 15:54:49  jimmyo 
    37 # Applied patch from Torstein T. Svendsen to generic/exim_mailstats, to handle logfiles with timestamps in the name (SF#1055214) 
    38 # 
    39 # Revision 1.2  2004/05/20 13:57:12  jimmyo 
    40 # Set categories to some of the plugins. 
    41 # 
    42 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    43 # Renamed occurrances of lrrd -> munin 
    44 # 
    45 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    46 # Import of LRRD CVS tree after renaming to Munin 
    47 # 
    48 # Revision 1.7  2003/11/15 11:10:28  jimmyo 
    49 # Various fixes 
    50 # 
    51 # Revision 1.6  2003/11/07 17:43:16  jimmyo 
    52 # Cleanups and log entries 
    53 # 
    54 # 
    5516# 
    5617# Magic markers (optional - used by munin-config and some installation 
  • people/ilmari/modularisation-branch/node/node.d/foldingathome.in

    r864 r1012  
    77#   config   (required) 
    88#   autoconf (optional - only used by munin-config) 
    9 # 
    10 # $Log$ 
    11 # Revision 1.1  2004/12/09 16:49:30  jimmyo 
    12 # Renamed generic/folding@home to generic/foldingathome (SF#1074241). 
    13 # 
    14 # Revision 1.2  2004/05/09 19:47:24  jimmyo 
    15 # Added Folding@home plugin, contributed by Xavier. 
    16 # 
    179# 
    1810# Magic markers (optional - used by munin-config and some installation 
  • people/ilmari/modularisation-branch/node/node.d/hddtemp.in

    r864 r1012  
    99#        
    1010#       drives          -- List drives to monitor. E.g. "hda hdc". 
    11 # 
    12 # $Log$ 
    13 # Revision 1.5  2005/01/25 21:01:20  jimmyo 
    14 # Added plugin generic/hddtemp_smartctl, made by Lupe Christoph. Made it the default hddtemp plugin. 
    15 # 
    16 # Revision 1.4  2004/11/10 16:00:39  jimmyo 
    17 # Applied patch from Nicolas Stransky to generic/hddtemp, to fetch temp more elegantly (SF#1052845). 
    18 # 
    19 # Revision 1.3  2004/05/20 19:02:36  jimmyo 
    20 # Set categories on a bunch of plugins 
    21 # 
    22 # Revision 1.2  2004/01/29 19:39:00  jimmyo 
    23 # Generic plugins now use printf instead of echo -n, as this is more portable (SF#885564) 
    24 # 
    25 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    26 # Renamed occurrances of lrrd -> munin 
    27 # 
    28 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    29 # Import of LRRD CVS tree after renaming to Munin 
    30 # 
    31 # Revision 1.2  2003/12/18 19:16:00  jimmyo 
    32 # Changes from Alexandre 
    33 # 
    34 # Revision 1.1  2003/12/18 19:04:37  jimmyo 
    35 # New plugin: Alexandre Dupouy contributed "hddtemp". 
    36 # 
    3711# 
    3812#%# family=contrib 
  • people/ilmari/modularisation-branch/node/node.d/hddtemp2.in

    r864 r1012  
    2222# 
    2323# Revision 0.1  2004/02/24 Andrew Radke 
    24 # 
    25 # $Log$ 
    26 # Revision 1.8  2005/01/25 21:01:21  jimmyo 
    27 # Added plugin generic/hddtemp_smartctl, made by Lupe Christoph. Made it the default hddtemp plugin. 
    28 # 
    29 # Revision 1.7  2004/11/20 21:56:15  jimmyo 
    30 # Fixed bug in generic/hddtemp2, patch by arturaz (SF#1037002). 
    31 # 
    32 # Revision 1.6  2004/08/18 17:51:05  jimmyo 
    33 # Made generic/hddtemp2 understand environment variables with quotes (Deb#265022). 
    34 # 
    35 # Revision 1.5  2004/08/18 17:01:37  jimmyo 
    36 # Force LANG/LC_ALL=C in linux/sensors_ and generic/hddtemp2, to remove problems in parsing of sensors output (SF#972749, SF#972748, Deb#255312) 
    37 # 
    38 # Revision 1.4  2004/08/18 16:42:04  jimmyo 
    39 # Force LANG=C in plugin/hddtemp2, to remove problems in parsing of hddtemp output (Deb#253497). 
    40 # 
    41 # Revision 1.3  2004/05/20 19:02:36  jimmyo 
    42 # Set categories on a bunch of plugins 
    43 # 
    44 # Revision 1.2  2004/05/14 21:16:46  jimmyo 
    45 # "Upped" som plugins from contrib/manual to auto. 
    46 # 
    47 # Revision 1.1  2004/05/09 19:34:26  jimmyo 
    48 # Added plugin hddtemp2, contributred by Andrew Radke, modified by Lupe Christoph. 
    49 # 
    5024# 
    5125# Magic markers: 
     
    7650$HDDTEMP .= ' -q '.join(' ', @disks).' 2>/dev/null'; 
    7751 
    78 if ( exists $ARGV[0] and $ARGV[0] eq 'autoconf' ) { 
     52if ( defined $ARGV[0] and $ARGV[0] eq 'autoconf' ) { 
    7953  # Now see if "hddtemp" can run 
    8054  my $text = `$HDDTEMP`; 
     
    9771} 
    9872 
    99 if ( exists $ARGV[0] and $ARGV[0] eq 'config' ) { 
     73if ( defined $ARGV[0] and $ARGV[0] eq 'config' ) { 
    10074  print "graph_title $config{title}\n"; 
    10175  print "graph_vtitle $config{vtitle}\n"; 
  • people/ilmari/modularisation-branch/node/node.d/hddtemp_smartctl.in

    r864 r1012  
    1 #!/usr/bin/perl 
     1#!@@PERL@@ -w 
    22# 
    33# Plugin to monitor harddrive temperatures through SMART. 
     
    1010#       args_$dev       -- additional arguments to smartctl for one drive, 
    1111#                          e.g. "env.args_hda -v 194,10xCelsius" 
     12#                          Use this to make the plugin use the --all or -a option 
     13#                          if your disk will not return it's temperature when 
     14#                          only the -A option is used. 
    1215# 
    1316# Note for users of RAID controllers (smartmontools currently only 
     
    1518# controller(s) as raiddev_num (e.g. sda_0). Then you must specify the 
    1619# type like this: type_sda_0 3ware,0. 
    17 # 
    18 # $Log$ 
    19 # Revision 1.6  2005/03/03 10:13:51  lupe 
    20 # Add feature to specify additional arguments to smartctl 
    21 # 
    22 # Revision 1.5  2005/02/17 11:13:34  lupe 
    23 # Support more than one drive on RAID controllers. Explain how to configure 
    24 # them. 
    25 # 
    26 # Revision 1.4  2005/01/29 22:14:02  jimmyo 
    27 # Make the plugin check all rdsks. 
    28 # 
    29 # Revision 1.3  2005/01/26 09:31:36  jimmyo 
    30 # Added license note. 
    31 # 
    32 # Revision 1.2  2005/01/25 21:01:21  jimmyo 
    33 # Added plugin generic/hddtemp_smartctl, made by Lupe Christoph. Made it the default hddtemp plugin. 
    34 # 
    35 # Revision 1.1  2004/11/10 16:11:27  jimmyo 
    36 # Added new plugin linux/hddtemp_smartctl, made by Peter Gervai (SF#1032727). 
    37 # 
    38 # Revision 1.0  2004/09/22  
    39 # New plugin: Peter Gervai <grin(*)grin.hu> 
    40 # 
    4120# 
    4221#%# family=auto 
     
    8463$smartctl = `which smartctl` unless $smartctl; 
    8564chomp $smartctl; 
     65$smartctl = undef unless -x $smartctl; 
    8666 
    8767# Still not found? Check obvious places 
    88 my @dirs, qw(/usr/bin /usr/sbin /usr/local/bin /usr/local/sbin); 
     68my @dirs = qw(/usr/bin /usr/sbin /usr/local/bin /usr/local/sbin); 
    8969until ($smartctl or @dirs == 0) { 
    9070  my $dir = shift @dirs; 
     
    10787  } 
    10888} elsif ($^O eq 'solaris') { 
    109   @drives = map { s@.*/@@ } glob '/dev/rdsk/c*t*d*s2'; 
     89  @drives = map { s@.*/@@ ; $_ } glob '/dev/rdsk/c*t*d*s2'; 
    11090} 
    11191 
    11292@drives = split ' ', $ENV{drives} if exists $ENV{drives}; 
    11393 
    114 if (exists $ARGV[0]) { 
     94# Sort list of drives 
     95@drives = sort @drives; 
     96 
     97if (defined $ARGV[0]) { 
    11598  if ($ARGV[0] eq 'autoconf') { 
    11699    if ($smartctl and -x $smartctl) { 
     
    140123  my $dev; 
    141124  $dev = $_ =~ /(.*)(?:_\d+)/ ? $1 : $_; 
    142   my $cmd = $smartctl.' -a '; 
     125  my $cmd = $smartctl.' -A '; 
    143126  $cmd .= $ENV{'args_'.$_}.' ' if exists $ENV{'args_'.$_}; 
    144127  $cmd .= '-d '.$ENV{'type_'.$_}.' ' if exists $ENV{'type_'.$_}; 
    145   $cmd .= "/dev/$dev"; 
     128  if ($^O eq 'solaris') { 
     129    $cmd .= "/dev/rdsk/$dev"; 
     130  } else { 
     131    $cmd .= "/dev/$dev"; 
     132  } 
    146133  my $output = `$cmd`; 
    147134  if ($output =~ /Current Drive Temperature:\s*(\d+)/) { 
  • people/ilmari/modularisation-branch/node/node.d/ipac-ng.in

    r864 r1012  
    33# Skeleton-plugin to monitor ipac-ng rules. To monitor an 
    44# rule, copy ipac-ng and edit variables. 
    5 # 
    6 # $Log$ 
    7 # Revision 1.2  2004/06/28 12:08:54  jimmyo 
    8 # Plugin bugfixes from Jacques Caruso, in linux/iostat_ios and generic/ipacng. 
    9 # 
    10 # Revision 1.1  2004/05/06 22:42:35  jimmyo 
    11 # Added plugin ipac-ng, contributed by Arturas Slajus. 
    12 # 
    135# 
    146# Magic markers (optional - used by munin-config and some installation 
  • people/ilmari/modularisation-branch/node/node.d/ircu.in

    r864 r1012  
    11#!@@PERL@@ 
    2 # 
    3 # $Log$ 
    4 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    5 # Renamed occurrances of lrrd -> munin 
    6 # 
    7 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    8 # Import of LRRD CVS tree after renaming to Munin 
    9 # 
    10 # Revision 1.3  2003/12/18 19:02:36  jimmyo 
    11 # Typo 
    12 # 
    13 # Revision 1.2  2003/12/18 17:14:24  jimmyo 
    14 # Added autoconf-support 
    15 # 
    16 # Revision 1.1  2003/11/10 18:51:50  jimmyo 
    17 # Initial entries 
    182# 
    193#%# family=manual 
  • people/ilmari/modularisation-branch/node/node.d/loggrep.in

    r864 r1012  
    3030#       regex         - Regex to look for (required) 
    3131#       label         - Label 
     32#       counter       - If set the value captured by the first paren 
     33#                       in the regex is summed instead of coutning lines. 
     34#                       The value is used for the vertical label. 
    3235#       regex_<key>   - Additional regexes 
    3336#       label_<key>   - Additional labels 
     37#       counter_<key> - Additional counters (the value is ignored). 
    3438#       title         - Graph title 
    3539# 
    3640# TODO: Handle rotated logs 
    37 # 
    38 # $Log$ 
    39 # Revision 1.5  2005/01/05 16:44:02  ilmari 
    40 # Fixed typo in generic/loggrep breaking implicit labeling. 
    41 # 
    42 # Revision 1.4  2004/12/10 18:51:43  jimmyo 
    43 # linux/apt* has been forced to LANG=C, to get predictable output. 
    44 # 
    45 # Revision 1.3  2004/12/10 10:47:47  jimmyo 
    46 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    47 # 
    48 # Revision 1.2  2004/12/09 22:12:54  jimmyo 
    49 # Added "graph_period" option, to make "graph_sums" usable. 
    50 # 
    51 # Revision 1.1  2004/11/20 05:59:25  ilmari 
    52 # Added plugin generic/loggrep for generic log grepping. 
    53 # 
    5441# 
    5542# Magic markers (optional - used by munin-config and some installation 
     
    6148my %regex; 
    6249my $logfile = $ENV{logfile}; 
     50my $vlabel = defined $ENV{'counter'} ? $ENV{'counter'} : 'entries'; 
    6351 
    6452(my $name = $0) =~ s|.*/||; 
     
    7058    $regex{'count'}{'label'} = $ENV{'label'} || $ENV{'regex'}; 
    7159    $regex{'count'}{'value'} = 0; 
     60    $regex{'count'}{'counter'} = defined $ENV{'counter'}; 
    7261} 
    7362 
     
    7665    $regex{$key}{'label'} = $ENV{"label_$key"} || $ENV{"regex_$key"}; 
    7766    $regex{$key}{'value'} = 0; 
     67    $regex{$key}{'counter'} = defined $ENV{"counter_$key"}; 
    7868} 
    7969 
     
    8676    print "graph_title $title\n"; 
    8777    print "graph_args --base 1000 -l 0\n"; 
    88     print "graph_vlabel entries / \${graph_period}\n"; 
     78    print "graph_vlabel $vlabel / \${graph_period}\n"; 
    8979    print "graph_category other\n"; 
    9080    for my $key (keys %regex) { 
     
    156146        for my $match (values %regex) { 
    157147            if ($line =~ $match->{'regex'}) { 
    158                 $match->{'value'}++
     148                $match->{'value'} += $match->{'counter'} ? $1 : 1
    159149            } 
    160150        } 
  • people/ilmari/modularisation-branch/node/node.d/mailman.in

    r864 r1012  
    11#!@@PERL@@ 
    22 
    3 # $Log$ 
    4 # Revision 1.4  2005/03/07 19:52:02  jimmyo 
    5 # generic/mailman now handles regular mailman (Deb#297904). 
    6 # 
    7 # Revision 1.3  2004/12/09 22:12:55  jimmyo 
    8 # Added "graph_period" option, to make "graph_sums" usable. 
    9 # 
    10 # Revision 1.2  2004/11/21 00:16:56  jimmyo 
    11 # Changed a lot of plugins so they use DERIVE instead of COUNTER. 
    12 # 
    13 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    14 # Renamed occurrances of lrrd -> munin 
    15 # 
    16 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    17 # Import of LRRD CVS tree after renaming to Munin 
    18 # 
    19 # Revision 1.3  2003/11/07 17:43:16  jimmyo 
    20 # Cleanups and log entries 
    21 # 
    223 
    234 
  • people/ilmari/modularisation-branch/node/node.d/mailscanner.in

    r864 r1012  
    2222#  
    2323#       None known 
    24 # 
    25 # $Log$ 
    26 # Revision 1.4  2005/02/16 19:51:54  jimmyo 
    27 # Made contrib-plugins generic/amavis and generic/mailstats more secure. 
    28 # 
    29 # Revision 1.3  2005/02/16 19:51:18  jimmyo 
    30 # Made contrib-plugins generic/amavis and generic/mailstats more secure. 
    31 # 
    32 # Revision 1.2  2005/02/16 19:47:11  jimmyo 
    33 # Made contrib-plugins generic/amavis and generic/mailstats more secure. 
    34 # 
    35 # Revision 1.1  2004/12/09 20:03:26  jimmyo 
    36 # Added two new plugins contributed by Jacques Caruso, generic/exim_mailqueue_alt and generic/mailscanner. 
    37 # 
    3824# 
    3925# Magic markers: 
  • people/ilmari/modularisation-branch/node/node.d/mhttping.in

    r864 r1012  
    2929# 
    3030# 6. Restart munin-node. 
    31 # 
    32 # $Log$ 
    33 # Revision 1.1  2004/12/09 20:42:19  jimmyo 
    34 # Added plugin generic/mhttping by Greg Connor. 
    35 # 
    3631# 
    3732 
  • people/ilmari/modularisation-branch/node/node.d/multips.in

    r864 r1012  
    1616# env.regex_pop3d ^[0-9]* pop3d: 
    1717#  
    18 # $Log$ 
    19 # Revision 1.1  2004/01/29 19:42:45  jimmyo 
    20 # Added a new plugin generic/multips to count several procs in one graph. (SF#885579) 
    21 # 
    22 # 
    2318# Magic markers (optional): 
    2419#%# family=manual 
  • people/ilmari/modularisation-branch/node/node.d/munin_graph.in

    r864 r1012  
    77#       config   (required) 
    88#       autoconf (optional - used by munin-config) 
    9 # 
    10 # $Log$ 
    11 # Revision 1.3  2004/12/09 18:39:01  jimmyo 
    12 # Added more sensible autoconf to generic/munin_graph,munin_update,sybase_space. 
    13 # 
    14 # Revision 1.2  2004/01/29 19:39:00  jimmyo 
    15 # Generic plugins now use printf instead of echo -n, as this is more portable (SF#885564) 
    16 # 
    17 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    18 # Renamed occurrances of lrrd -> munin 
    19 # 
    20 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    21 # Import of LRRD CVS tree after renaming to Munin 
    22 # 
    23 # Revision 1.6  2003/11/10 18:13:46  jimmyo 
    24 # Revert changes done in 1.5 
    25 # 
    26 # Revision 1.5  2003/11/07 17:43:16  jimmyo 
    27 # Cleanups and log entries 
    28 # 
    29 # 
    309# 
    3110# Magic markers (optional - used by munin-config and installation 
  • people/ilmari/modularisation-branch/node/node.d/munin_update.in

    r864 r1012  
    77#       config   (required) 
    88#       autoconf (optional - used by munin-config) 
    9 # 
    10 # $Log$ 
    11 # Revision 1.3  2004/12/09 18:39:01  jimmyo 
    12 # Added more sensible autoconf to generic/munin_graph,munin_update,sybase_space. 
    13 # 
    14 # Revision 1.2  2004/01/29 19:39:00  jimmyo 
    15 # Generic plugins now use printf instead of echo -n, as this is more portable (SF#885564) 
    16 # 
    17 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    18 # Renamed occurrances of lrrd -> munin 
    19 # 
    20 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    21 # Import of LRRD CVS tree after renaming to Munin 
    22 # 
    23 # Revision 1.6  2003/11/10 18:13:46  jimmyo 
    24 # Revert changes done in 1.5 
    25 # 
    26 # Revision 1.5  2003/11/07 17:43:16  jimmyo 
    27 # Cleanups and log entries 
    28 # 
    29 # 
    309# 
    3110# Magic markers (optional - used by munin-config and installation 
  • people/ilmari/modularisation-branch/node/node.d/mysql_bytes.in

    r864 r1012  
    1111# 
    1212#   mysqlopts    - Options to pass to mysql 
    13 # 
    14 # $Log$ 
    15 # Revision 1.6  2004/12/10 10:47:47  jimmyo 
    16 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    17 # 
    18 # Revision 1.5  2004/12/09 22:12:55  jimmyo 
    19 # Added "graph_period" option, to make "graph_sums" usable. 
    20 # 
    21 # Revision 1.4  2004/11/21 00:16:56  jimmyo 
    22 # Changed a lot of plugins so they use DERIVE instead of COUNTER. 
    23 # 
    24 # Revision 1.3  2004/05/20 13:57:12  jimmyo 
    25 # Set categories to some of the plugins. 
    26 # 
    27 # Revision 1.2  2004/04/27 18:58:53  jimmyo 
    28 # Fixed bug in mysql-plugins (Deb#233762). 
    29 # 
    30 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    31 # Renamed occurrances of lrrd -> munin 
    32 # 
    33 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    34 # Import of LRRD CVS tree after renaming to Munin 
    35 # 
    36 # Revision 1.7  2003/11/07 22:12:50  jimmyo 
    37 # Changed deprecated plugin options 
    38 # 
    39 # Revision 1.6  2003/11/07 17:43:16  jimmyo 
    40 # Cleanups and log entries 
    41 # 
    42 # 
    4313# 
    4414#%# family=auto 
  • people/ilmari/modularisation-branch/node/node.d/mysql_isam_space_.in

    r864 r1012  
    1515#       statefile    - where to put the statefile 
    1616#       ignore       - Tables to ignore. Regex. 
    17 
    18 # $Log$ 
    19 # Revision 1.2  2004/05/20 13:57:12  jimmyo 
    20 # Set categories to some of the plugins. 
    21 
    22 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    23 # Renamed occurrances of lrrd -> munin 
    24 
    25 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    26 # Import of LRRD CVS tree after renaming to Munin 
    27 
    28 # Revision 1.15  2003/12/08 10:52:31  jimmyo 
    29 # Bugfix when printing values 
    30 
    31 # Revision 1.14  2003/11/07 17:43:16  jimmyo 
    32 # Cleanups and log entries 
    33 
    34 
     17#       absolute     - use tables sizes, not percent of maximum 
    3518# 
    3619#%# family=auto 
     
    149132        elsif ($pid == 0) 
    150133        { # Child 
    151                 exec ($MYSQLSHOW, "--status", "-v", @mysql_opts); 
     134                exec ($MYSQLSHOW, @mysql_opts, "--status", "-v"); 
    152135        } 
    153136 
     
    201184                } 
    202185 
     186                my %index; 
     187                my $headerseen; 
     188 
    203189                while (<IN>) 
    204190                { 
    205191                        my @fields = split (/\s*\|\s*/); 
    206                         if (defined $fields[1] and $fields[1] ne "Name" and  
    207                                         defined $fields[2] and  
    208                                         ($fields[2] eq "MyISAM" or $fields[2] eq "ISAM")) # Not a separator line 
     192                        next if @fields > 2; # Separator line 
     193                        if (! $headerseen and $fields[1] eq "Name") 
     194                        { # Header line, grab field names 
     195                                %index = map {($field[$_], $_)} 0..$#fields; 
     196                        } 
     197                        else 
    209198                        { 
    210                                 printf OUT ("%s.%s %f\n", $db, $fields[1], (100*$fields[6]/$fields[7])); 
    211                                 if ($DB eq $db) 
    212                                 { 
    213                                        $tables->{$fields[1]} = (100*$fields[6]/$fields[7]); 
    214                                 } 
     199                                my $value = 
     200                                       $ABSOLUTE ? $fields[$index{Data_length}] 
     201                                       : (100*$fields[$index{Data_length}]/$fields[$index{Max_data_length}]); 
     202                                printf OUT ("%s.%s %f\n", $db, $fields[1], $value); 
     203                                $tables->{$fields[1]} = $value if $DB eq $db; 
    215204                        } 
    216205                } 
  • people/ilmari/modularisation-branch/node/node.d/mysql_queries.in

    r864 r1012  
    44# 
    55# Copyright 2003-2004 - Per Andreas Buer 
    6 # 
    7 # $Log$ 
    8 # Revision 1.11  2004/12/10 18:51:43  jimmyo 
    9 # linux/apt* has been forced to LANG=C, to get predictable output. 
    10 # 
    11 # Revision 1.10  2004/12/10 10:47:47  jimmyo 
    12 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    13 # 
    14 # Revision 1.9  2004/12/09 22:12:55  jimmyo 
    15 # Added "graph_period" option, to make "graph_sums" usable. 
    16 # 
    17 # Revision 1.8  2004/11/21 00:16:56  jimmyo 
    18 # Changed a lot of plugins so they use DERIVE instead of COUNTER. 
    19 # 
    20 # Revision 1.7  2004/09/08 15:25:33  ilmari 
    21 # Use @@PERL@@ in all perl shebang lines. 
    22 # 
    23 # Revision 1.6  2004/05/20 13:57:12  jimmyo 
    24 # Set categories to some of the plugins. 
    25 # 
    26 # Revision 1.5  2004/04/27 18:58:53  jimmyo 
    27 # Fixed bug in mysql-plugins (Deb#233762). 
    28 # 
    29 # Revision 1.4  2004/01/29 18:49:55  jimmyo 
    30 # Bugfix in plugin mysql_queries - insertions were no longer graphed. (SF#881483). 
    31 # 
    32 # Revision 1.3  2004/01/29 17:36:20  jimmyo 
    33 # Updated copyright information 
    34 # 
    35 # Revision 1.2  2004/01/15 16:35:43  jimmyo 
    36 # Bugfix from Dagfinn I. MannsÃ¥ker, closing SF#876443, SF#865125. 
    37 # 
    38 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    39 # Renamed occurrances of lrrd -> munin 
    40 # 
    41 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    42 # Import of LRRD CVS tree after renaming to Munin 
    43 # 
    44 # Revision 1.8  2003/12/01 13:31:37  jimmyo 
    45 # Bugfix to make stack/area right 
    46 # 
    47 # Revision 1.7  2003/11/08 00:10:13  jimmyo 
    48 # New mysql_queries plugin 
    49 # 
    506# 
    517# Parameters: 
  • people/ilmari/modularisation-branch/node/node.d/mysql_slowqueries.in

    r864 r1012  
    1111# 
    1212#       mysqlopts     - Options to pass to mysql 
    13 # 
    14 # $Log$ 
    15 # Revision 1.6  2004/12/10 10:47:47  jimmyo 
    16 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    17 # 
    18 # Revision 1.5  2004/12/09 22:12:55  jimmyo 
    19 # Added "graph_period" option, to make "graph_sums" usable. 
    20 # 
    21 # Revision 1.4  2004/11/21 00:16:56  jimmyo 
    22 # Changed a lot of plugins so they use DERIVE instead of COUNTER. 
    23 # 
    24 # Revision 1.3  2004/05/20 13:57:12  jimmyo 
    25 # Set categories to some of the plugins. 
    26 # 
    27 # Revision 1.2  2004/04/27 18:58:53  jimmyo 
    28 # Fixed bug in mysql-plugins (Deb#233762). 
    29 # 
    30 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    31 # Renamed occurrances of lrrd -> munin 
    32 # 
    33 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    34 # Import of LRRD CVS tree after renaming to Munin 
    35 # 
    36 # Revision 1.6  2003/11/07 17:43:16  jimmyo 
    37 # Cleanups and log entries 
    38 # 
    39 # 
    4013# 
    4114#%# family=auto 
  • people/ilmari/modularisation-branch/node/node.d/mysql_threads.in

    r864 r1012  
    1212# 
    1313#       mysqlopts    - Options to pass to mysql 
    14 # 
    15 # $Log$ 
    16 # Revision 1.2  2004/05/20 13:57:12  jimmyo 
    17 # Set categories to some of the plugins. 
    18 # 
    19 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    20 # Renamed occurrances of lrrd -> munin 
    21 # 
    22 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    23 # Import of LRRD CVS tree after renaming to Munin 
    24 # 
    25 # Revision 1.6  2003/11/07 17:43:16  jimmyo 
    26 # Cleanups and log entries 
    27 # 
    28 # 
    2914# 
    3015#%# family=auto 
  • people/ilmari/modularisation-branch/node/node.d/named.in

    r864 r1012  
    1010# 
    1111#       logfile   - set which log file to use 
    12 #  
    13 # $Log$ 
    14 # Revision 1.5  2005/01/24 20:43:33  jimmyo 
    15 # generic/named probes for more log files before giving up (Deb#291849). 
    16 # 
    17 # Revision 1.4  2004/12/10 10:47:47  jimmyo 
    18 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    19 # 
    20 # Revision 1.3  2004/12/09 22:12:55  jimmyo 
    21 # Added "graph_period" option, to make "graph_sums" usable. 
    22 # 
    23 # Revision 1.2  2004/12/09 20:23:00  jimmyo 
    24 # generic/named a bit more portable (by Will Froning). 
    25 # 
    26 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    27 # Renamed occurrances of lrrd -> munin 
    28 # 
    29 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    30 # Import of LRRD CVS tree after renaming to Munin 
    31 # 
    32 # Revision 1.3  2003/11/26 15:57:21  jimmyo 
    33 # Milliqueries not of interest... 
    34 # 
    35 # Revision 1.2  2003/11/26 14:47:31  jimmyo 
    36 # No peaks... 
    37 # 
    38 # Revision 1.1  2003/11/26 09:26:04  jimmyo 
    39 # Plugin contribution by Nicolai Langfeldt 
    40 # 
    4112#  
    4213#%# family=contrib 
  • people/ilmari/modularisation-branch/node/node.d/ntp_.in

    r864 r1012  
    99#       suggest  (optional - used by munin-node-configure) 
    1010# 
    11 # $Log$ 
    12 # Revision 1.4  2004/11/21 20:19:09  jimmyo 
    13 # Don't suggest localhost peer. 
     11# Config variables: 
    1412# 
    15 # Revision 1.3  2004/11/21 20:12:32  jimmyo 
    16 # Cosmetics. 
    17 
    18 # Revision 1.2  2004/11/21 19:55:28  jimmyo 
    19 # Upped generic/ntp_ to auto family. 
    20 
    21 # Revision 1.1  2004/11/21 19:35:23  jimmyo 
    22 # Corrected file name. 
    23 
    24 # Revision 1.2  2004/09/08 15:25:33  ilmari 
    25 # Use @@PERL@@ in all perl shebang lines. 
    26 
    27 # Revision 1.1  2004/01/30 15:07:38  jimmyo 
    28 # Added generic plugins ntp_ and ntp_states to manual family (SF#887000). 
    29 
    30 
    31 
     13#       lowercase       - lowercase hostnames after lookup 
    3214# 
    3315# Magic markers - optional - used by installation scripts and 
     
    6749                my $name = gethostbyaddr(inet_aton($addr)); 
    6850                $name = defined $name ? $name->name : $addr; 
     51                $name = lc $name if exists $ENV{"lowercase"}; 
    6952                $name =~ s/[\.-]/_/g; 
    7053                print $name, "\n"; 
     
    8669                my $host = gethostbyaddr(inet_aton($addr)); 
    8770                $host = defined $host ? $host->name : $addr; 
     71                $host = lc $host if exists $ENV{"lowercase"}; 
    8872                my $host_ = $host; 
    8973                $host_ =~ s/[\.-]/_/g; 
     
    9175                print "graph_title NTP statistics for peer $host\n"; 
    9276        } 
    93         print "graph_args --base 1000 --vertical-label msec --lower-limit 0\n"; 
     77        print "graph_args --base 1000 --vertical-label seconds --lower-limit 0\n"; 
    9478        print "delay.label Delay\n"; 
    9579        print "delay.draw LINE2\n"; 
     80        print "delay.cdef delay,1000,/\n"; 
    9681        print "offset.label Offset\n"; 
    9782        print "offset.draw LINE2\n"; 
     83        print "offset.cdef offset,1000,/\n"; 
    9884        print "jitter.label Jitter\n"; 
    9985        print "jitter.draw LINE2\n"; 
     86        print "jitter.cdef offset,1000,/\n"; 
    10087        exit 0; 
    10188} 
     
    10895        my $host = gethostbyaddr(inet_aton($addr)); 
    10996        $host = defined $host ? $host->name : $addr; 
     97        $host = lc $host if exists $ENV{"lowercase"}; 
    11098        $host =~ s/[\.-]/_/g; 
    11199        next unless $host eq $name; 
  • people/ilmari/modularisation-branch/node/node.d/ntp_states.in

    r864 r1012  
    88#       autoconf (optional - used by lrrd-config) 
    99# 
    10 # $Log$ 
    11 # Revision 1.2  2004/11/21 20:23:36  jimmyo 
    12 # Better autoconf handling. 
     10# Config variables: 
    1311# 
    14 # Revision 1.1  2004/11/21 19:35:23  jimmyo 
    15 # Corrected file name. 
    16 
    17 # Revision 1.2  2004/09/08 15:25:33  ilmari 
    18 # Use @@PERL@@ in all perl shebang lines. 
    19 
    20 # Revision 1.1  2004/01/30 15:07:38  jimmyo 
    21 # Added generic plugins ntp_ and ntp_states to manual family (SF#887000). 
    22 
    23 
    24 
     12#       lowercase       - lowercase hostnames after lookup 
    2513# 
    2614# Magic markers - optional - used by installation scripts and 
     
    7260                $host = defined $host ? $host->name : $addr; 
    7361                my $name = $host; 
     62                $host = lc $host if exists $ENV{"lowercase"}; 
    7463                $host =~ s/[\.-]/_/g; 
    7564                print "$host.label $name\n"; 
     
    8675        my $host = gethostbyaddr(inet_aton($addr)); 
    8776        $host = defined $host ? $host->name : $addr; 
     77        $host = lc $host if exists $ENV{"lowercase"}; 
    8878        $host =~ s/[\.-]/_/g; 
    8979        print "$host.value ", exists $stateval{$state} ? $stateval{$state} : 0, "\n"; 
  • people/ilmari/modularisation-branch/node/node.d/nut_misc.in

    r864 r1012  
    1 #!@@PERL@@ 
     1!@@PERL@@ 
    22 
    33use strict; 
     
    4343); 
    4444 
    45 if ( exists $ARGV[0] and $ARGV[0] eq 'config' ) { 
     45if ( defined $ARGV[0] and $ARGV[0] eq 'config' ) { 
    4646        print "graph_title UPS Misc - $config{upsname}\n"; 
    4747        #print "graph_args -l 110\n"; 
  • people/ilmari/modularisation-branch/node/node.d/nut_volts.in

    r864 r1012  
    3333); 
    3434 
    35 if ( exists $ARGV[0] and $ARGV[0] eq 'config' ) { 
     35if ( defined $ARGV[0] and $ARGV[0] eq 'config' ) { 
    3636        print "graph_title UPS Voltages - $config{upsname}\n"; 
    3737        print "graph_args -l 115\n"; 
  • people/ilmari/modularisation-branch/node/node.d/perdition.in

    r864 r1012  
    2424# buffy perdition[5139]: Fatal error negotiating setup. Exiting child. 
    2525 
     26mktempfile () { 
     27@@MKTEMP@@ 
     28} 
    2629 
    2730# Set the location of the perdition logs 
    2831PERDITION_LOG=${logfile:-/var/log/perdition.log} 
    29 TEMP_FILE=`mktemp -p /tmp/ munin-perdition.XXXXX` 
    3032OFFSET_FILE=@@PLUGSTATE@@/perdition.offset 
    3133LOGTAIL=${logtail:-/usr/sbin/logtail} 
    32  
    33 if [ ! -f "$TEMP_FILE" ]; then 
    34     exit 3 
    35 fi 
    3634 
    3735case $1 in 
     
    5452disconnected.label disconnections 
    5553imap.label IMAP Auths 
     54imaps.label IMAPS Auths 
    5655pop.label POP Auths 
     56pops.label POPS Auths 
    5757fatal.label Fatal Errors 
    5858EOF 
     
    6969fi 
    7070 
     71TEMP_FILE=`mktempfile munin-perdition.XXXXXX` 
     72 
     73if [ -z "$TEMP_FILE" -o ! -f "$TEMP_FILE" ]; then 
     74    exit 3 
     75fi 
     76 
    7177if [ $ARGS != 0 ]; then 
    7278    ${LOGTAIL} -f ${PERDITION_LOG} -o ${OFFSET_FILE} > ${TEMP_FILE} 
     
    7783disconnected=`grep "Close:" ${TEMP_FILE} | wc -l` 
    7884imap=`grep 'port="143" status="ok"' ${TEMP_FILE} | wc -l` 
     85imaps=`grep 'port="993" status="ok"' ${TEMP_FILE} | wc -l` 
    7986pop=`grep 'port="110" status="ok"' ${TEMP_FILE} | wc -l` 
     87pops=`grep 'port="995" status="ok"' ${TEMP_FILE} | wc -l` 
    8088fatal=`grep 'Fatal [e|E]rror' ${TEMP_FILE} | wc -l` 
    8189 
     
    8593echo "disconnected.value ${disconnected}" 
    8694echo "imap.value ${imap}" 
     95echo "imaps.value ${imaps}" 
    8796echo "pop.value ${pop}" 
     97echo "pops.value ${pops}" 
    8898echo "fatal.value ${fatal}" 
  • people/ilmari/modularisation-branch/node/node.d/pm3users_.in

    r864 r1012  
    3030#  
    3131#       None known (I'll regret saying that, I know) 
    32 # 
    33 # $Log$ 
    34 # Revision 1.1  2004/12/09 20:07:39  jimmyo 
    35 # New version of generic/pm3users_ by plugin creator Jacques Caruso. 
    36 # 
    37 # Revision 1.1  2004/05/09 21:11:15  jimmyo 
    38 # New plugin (pm3users) and a bunch of patches from Jacques Caruso. 
    39 # 
    4032# 
    4133# Magic markers: 
  • people/ilmari/modularisation-branch/node/node.d/pop_stats.in

    r864 r1012  
    11#!@@PERL@@ 
    22 
    3 # $Log$ 
    4 # Revision 1.5  2004/12/10 18:51:43  jimmyo 
    5 # linux/apt* has been forced to LANG=C, to get predictable output. 
    6 # 
    7 # Revision 1.4  2004/12/10 10:47:47  jimmyo 
    8 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    9 # 
    10 # Revision 1.3  2004/12/09 22:12:55  jimmyo 
    11 # Added "graph_period" option, to make "graph_sums" usable. 
    12 # 
    13 # Revision 1.2  2004/11/21 00:16:56  jimmyo 
    14 # Changed a lot of plugins so they use DERIVE instead of COUNTER. 
    15 # 
    16 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    17 # Renamed occurrances of lrrd -> munin 
    18 # 
    19 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    20 # Import of LRRD CVS tree after renaming to Munin 
    21 # 
    22 # Revision 1.3  2003/11/07 17:43:16  jimmyo 
    23 # Cleanups and log entries 
    24 # 
    253 
    264#%# family=contrib 
  • people/ilmari/modularisation-branch/node/node.d/postfix_mailqueue.in

    r864 r1012  
    44#  
    55# Contributed by Nicolai Langfeldt 
    6 #  
    7 # $Log$ 
    8 # Revision 1.4  2004/05/20 19:02:36  jimmyo 
    9 # Set categories on a bunch of plugins 
    10 # 
    11 # Revision 1.3  2004/05/14 21:16:46  jimmyo 
    12 # "Upped" som plugins from contrib/manual to auto. 
    13 # 
    14 # Revision 1.2  2004/05/09 21:11:15  jimmyo 
    15 # New plugin (pm3users) and a bunch of patches from Jacques Caruso. 
    16 # 
    17 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    18 # Renamed occurrances of lrrd -> munin 
    19 # 
    20 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    21 # Import of LRRD CVS tree after renaming to Munin 
    22 # 
    23 # Revision 1.2  2003/11/26 14:55:52  jimmyo 
    24 # Added total summaries 
    25 # 
    26 # Revision 1.1  2003/11/26 09:10:28  jimmyo 
    27 # Plugin contribution by Nicolai Langfeldt 
    28 # 
    296#  
    307#%# family=auto 
  • people/ilmari/modularisation-branch/node/node.d/postfix_mailstats.in

    r864 r1012  
    1414#       logdir       - Which logfile to use 
    1515#       logfile      - What file to read in logdir 
    16 # 
    17 # $Log$ 
    18 # Revision 1.9  2005/01/25 20:38:46  jimmyo 
    19 # Make generic/postfix_mailstats catch more formats (Deb#292110). 
    20 # 
    21 # Revision 1.8  2005/01/25 20:23:36  jimmyo 
    22 # Improved graph_title of generic/postfix_* (Deb#292083). 
    23 # 
    24 # Revision 1.7  2005/01/24 19:43:26  jimmyo 
    25 # Changed default log for generic/postfix_mailstats from syslog to mail.log. Downgraded it from auto to manual. 
    26 # 
    27 # Revision 1.6  2004/12/10 18:51:43  jimmyo 
    28 # linux/apt* has been forced to LANG=C, to get predictable output. 
    29 # 
    30 # Revision 1.5  2004/12/10 10:47:47  jimmyo 
    31 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    32 # 
    33 # Revision 1.4  2004/12/09 22:12:55  jimmyo 
    34 # Added "graph_period" option, to make "graph_sums" usable. 
    35 # 
    36 # Revision 1.3  2004/05/20 19:02:36  jimmyo 
    37 # Set categories on a bunch of plugins 
    38 # 
    39 # Revision 1.2  2004/05/14 21:16:46  jimmyo 
    40 # "Upped" som plugins from contrib/manual to auto. 
    41 # 
    42 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    43 # Renamed occurrances of lrrd -> munin 
    44 # 
    45 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    46 # Import of LRRD CVS tree after renaming to Munin 
    47 # 
    48 # Revision 1.2  2003/11/26 14:55:52  jimmyo 
    49 # Added total summaries 
    50 # 
    51 # Revision 1.1  2003/11/26 14:45:34  jimmyo 
    52 # New plugins 
    53 # 
    54 # Revision 1.7  2003/11/15 11:10:28  jimmyo 
    55 # Various fixes 
    56 # 
    57 # Revision 1.6  2003/11/07 17:43:16  jimmyo 
    58 # Cleanups and log entries 
    59 # 
    60 # 
    6116# 
    6217# Magic markers (optional - used by munin-config and some installation 
     
    7227my $LOGDIR  = $ENV{'logdir'}  || '/var/log'; 
    7328my $LOGFILE = $ENV{'logfile'} || 'mail.log'; 
     29 
    7430 
    7531if ( $ARGV[0] and $ARGV[0] eq "autoconf" ) 
     
    14298                $rejects->{$1} = $2; 
    14399        } 
     100        elsif (/^OTHER:(\d+)$/) 
     101        { 
     102                $rejects->{OTHER} = $1; 
     103        } 
    144104    } 
    145105    close IN; 
     
    229189            $delivered++; 
    230190        }  
    231         elsif ($line =~ /reject: \S+ \S+ \S+ (\S+)/) 
    232         { 
    233             $rejects->{$1} ++; 
     191        elsif ($line =~ /postfix\/smtpd.*reject: \S+ \S+ \S+ (\S+)/) 
     192        { 
     193            my $cause = $1; 
     194            $cause = 'OTHER' unless $1 =/^\d+$/; 
     195            $rejects->{$cause} ++; 
    234196        } 
    235197    } 
  • people/ilmari/modularisation-branch/node/node.d/postfix_mailvolume.in

    r864 r1012  
    1414#       logdir       - Which logfile to use 
    1515#       logfile      - What file to read in logdir 
    16 # 
    17 # $Log$ 
    18 # Revision 1.8  2005/01/25 20:26:21  jimmyo 
    19 # Turn on graph_scale for generic/postfix_mailvolume. 
    20 # 
    21 # Revision 1.7  2005/01/25 20:23:37  jimmyo 
    22 # Improved graph_title of generic/postfix_* (Deb#292083). 
    23 # 
    24 # Revision 1.6  2004/12/10 18:51:43  jimmyo 
    25 # linux/apt* has been forced to LANG=C, to get predictable output. 
    26 # 
    27 # Revision 1.5  2004/12/10 10:47:47  jimmyo 
    28 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    29 # 
    30 # Revision 1.4  2004/12/09 22:12:55  jimmyo 
    31 # Added "graph_period" option, to make "graph_sums" usable. 
    32 # 
    33 # Revision 1.3  2004/05/20 19:02:36  jimmyo 
    34 # Set categories on a bunch of plugins 
    35 # 
    36 # Revision 1.2  2004/05/14 21:16:46  jimmyo 
    37 # "Upped" som plugins from contrib/manual to auto. 
    38 # 
    39 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    40 # Renamed occurrances of lrrd -> munin 
    41 # 
    42 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    43 # Import of LRRD CVS tree after renaming to Munin 
    44 # 
    45 # Revision 1.1  2003/11/26 14:45:34  jimmyo 
    46 # New plugins 
    47 # 
    48 # Revision 1.7  2003/11/15 11:10:28  jimmyo 
    49 # Various fixes 
    50 # 
    51 # Revision 1.6  2003/11/07 17:43:16  jimmyo 
    52 # Cleanups and log entries 
    53 # 
    54 # 
    5516# 
    5617# Magic markers (optional - used by munin-config and some installation 
     
    7031{ 
    7132    my $logfile; 
    72     if (-d $LOGDIR) 
     33    `which postconf >/dev/null 2>/dev/null`; 
     34    if (!$?) 
    7335    { 
    7436        $logfile = "$LOGDIR/$LOGFILE"; 
     
    9355    else 
    9456    { 
    95         print "no (could not find logdir)\n"; 
     57           print "no (postfix not found)\n"; 
    9658    } 
    9759 
  • people/ilmari/modularisation-branch/node/node.d/ps_.in

    r864 r1012  
    1717# 
    1818#   regex - regex to use for filtering pgrep/ps output 
    19 # 
    20 # $Log$ 
    21 # Revision 1.4  2004/05/20 13:57:12  jimmyo 
    22 # Set categories to some of the plugins. 
    23 # 
    24 # Revision 1.3  2004/01/29 19:39:00  jimmyo 
    25 # Generic plugins now use printf instead of echo -n, as this is more portable (SF#885564) 
    26 # 
    27 # Revision 1.2  2004/01/29 18:43:20  jimmyo 
    28 # Changed wildcard plugin ps_ so it can use env.regex in plugin-conf.d/ (SF#882131) 
    29 # 
    30 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    31 # Renamed occurrances of lrrd -> munin 
    32 # 
    33 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    34 # Import of LRRD CVS tree after renaming to Munin 
    35 # 
    36 # Revision 1.2  2003/11/07 17:43:16  jimmyo 
    37 # Cleanups and log entries 
    38 # 
    39 # 
    4019# 
    4120# Magic markers (optional): 
  • people/ilmari/modularisation-branch/node/node.d/psu_.in

    r864 r1012  
    1313#       autoconf (optional - used by munin-config) 
    1414#       suggest  (optional - used by munin-config) 
    15 # 
    16 # $Log$ 
    17 # Revision 1.4  2004/09/10 23:11:13  jimmyo 
    18 # Degraded generic/psu_ from auto to manual. 
    19 # 
    20 # Revision 1.3  2004/05/20 13:57:12  jimmyo 
    21 # Set categories to some of the plugins. 
    22 # 
    23 # Revision 1.2  2004/01/29 19:39:00  jimmyo 
    24 # Generic plugins now use printf instead of echo -n, as this is more portable (SF#885564) 
    25 # 
    26 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    27 # Renamed occurrances of lrrd -> munin 
    28 # 
    29 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    30 # Import of LRRD CVS tree after renaming to Munin 
    31 # 
    32 # Revision 1.2  2003/11/07 17:43:16  jimmyo 
    33 # Cleanups and log entries 
    34 # 
    35 # 
    3615# 
    3716# Magic markers (optional): 
  • people/ilmari/modularisation-branch/node/node.d/samba.in

    r864 r1012  
    33# Plugin to monitor the number of open files in the system. 
    44# 
    5 # $Log$ 
    6 # Revision 1.8  2005/01/29 20:14:21  jimmyo 
    7 # Made generic/samba more portable (fixes by Nicolas Stransky). 
    8 
    9 # Revision 1.7  2005/01/05 15:18:13  jimmyo 
    10 # Made generic/samba more portable (fixes by Nicolas Stransky). 
    11 
    12 # Revision 1.6  2005/01/04 18:25:33  jimmyo 
    13 # Made generic/samba more portable. 
    14 
    15 # Revision 1.5  2005/01/03 22:22:58  jimmyo 
    16 # Plugins: Made generic/samba more portable. 
    17 
    18 # Revision 1.4  2004/12/22 21:21:18  jimmyo 
    19 # Cleaned up generic/samba a bit (SF#1087961). 
    20 
    21 # Revision 1.3  2004/05/20 19:02:36  jimmyo 
    22 # Set categories on a bunch of plugins 
    23 
    24 # Revision 1.2  2004/01/29 19:39:00  jimmyo 
    25 # Generic plugins now use printf instead of echo -n, as this is more portable (SF#885564) 
    26 
    27 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    28 # Renamed occurrances of lrrd -> munin 
    29 
    30 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    31 # Import of LRRD CVS tree after renaming to Munin 
    32 
    33 # Revision 1.1  2003/11/24 10:01:53  jimmyo 
    34 # New plugin by Finn-Arne Johansen 
    35 
     5# client-conf.d/-options: 
     6#        
     7#       smbstatus       -- path to smbstatus executable 
     8#       ignoreipcshare  -- ignore IPC$ whan counting shares 
     9#                          any string will do 
    3610# 
    3711# Parameters: 
     
    4620#%# capabilities=autoconf 
    4721 
    48  
     22SMBSTATUS=${smbstatus:-`which smbstatus`} 
     23SMBSTATUS=${SMBSTATUS:-/usr/bin/smbstatus} 
    4924 
    5025if [ "$1" = "autoconf" ]; then 
    51         if [ -x /usr/bin/smbstatus ]; then 
     26        if [ -x $SMBSTATUS ]; then 
    5227                echo yes 
    5328                exit 0 
    5429        else 
    55                 echo no 
     30                echo no '(smbstatus not found)' 
    5631                exit 1 
    5732        fi 
     
    7247fi 
    7348 
    74 printf "proc.value " 
    75 smbstatus -p | awk '$1 ~ /[0123456789]+/' | wc -l 
    76 printf "lock.value " 
    77 smbstatus -L | awk '$1 ~ /[0123456789]+/' | wc -l 
    78 printf "share.value " 
    79 smbstatus -S | awk '$2 ~ /[0123456789]+/ && $1 !~ /^IPC\$/ ' | wc -l 
     49$SMBSTATUS -p 2>/dev/null | awk 'BEGIN {lines=0} $1 ~ /^[0-9]+/ {lines++} END {print "proc.value " lines}' 
     50$SMBSTATUS -L 2>/dev/null | awk 'BEGIN {lines=0} $1 ~ /^[0-9]+/ {lines++} END {print "lock.value " lines}' 
     51if [ -n "$ignoreipcshare" ]; then 
     52        IGNORE='$1=="IPC$" {next}' 
     53fi 
     54$SMBSTATUS -S 2>/dev/null | awk ' 
     55BEGIN {lines=0;state=0} 
     56$1=="Service"&&state==0 {state=1;next} 
     57/^--*$/&&state==1 {state=2;next} 
     58state<2 {next} 
     59/^$/ {next}            
     60'"$IGNORE"' 
     61{lines++} 
     62END {print "share.value " lines}' 
  • people/ilmari/modularisation-branch/node/node.d/sendmail_mailqueue.in

    r864 r1012  
    1414#       mspqueue     - MSQ queue directory 
    1515#       mtaqueue     - MTA queue directory 
    16 # 
    17 # $Log$ 
    18 # Revision 1.6  2005/02/16 19:06:11  jimmyo 
    19 # generic/sendmail_mailqueue handles bigger queues (fix by Mickey Everts). 
    20 # 
    21 # Revision 1.5  2004/11/20 19:31:59  jimmyo 
    22 # Fixed bug in generic/sendmail_mailqueue, when queue is empty. 
    23 # 
    24 # Revision 1.4  2004/05/20 19:02:36  jimmyo 
    25 # Set categories on a bunch of plugins 
    26 # 
    27 # Revision 1.3  2004/05/14 21:16:46  jimmyo 
    28 # "Upped" som plugins from contrib/manual to auto. 
    29 # 
    30 # Revision 1.2  2004/02/18 18:40:02  jimmyo 
    31 # Added Log: 
    3216# 
    3317#%# family=auto 
  • people/ilmari/modularisation-branch/node/node.d/sendmail_mailstats.in

    r864 r1012  
    1313#       config   (required) 
    1414#       autoconf (optional) 
    15 # 
    16 # $Log$ 
    17 # Revision 1.6  2005/01/24 19:16:32  jimmyo 
    18 # Bugfix in generic/sendmail_* autoconf. 
    19 # 
    20 # Revision 1.5  2005/01/03 14:17:30  jimmyo 
    21 # Plugins generic/sendmail_mail{stats,traffic} updated. 
    22 # 
    2315# 
    2416# Magic markers (used by munin-node-configure) 
  • people/ilmari/modularisation-branch/node/node.d/sendmail_mailtraffic.in

    r864 r1012  
    1313#       config   (required) 
    1414#       autoconf (optional) 
    15 # 
    16 # $Log$ 
    17 # Revision 1.7  2005/01/24 19:16:33  jimmyo 
    18 # Bugfix in generic/sendmail_* autoconf. 
    19 # 
    20 # Revision 1.6  2005/01/03 14:17:30  jimmyo 
    21 # Plugins generic/sendmail_mail{stats,traffic} updated. 
    22 # 
    2315# 
    2416# Magic markers (used by munin-node-configure) 
  • people/ilmari/modularisation-branch/node/node.d/smart_.in

    r864 r1012  
    1818# Parameters 
    1919#       smartpath   - Specify path to smartctl program (Default: /usr/sbin/smartctl) 
    20 #       smartargs   - Override '-a' argument passed to smartctl with '-A'+smartargs 
     20#       smartargs   - Override '-a' argument passed to smartctl with '-A -i'+smartargs 
    2121#  
    2222# Parameters can be specified on a per-drive basis, eg: 
     
    2424#   user root 
    2525#   group disk 
    26 #   env.smartargs -H -i -c -l error -l selftest -l selective -d ata 
     26#   env.smartargs -H -c -l error -l selftest -l selective -d ata 
    2727#   env.smartpath /usr/local/sbin/smartctl 
    2828# 
    29 #   [smart_sda
     29#   [smart_twa0-1
    3030#   user root 
    3131#   group disk 
    32 #   env.smartargs -H -i -l error -d 3ware,2 
    33 
     32#   env.smartargs -H -l error -d 3ware,1 
     33
     34#   [smart_twa0-2] 
     35#   user root 
     36#   group disk 
     37#   env.smartargs -H -l error -d 3ware,2 
    3438# 
    3539# Author: Nicolas Stransky <Nico@neo-lan.net> 
     
    4650# v1.7 29/11/2004 - Add suggest capabilities for NetBSD, OpenBSD, FreeBSD and SunOS. 
    4751#                 - Allow to override completely the smartctl arguments with "smartargs" 
    48 # v1.8 16/02/2005 - Exit status field now only triggers warnings, not criitcals. 
    49 
    50 # Copyright (c) 2004 Nicolas Stransky. 
     52# v1.8 16/02/2005 - Exit status field now only triggers warnings, not criticals. 
     53# v1.9 07/07/2005 - Allow to query several drives on the same 3ware card. 
     54#                 - Correct a bug when '-i' was not listed in smartargs 
     55#                 - Don't fail if no value was obtained for hard drive model 
     56# v1.10 19/08/2005 - smartctl_exit_code is now a numerical value 
     57
     58# Copyright (c) 2004,2005 Nicolas Stransky. 
    5159# 
    5260# Permission to use, copy, and modify this software with or without fee 
     
    6674#%# family=auto 
    6775 
    68  
    6976import os, sys, string, pickle 
    7077from math import log 
     
    9097        verboselog('Reading S.M.A.R.T values') 
    9198        os.putenv('LC_ALL','C') 
    92         smart_output=os.popen(os.getenv('smartpath','/usr/sbin/smartctl')+' '+os.getenv('smartargs','-a')+' -A /dev/'+hard_drive) 
     99        smart_output=os.popen(os.getenv('smartpath','/usr/sbin/smartctl')+' '+os.getenv('smartargs','-a')+' -A -i /dev/'+hard_drive) 
    93100        read_values=0 
    94101        # For python < 2.2 compliance, switch comments on next 2 lines. 
     
    101108                try: model_list.remove('Version') 
    102109                except : None 
    103                 model=' ('+string.join(model_list)+')' 
     110                model=string.join(model_list) 
    104111            if read_values==1 : 
    105112                smart_attribute=string.split(l) 
    106113                smart_values[string.replace(smart_attribute[1],'-','_')]={"value":smart_attribute[3],"threshold":smart_attribute[5]} 
    107114            elif l[:18]=="ID# ATTRIBUTE_NAME" : 
     115                # Start reading the Attributes block 
    108116                read_values=1 
    109117        exit_status=smart_output.close() 
    110118        if exit_status!=None : 
    111             # smartctl exit code is a bitmask 
    112             num_exit_status=int(log(exit_status/256,2)
     119            # smartctl exit code is a bitmask, check man page. 
     120            num_exit_status=int(exit_status/256
    113121            if num_exit_status<=2 : 
    114                 verboselog('smartctl cannot access S.M.A.R.T values on drive '+hard_drive+'. Command exited with Bit '+str(num_exit_status)+' ('+str(exit_status/256)+')') 
     122                verboselog('smartctl cannot access S.M.A.R.T values on drive '+hard_drive+'. Command exited with code '+str(num_exit_status)+' ('+str(exit_status/256)+')') 
    115123                sys.exit(1) 
    116124            else : 
    117                 verboselog('smartctl exited with Bit '+str(num_exit_status)+'. '+hard_drive+' may be FAILING RIGHT NOW !') 
     125                verboselog('smartctl exited with code '+str(num_exit_status)+'. '+hard_drive+' may be FAILING RIGHT NOW !') 
    118126    except : 
    119127        verboselog('Cannot access S.M.A.R.T values ! Check user rights or propper smartmontools installation. Quitting...') 
     
    123131        sys.exit(1) 
    124132    smart_values["smartctl_exit_status"]={"value":str(num_exit_status),"threshold":"1"} 
    125     smart_values["model"]=model 
     133    try: smart_values["model"]=model 
     134    # For some reason we may have no value for "model" 
     135    except : smart_values["model"]="unknown" 
    126136 
    127137def open_state_file(mode) : 
    128     return open(statefiledir+'/smart-'+hard_drive+'.state',mode) 
     138    return open(statefiledir+'/smart-'+string.join(hard_drive,"-")+'.state',mode) 
    129139 
    130140def update_state_file() : 
     
    142152 
    143153def print_config(hard_drive,smart_values) : 
    144     if os.path.exists(statefiledir+'/smart-'+hard_drive+'.state'): 
    145         try : 
    146             verboselog('Try to recall previous S.M.A.R.T attributes for '+hard_drive
     154    if os.path.exists(statefiledir+'/smart-'+string.join(hard_drive,"-")+'.state'): 
     155        try : 
     156            verboselog('Try to recall previous S.M.A.R.T attributes for '+string.join(hard_drive,",")
    147157            smart_values_state=pickle.load(open_state_file("r")) 
    148158        except : 
     
    151161    else : 
    152162        verboselog('No state file, reading S.M.A.R.T values for the first time') 
    153         read_values(hard_drive
     163        read_values(hard_drive[0]
    154164        pickle.dump(smart_values,open_state_file("w")) 
    155165        smart_values_state=smart_values  
    156166 
    157167    verboselog('Printing configuration') 
    158     print('graph_title S.M.A.R.T values for drive '+hard_drive
     168    print('graph_title S.M.A.R.T values for drive '+string.join(hard_drive,",")
    159169    print('graph_vlabel Attribute S.M.A.R.T value') 
    160170    print('graph_args --base 1000 --lower-limit 0') 
    161171    print('graph_category disk') 
    162     print('graph_info This graph shows the value of all S.M.A.R.T attributes of drive '+hard_drive+smart_values_state['model']+'. smartctl_exit_status is the return value of smartctl. A non-zero return value indicates an error, a potential error, or a fault on the drive.') 
     172    print('graph_info This graph shows the value of all S.M.A.R.T attributes of drive '+string.join(hard_drive,",")+' ('+smart_values_state['model']+'). smartctl_exit_status is the return value of smartctl. A non-zero return value indicates an error, a potential error, or a fault on the drive.') 
    163173    attributes=smart_values_state.keys() 
    164174    attributes.sort() 
     
    167177        print(key+'.label '+key) 
    168178        print(key+'.draw LINE2') 
    169         # Following line can be commented out. Only useful for warning reports about S.M.A.R.T values 
     179        # Following line can be commented out if necessary. Only useful for warning reports about S.M.A.R.T values 
    170180        print(key+'.critical '+smart_values_state[key]["threshold"]+':') 
    171181    # Let's place smartctl_exit_status at the end 
    172182    print('smartctl_exit_status.label smartctl_exit_status') 
    173183    print('smartctl_exit_status.draw LINE2') 
    174     # Following line can be commented out. Only useful for warning reports about S.M.A.R.T values 
     184    # Following line can be commented out if necessary. Only useful for warning reports about S.M.A.R.T values 
    175185    print('smartctl_exit_status.warning '+smart_values_state['smartctl_exit_status']["threshold"]) 
    176186 
    177187def get_hard_drive_name() : 
    178188    try : 
    179         hard_drive=plugin_name[string.rindex(plugin_name,'_')+1:
     189        hard_drive=[plugin_name[string.rindex(plugin_name,'_')+1:]
    180190        if os.uname()[0]=="SunOS" : 
    181191            try : 
    182                 hard_drive_path=hard_drive 
    183                 if hard_drive[0:4]=="rdsk": 
    184                     hard_drive=os.path.join("rdsk",hard_drive_path[4:]) 
    185                 elif hard_drive[0:3]=="rmt": 
    186                     hard_drive=os.path.join("rmt",hard_drive_path[3:]) 
     192                # if hard_drive name starts with "rdsk" or "rmt", try to reconstruct the path 
     193                if hard_drive[0][0:4]=="rdsk": 
     194                    hard_drive[0]=os.path.join("rdsk",hard_drive[0][4:]) 
     195                elif hard_drive[0][0:3]=="rmt": 
     196                    hard_drive[0]=os.path.join("rmt",hard_drive[0][3:]) 
    187197            except : 
    188198                verboselog('Failed to find SunOS hard_drive') 
    189         if not os.path.exists('/dev/'+hard_drive): 
    190             verboselog('/dev/'+hard_drive+' not found !') 
     199        # For 3ware cards, we have to set multiple plugins for the same hard drive name. 
     200        # Let's see if we find a '-' in the drive name. 
     201        if hard_drive[0].find('-')!=-1: 
     202            # Put the drive name and it's number in a list 
     203            hard_drive=[hard_drive[0][:string.rindex(hard_drive[0],'-')],hard_drive[0][string.rindex(hard_drive[0],'-')+1:]] 
     204        # Chech that the drive exists in /dev 
     205        if not os.path.exists('/dev/'+hard_drive[0]): 
     206            verboselog('/dev/'+hard_drive[0]+' not found !') 
    191207            sys.exit(1) 
    192208        return(hard_drive) 
     
    196212 
    197213def find_smart_drives() : 
     214    # Try to autodetect Linux, *BSD, SunOS drives. Don't try to autodetect drives on a 3Ware card. 
    198215    drives=[] 
    199216    if os.uname()[0]=="Linux" : 
     
    202219            try : 
    203220                for drive in os.listdir('/sys/block/') : 
     221                    if drive[:2] in ['md','fd','lo','ra','dm'] : continue # Ignore MD, Floppy, loop , RAM and LVM devices. 
    204222                    try : 
    205223                        read_values(drive) 
     
    317335# No argument given, doing the real job: 
    318336hard_drive=get_hard_drive_name() 
    319 read_values(hard_drive
     337read_values(hard_drive[0]
    320338update_state_file() 
    321339print_plugin_values() 
  • people/ilmari/modularisation-branch/node/node.d/snmp__cpuload.in

    r865 r1012  
    1616# along with this program; if not, write to the Free Software 
    1717# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. 
    18 # 
    19 # 
    20 # $Log$ 
    21 # Revision 1.1  2005/02/17 19:42:46  jimmyo 
    22 # Added plugin generic/snmp__cpuload. 
    23 # 
    24 # Revision 1.7  2004/11/16 20:08:26  jimmyo 
    25 # License cleanups. 
    26 # 
    27 # Revision 1.6  2004/09/08 15:25:33  ilmari 
    28 # Use @@PERL@@ in all perl shebang lines. 
    29 # 
    30 # Revision 1.5  2004/09/07 13:19:22  ilmari 
    31 # SNMP plugins now honour the "host" environment variable if they can't deduce the hostname from zsh. 
    32 # 
    33 # Revision 1.4  2004/09/05 12:00:18  jimmyo 
    34 # Set family and capabilities. 
    35 # 
    36 # Revision 1.3  2004/09/04 21:58:28  jimmyo 
    37 # Set category and info fields. 
    38 # 
    39 # Revision 1.2  2004/09/03 22:56:51  jimmyo 
    40 # Added support for SNMP probing. 
    41 # 
    42 # Revision 1.1  2004/05/01 10:50:53  jimmyo 
    43 # New SNMP plugins users and load. 
    44 # 
    45 # Revision 1.1  2004/04/30 20:13:53  jimmyo 
    46 # New SNMP plugin for number of procs. 
    47 # 
    48 # Revision 1.1  2004/04/29 22:29:57  jimmyo 
    49 # New SNMP plugin for disk usage. 
    50 # 
    51 # Revision 1.3  2004/02/22 20:17:58  jimmyo 
    52 # Typo fix 
    53 # 
    54 # Revision 1.2  2004/02/18 21:54:56  jimmyo 
    55 # Did a bit of work on the snmp-thingie. 
    56 # 
    57 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    58 # Renamed occurrances of lrrd -> munin 
    59 # 
    60 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    61 # Import of LRRD CVS tree after renaming to Munin 
    62 # 
    63 # Revision 1.1  2003/12/19 20:53:45  jimmyo 
    64 # Created by jo 
    6518# 
    6619# 
     
    8942if (defined $ARGV[0] and $ARGV[0] eq "config") 
    9043{ 
    91         print "host_name ", $session->hostname(), "\n"; 
     44        print "host_name ", $session->hostname(), "\n" 
     45          unless $session->hostname eq 'localhost'; 
    9246        print "graph_title CPU utilisation 
    9347graph_args --base 1000 -l 0 -u 100 
  • people/ilmari/modularisation-branch/node/node.d/snmp__df.in

    r903 r1012  
    1717# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. 
    1818# 
    19 # 
    20 # $Log$ 
    21 # Revision 1.10  2004/11/16 20:08:26  jimmyo 
    22 # License cleanups. 
    23 # 
    24 # Revision 1.9  2004/09/08 15:25:33  ilmari 
    25 # Use @@PERL@@ in all perl shebang lines. 
    26 # 
    27 # Revision 1.8  2004/09/07 13:19:22  ilmari 
    28 # SNMP plugins now honour the "host" environment variable if they can't deduce the hostname from zsh. 
    29 # 
    30 # Revision 1.7  2004/09/07 12:58:41  ilmari 
    31 # SNMP plugin "df" properly strips the label and serial number fromWindows drive labels. 
    32 # 
    33 # Revision 1.6  2004/09/05 12:00:18  jimmyo 
    34 # Set family and capabilities. 
    35 # 
    36 # Revision 1.5  2004/09/04 21:58:28  jimmyo 
    37 # Set category and info fields. 
    38 # 
    39 # Revision 1.4  2004/09/04 21:33:12  jimmyo 
    40 # Handle strange characters better. 
    41 # 
    42 # Revision 1.3  2004/09/04 21:08:16  jimmyo 
    43 # SNMP df plugin now talks Windowese. 
    44 # 
    45 # Revision 1.2  2004/09/03 22:56:51  jimmyo 
    46 # Added support for SNMP probing. 
    47 # 
    48 # Revision 1.1  2004/04/29 22:29:57  jimmyo 
    49 # New SNMP plugin for disk usage. 
    50 # 
    51 # Revision 1.3  2004/02/22 20:17:58  jimmyo 
    52 # Typo fix 
    53 # 
    54 # Revision 1.2  2004/02/18 21:54:56  jimmyo 
    55 # Did a bit of work on the snmp-thingie. 
    56 # 
    57 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    58 # Renamed occurrances of lrrd -> munin 
    59 # 
    60 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    61 # Import of LRRD CVS tree after renaming to Munin 
    62 # 
    63 # Revision 1.1  2003/12/19 20:53:45  jimmyo 
    64 # Created by jo 
    6519# 
    6620#%# family=snmpauto 
     
    169123if (defined $ARGV[0] and $ARGV[0] eq "config") 
    170124{ 
    171         print "host_name ", $session->hostname(), "\n"; 
     125        print "host_name ", $session->hostname(), "\n" 
     126          unless $session->hostname eq 'localhost'; 
    172127        print "graph_title Filesystem usage (in %)\n"; 
    173128        print "graph_args --upper-limit 100 -l 0\n"; 
  • people/ilmari/modularisation-branch/node/node.d/snmp__fc_if_.in

    r903 r1012  
    1616# along with this program; if not, write to the Free Software 
    1717# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. 
    18 # 
    19 # 
    20 # $Log$ 
    21 # Revision 1.11  2004/12/10 18:51:43  jimmyo 
    22 # linux/apt* has been forced to LANG=C, to get predictable output. 
    23 # 
    24 # Revision 1.10  2004/12/10 10:47:47  jimmyo 
    25 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    26 # 
    27 # Revision 1.9  2004/12/09 22:12:55  jimmyo 
    28 # Added "graph_period" option, to make "graph_sums" usable. 
    29 # 
    30 # Revision 1.8  2004/11/21 00:16:56  jimmyo 
    31 # Changed a lot of plugins so they use DERIVE instead of COUNTER. 
    32 # 
    33 # Revision 1.7  2004/11/16 20:08:26  jimmyo 
    34 # License cleanups. 
    35 # 
    36 # Revision 1.6  2004/11/12 20:28:03  ilmari 
    37 # No debugging info by default 
    38 # 
    39 # Revision 1.5  2004/09/08 15:25:33  ilmari 
    40 # Use @@PERL@@ in all perl shebang lines. 
    41 # 
    42 # Revision 1.4  2004/09/07 13:19:22  ilmari 
    43 # SNMP plugins now honour the "host" environment variable if they can't deduce the hostname from zsh. 
    44 # 
    45 # Revision 1.3  2004/09/05 12:00:18  jimmyo 
    46 # Set family and capabilities. 
    47 # 
    48 # Revision 1.2  2004/09/04 21:58:28  jimmyo 
    49 # Set category and info fields. 
    50 # 
    51 # Revision 1.1  2004/04/30 22:22:07  jimmyo 
    52 # Added to SNMP based fibre-channel plugins: fc_if and fc_if_err. 
    53 # 
    54 # Revision 1.4  2004/04/30 16:58:14  jimmyo 
    55 # Added max. 
    56 # 
    57 # Revision 1.3  2004/02/22 20:17:58  jimmyo 
    58 # Typo fix 
    59 # 
    60 # Revision 1.2  2004/02/18 21:54:56  jimmyo 
    61 # Did a bit of work on the snmp-thingie. 
    62 # 
    63 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    64 # Renamed occurrances of lrrd -> munin 
    65 # 
    66 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    67 # Import of LRRD CVS tree after renaming to Munin 
    68 # 
    69 # Revision 1.1  2003/12/19 20:53:45  jimmyo 
    70 # Created by jo 
    7118# 
    7219# 
     
    10855if ($ARGV[0] and $ARGV[0] eq "config") 
    10956{ 
    110         print "host_name ", $session->hostname(), "\n"; 
     57        print "host_name ", $session->hostname(), "\n" 
     58          unless $session->hostname eq 'localhost'; 
    11159        if (!defined ($response = $session->get_request($fcEntryDescr))) 
    11260        { 
  • people/ilmari/modularisation-branch/node/node.d/snmp__fc_if_err_.in

    r903 r1012  
    1616# along with this program; if not, write to the Free Software 
    1717# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. 
    18 # 
    19 # 
    20 # $Log$ 
    21 # Revision 1.11  2004/12/10 18:51:43  jimmyo 
    22 # linux/apt* has been forced to LANG=C, to get predictable output. 
    23 # 
    24 # Revision 1.10  2004/12/10 10:47:47  jimmyo 
    25 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    26 # 
    27 # Revision 1.9  2004/12/09 22:12:55  jimmyo 
    28 # Added "graph_period" option, to make "graph_sums" usable. 
    29 # 
    30 # Revision 1.8  2004/11/21 00:16:56  jimmyo 
    31 # Changed a lot of plugins so they use DERIVE instead of COUNTER. 
    32 # 
    33 # Revision 1.7  2004/11/16 20:08:26  jimmyo 
    34 # License cleanups. 
    35 # 
    36 # Revision 1.6  2004/11/12 20:28:03  ilmari 
    37 # No debugging info by default 
    38 # 
    39 # Revision 1.5  2004/09/08 15:25:33  ilmari 
    40 # Use @@PERL@@ in all perl shebang lines. 
    41 # 
    42 # Revision 1.4  2004/09/07 13:19:22  ilmari 
    43 # SNMP plugins now honour the "host" environment variable if they can't deduce the hostname from zsh. 
    44 # 
    45 # Revision 1.3  2004/09/05 12:00:18  jimmyo 
    46 # Set family and capabilities. 
    47 # 
    48 # Revision 1.2  2004/09/04 21:58:28  jimmyo 
    49 # Set category and info fields. 
    50 # 
    51 # Revision 1.1  2004/04/30 22:22:07  jimmyo 
    52 # Added to SNMP based fibre-channel plugins: fc_if and fc_if_err. 
    53 # 
    54 # Revision 1.4  2004/04/30 16:58:14  jimmyo 
    55 # Added max. 
    56 # 
    57 # Revision 1.3  2004/02/22 20:17:58  jimmyo 
    58 # Typo fix 
    59 # 
    60 # Revision 1.2  2004/02/18 21:54:56  jimmyo 
    61 # Did a bit of work on the snmp-thingie. 
    62 # 
    63 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    64 # Renamed occurrances of lrrd -> munin 
    65 # 
    66 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    67 # Import of LRRD CVS tree after renaming to Munin 
    68 # 
    69 # Revision 1.1  2003/12/19 20:53:45  jimmyo 
    70 # Created by jo 
    7118# 
    7219# 
     
    10754if ($ARGV[0] and $ARGV[0] eq "config") 
    10855{ 
    109         print "host_name ", $session->hostname(), "\n"; 
     56        print "host_name ", $session->hostname(), "\n" 
     57          unless $session->hostname eq 'localhost'; 
    11058        if (!defined ($response = $session->get_request($fcEntryDescr))) 
    11159        { 
  • people/ilmari/modularisation-branch/node/node.d/snmp__if_.in

    r898 r1012  
    1616# along with this program; if not, write to the Free Software 
    1717# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. 
    18 # 
    19 # 
    20 # $Log$ 
    21 # Revision 1.18  2004/12/10 18:51:43  jimmyo 
    22 # linux/apt* has been forced to LANG=C, to get predictable output. 
    23 # 
    24 # Revision 1.17  2004/12/10 10:47:47  jimmyo 
    25 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    26 # 
    27 # Revision 1.16  2004/12/09 22:12:55  jimmyo 
    28 # Added "graph_period" option, to make "graph_sums" usable. 
    29 # 
    30 # Revision 1.15  2004/11/21 00:16:56  jimmyo 
    31 # Changed a lot of plugins so they use DERIVE instead of COUNTER. 
    32 # 
    33 # Revision 1.14  2004/11/20 22:37:21  jimmyo 
    34 # Strip strange characters. 
    35 # 
    36 # Revision 1.13  2004/11/20 22:10:49  jimmyo 
    37 # Clean up output of plugin a bit. 
    38 # 
    39 # Revision 1.12  2004/11/20 22:06:22  jimmyo 
    40 # Clean up output of plugin a bit. 
    41 # 
    42 # Revision 1.11  2004/11/16 20:08:26  jimmyo 
    43 # License cleanups. 
    44 # 
    45 # Revision 1.10  2004/11/12 20:28:03  ilmari 
    46 # No debugging info by default 
    47 # 
    48 # Revision 1.9  2004/09/08 15:25:33  ilmari 
    49 # Use @@PERL@@ in all perl shebang lines. 
    50 # 
    51 # Revision 1.8  2004/09/07 13:19:22  ilmari 
    52 # SNMP plugins now honour the "host" environment variable if they can't deduce the hostname from zsh. 
    53 # 
    54 # Revision 1.7  2004/09/05 12:00:18  jimmyo 
    55 # Set family and capabilities. 
    56 # 
    57 # Revision 1.6  2004/09/04 21:58:28  jimmyo 
    58 # Set category and info fields. 
    59 # 
    60 # Revision 1.5  2004/09/04 19:12:14  jimmyo 
    61 # Accept ppp interfaces as well as ethernet interfaces. 
    62 # 
    63 # Revision 1.4  2004/04/30 16:58:14  jimmyo 
    64 # Added max. 
    65 # 
    66 # Revision 1.3  2004/02/22 20:17:58  jimmyo 
    67 # Typo fix 
    68 # 
    69 # Revision 1.2  2004/02/18 21:54:56  jimmyo 
    70 # Did a bit of work on the snmp-thingie. 
    71 # 
    72 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    73 # Renamed occurrances of lrrd -> munin 
    74 # 
    75 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    76 # Import of LRRD CVS tree after renaming to Munin 
    77 # 
    78 # Revision 1.1  2003/12/19 20:53:45  jimmyo 
    79 # Created by jo 
    8018# 
    8119# 
     
    12664if ($ARGV[0] and $ARGV[0] eq "config") 
    12765{ 
    128         print 'host_name ', $session->hostname(), "\n"; 
     66        print 'host_name ', $session->hostname(), "\n" 
     67          unless $session->hostname eq 'localhost'; 
    12968        my $name = $info->{'descr'}; 
    13069        $name =~ s/[^\w\s]//g; 
  • people/ilmari/modularisation-branch/node/node.d/snmp__if_err_.in

    r898 r1012  
    1616# along with this program; if not, write to the Free Software 
    1717# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. 
    18 # 
    19 # 
    20 # $Log$ 
    21 # Revision 1.16  2004/12/10 18:51:43  jimmyo 
    22 # linux/apt* has been forced to LANG=C, to get predictable output. 
    23 # 
    24 # Revision 1.15  2004/12/10 10:47:47  jimmyo 
    25 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    26 # 
    27 # Revision 1.14  2004/12/09 22:12:55  jimmyo 
    28 # Added "graph_period" option, to make "graph_sums" usable. 
    29 # 
    30 # Revision 1.13  2004/11/21 00:16:56  jimmyo 
    31 # Changed a lot of plugins so they use DERIVE instead of COUNTER. 
    32 # 
    33 # Revision 1.12  2004/11/20 22:37:21  jimmyo 
    34 # Strip strange characters. 
    35 # 
    36 # Revision 1.11  2004/11/20 22:10:49  jimmyo 
    37 # Clean up output of plugin a bit. 
    38 # 
    39 # Revision 1.10  2004/11/20 22:06:22  jimmyo 
    40 # Clean up output of plugin a bit. 
    41 # 
    42 # Revision 1.9  2004/11/16 20:08:26  jimmyo 
    43 # License cleanups. 
    44 # 
    45 # Revision 1.8  2004/11/12 20:28:03  ilmari 
    46 # No debugging info by default 
    47 # 
    48 # Revision 1.7  2004/09/08 15:25:33  ilmari 
    49 # Use @@PERL@@ in all perl shebang lines. 
    50 # 
    51 # Revision 1.6  2004/09/07 13:19:22  ilmari 
    52 # SNMP plugins now honour the "host" environment variable if they can't deduce the hostname from zsh. 
    53 # 
    54 # Revision 1.5  2004/09/05 12:00:18  jimmyo 
    55 # Set family and capabilities. 
    56 # 
    57 # Revision 1.4  2004/09/04 21:58:28  jimmyo 
    58 # Set category and info fields. 
    59 # 
    60 # Revision 1.3  2004/09/04 19:12:14  jimmyo 
    61 # Accept ppp interfaces as well as ethernet interfaces. 
    62 # 
    63 # Revision 1.2  2004/04/30 22:20:22  jimmyo 
    64 # It should now even work. :-) 
    65 # 
    66 # Revision 1.1  2004/04/30 16:59:45  jimmyo 
    67 # New SNMP plugin: if_err 
    68 # 
    69 # Revision 1.3  2004/02/22 20:17:58  jimmyo 
    70 # Typo fix 
    71 # 
    72 # Revision 1.2  2004/02/18 21:54:56  jimmyo 
    73 # Did a bit of work on the snmp-thingie. 
    74 # 
    75 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    76 # Renamed occurrances of lrrd -> munin 
    77 # 
    78 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    79 # Import of LRRD CVS tree after renaming to Munin 
    80 # 
    81 # Revision 1.1  2003/12/19 20:53:45  jimmyo 
    82 # Created by jo 
    8318# 
    8419# 
     
    12964if ($ARGV[0] and $ARGV[0] eq "config") 
    13065{ 
    131         print 'host_name ', $session->hostname(), "\n"; 
     66        print 'host_name ', $session->hostname(), "\n" 
     67          unless $session->hostname eq 'localhost'; 
    13268        my $name = $info->{'descr'}; 
    13369        $name =~ s/[^\w\s]//g; 
  • people/ilmari/modularisation-branch/node/node.d/snmp__load.in

    r865 r1012  
    1616# along with this program; if not, write to the Free Software 
    1717# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. 
    18 # 
    19 # 
    20 # $Log$ 
    21 # Revision 1.7  2004/11/16 20:08:26  jimmyo 
    22 # License cleanups. 
    23 # 
    24 # Revision 1.6  2004/09/08 15:25:33  ilmari 
    25 # Use @@PERL@@ in all perl shebang lines. 
    26 # 
    27 # Revision 1.5  2004/09/07 13:19:22  ilmari 
    28 # SNMP plugins now honour the "host" environment variable if they can't deduce the hostname from zsh. 
    29 # 
    30 # Revision 1.4  2004/09/05 12:00:18  jimmyo 
    31 # Set family and capabilities. 
    32 # 
    33 # Revision 1.3  2004/09/04 21:58:28  jimmyo 
    34 # Set category and info fields. 
    35 # 
    36 # Revision 1.2  2004/09/03 22:56:51  jimmyo 
    37 # Added support for SNMP probing. 
    38 # 
    39 # Revision 1.1  2004/05/01 10:50:53  jimmyo 
    40 # New SNMP plugins users and load. 
    41 # 
    42 # Revision 1.1  2004/04/30 20:13:53  jimmyo 
    43 # New SNMP plugin for number of procs. 
    44 # 
    45 # Revision 1.1  2004/04/29 22:29:57  jimmyo 
    46 # New SNMP plugin for disk usage. 
    47 # 
    48 # Revision 1.3  2004/02/22 20:17:58  jimmyo 
    49 # Typo fix 
    50 # 
    51 # Revision 1.2  2004/02/18 21:54:56  jimmyo 
    52 # Did a bit of work on the snmp-thingie. 
    53 # 
    54 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    55 # Renamed occurrances of lrrd -> munin 
    56 # 
    57 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    58 # Import of LRRD CVS tree after renaming to Munin 
    59 # 
    60 # Revision 1.1  2003/12/19 20:53:45  jimmyo 
    61 # Created by jo 
    6218# 
    6319# 
     
    8642if (defined $ARGV[0] and $ARGV[0] eq "config") 
    8743{ 
    88         print 'host_name ', $session->hostname(), "\n"; 
     44        print 'host_name ', $session->hostname(), "\n" 
     45          unless $session->hostname eq 'localhost'; 
    8946        print "graph_title Load average 
    9047graph_args --base 1000 -l 0  
  • people/ilmari/modularisation-branch/node/node.d/snmp__processes.in

    r865 r1012  
    1616# along with this program; if not, write to the Free Software 
    1717# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. 
    18 # 
    19 # 
    20 # $Log$ 
    21 # Revision 1.7  2004/11/16 20:08:26  jimmyo 
    22 # License cleanups. 
    23 # 
    24 # Revision 1.6  2004/09/08 15:25:33  ilmari 
    25 # Use @@PERL@@ in all perl shebang lines. 
    26 # 
    27 # Revision 1.5  2004/09/07 13:19:22  ilmari 
    28 # SNMP plugins now honour the "host" environment variable if they can't deduce the hostname from zsh. 
    29 # 
    30 # Revision 1.4  2004/09/05 12:00:18  jimmyo 
    31 # Set family and capabilities. 
    32 # 
    33 # Revision 1.3  2004/09/04 21:58:28  jimmyo 
    34 # Set category and info fields. 
    35 # 
    36 # Revision 1.2  2004/09/03 22:56:51  jimmyo 
    37 # Added support for SNMP probing. 
    38 # 
    39 # Revision 1.1  2004/04/30 20:13:53  jimmyo 
    40 # New SNMP plugin for number of procs. 
    41 # 
    42 # Revision 1.1  2004/04/29 22:29:57  jimmyo 
    43 # New SNMP plugin for disk usage. 
    44 # 
    45 # Revision 1.3  2004/02/22 20:17:58  jimmyo 
    46 # Typo fix 
    47 # 
    48 # Revision 1.2  2004/02/18 21:54:56  jimmyo 
    49 # Did a bit of work on the snmp-thingie. 
    50 # 
    51 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    52 # Renamed occurrances of lrrd -> munin 
    53 # 
    54 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    55 # Import of LRRD CVS tree after renaming to Munin 
    56 # 
    57 # Revision 1.1  2003/12/19 20:53:45  jimmyo 
    58 # Created by jo 
    5918# 
    6019# 
     
    8342if (defined $ARGV[0] and $ARGV[0] eq "config") 
    8443{ 
    85         print "host_name ", $session->hostname(), "\n"; 
     44        print "host_name ", $session->hostname(), "\n" 
     45          unless $session->hostname eq 'localhost'; 
    8646        print "graph_title Number of Processes 
    8747graph_args --base 1000 -l 0  
  • people/ilmari/modularisation-branch/node/node.d/snmp__sensors_fsc_bx_fan.in

    r864 r1012  
    2020# Plugin to fetch fan data from the SNMP agent on the management blade 
    2121# on Fujitsu Simens BX series blade servers 
    22 # 
    23 # $Log$ 
    24 # Revision 1.4  2004/11/16 20:08:26  jimmyo 
    25 # License cleanups. 
    26 # 
    27 # Revision 1.3  2004/11/12 20:28:03  ilmari 
    28 # No debugging info by default 
    29 # 
    30 # Revision 1.2  2004/11/12 20:23:56  ilmari 
    31 # Rename Munin::Node::SNMP to Munin::Plugin::SNMP 
    32 # 
    33 # Revision 1.1  2004/10/27 18:58:26  ilmari 
    34 # Added SNMP plugins for Fujitsu Siemens ServerView temperature and fan sensors 
    35 # 
    3622# 
    3723#%# family=snmpauto 
     
    9985EOM 
    10086    print 'graph_order ', join(' ', map { get_id($_) } oid_lex_sort keys %$fans), "\n"; 
    101     print 'host_name ', $session->hostname(), "\n"; 
     87    print 'host_name ', $session->hostname(), "\n" 
     88      unless $session->hostname eq 'localhost'; 
    10289       
    10390    for my $fan (keys %$fans) { 
  • people/ilmari/modularisation-branch/node/node.d/snmp__sensors_fsc_bx_temp.in

    r864 r1012  
    2020# Plugin to fetch temperature data from the SNMP agent on the management 
    2121# blade on Fujitsu Simens BX series blade servers 
    22 # 
    23 # $Log$ 
    24 # Revision 1.4  2004/11/16 20:08:26  jimmyo 
    25 # License cleanups. 
    26 # 
    27 # Revision 1.3  2004/11/12 20:28:03  ilmari 
    28 # No debugging info by default 
    29 # 
    30 # Revision 1.2  2004/11/12 20:23:57  ilmari 
    31 # Rename Munin::Node::SNMP to Munin::Plugin::SNMP 
    32 # 
    33 # Revision 1.1  2004/10/27 18:58:26  ilmari 
    34 # Added SNMP plugins for Fujitsu Siemens ServerView temperature and fan sensors 
    35 # 
    3622# 
    3723#%# family=snmpauto 
     
    10692EOM 
    10793    print 'graph_order ', join(' ', map { get_id($_) } oid_lex_sort keys %$temps), "\n"; 
    108     print 'host_name ', $session->hostname(), "\n"; 
     94    print 'host_name ', $session->hostname(), "\n" 
     95      unless $session->hostname eq 'localhost'; 
    10996       
    11097    for my $sensor (keys %$temps) { 
  • people/ilmari/modularisation-branch/node/node.d/snmp__sensors_fsc_fan.in

    r864 r1012  
    2020# Plugin to fetch fan data from the ServerView SNMP agent on Fujitsu 
    2121# Simens servers 
    22 # 
    23 # $Log$ 
    24 # Revision 1.4  2004/11/16 20:08:26  jimmyo 
    25 # License cleanups. 
    26 # 
    27 # Revision 1.3  2004/11/12 20:28:03  ilmari 
    28 # No debugging info by default 
    29 # 
    30 # Revision 1.2  2004/11/12 20:23:57  ilmari 
    31 # Rename Munin::Node::SNMP to Munin::Plugin::SNMP 
    32 # 
    33 # Revision 1.1  2004/10/27 18:58:26  ilmari 
    34 # Added SNMP plugins for Fujitsu Siemens ServerView temperature and fan sensors 
    35 # 
    3622# 
    3723#%# family=snmpauto 
     
    10490EOM 
    10591    print 'graph_order ', join(' ', map { get_id($_) } oid_lex_sort keys %$fans), "\n"; 
    106     print 'host_name ', $session->hostname(), "\n"; 
     92    print 'host_name ', $session->hostname(), "\n" 
     93      unless $session->hostname eq 'localhost'; 
    10794       
    10895    for my $fan (keys %$fans) { 
  • people/ilmari/modularisation-branch/node/node.d/snmp__sensors_fsc_temp.in

    r864 r1012  
    2020# Plugin to fetch temperature data from the ServerView SNMP agent on 
    2121# Fujitsu Simens servers 
    22 # 
    23 # $Log$ 
    24 # Revision 1.4  2004/11/16 20:08:26  jimmyo 
    25 # License cleanups. 
    26 # 
    27 # Revision 1.3  2004/11/12 20:28:03  ilmari 
    28 # No debugging info by default 
    29 # 
    30 # Revision 1.2  2004/11/12 20:23:57  ilmari 
    31 # Rename Munin::Node::SNMP to Munin::Plugin::SNMP 
    32 # 
    33 # Revision 1.1  2004/10/27 18:58:26  ilmari 
    34 # Added SNMP plugins for Fujitsu Siemens ServerView temperature and fan sensors 
    35 # 
    3622# 
    3723#%# family=snmpauto 
     
    10894EOM 
    10995    print 'graph_order ', join(' ', map { get_id($_) } oid_lex_sort keys %$temps), "\n"; 
    110     print 'host_name ', $session->hostname(), "\n"; 
     96    print 'host_name ', $session->hostname(), "\n" 
     97      unless $session->hostname eq 'localhost'; 
    11198       
    11299    for my $sensor (keys %$temps) { 
  • people/ilmari/modularisation-branch/node/node.d/snmp__sensors_mbm_fan.in

    r903 r1012  
    2727#       port      - SNMP port 
    2828#       community - SNMP community 
    29 # 
    30 # $Log$ 
    31 # Revision 1.3  2004/11/16 20:08:26  jimmyo 
    32 # License cleanups. 
    33 # 
    34 # Revision 1.2  2004/09/12 10:15:07  jimmyo 
    35 # Added some documentation. 
    36 # 
    37 # Revision 1.1  2004/09/12 00:26:52  jimmyo 
    38 # Added new SNMP plugins for sensors, reading info from System-Informant on Windows boxes. 
    39 # 
    4029# 
    4130#%# family=snmpauto 
     
    9281if (defined $ARGV[0] and $ARGV[0] eq "config") 
    9382{ 
    94         print "host_name ", $session->hostname(), "\n"; 
     83        print "host_name ", $session->hostname(), "\n" 
     84          unless $session->hostname eq 'localhost'; 
    9585        print "graph_title Fan speed\n"; 
    9686        print "graph_args --upper-limit 100 -l 0\n"; 
  • people/ilmari/modularisation-branch/node/node.d/snmp__sensors_mbm_temp.in

    r903 r1012  
    2727#       port      - SNMP port 
    2828#       community - SNMP community 
    29 # 
    30 # $Log$ 
    31 # Revision 1.3  2004/11/16 20:08:26  jimmyo 
    32 # License cleanups. 
    33 # 
    34 # Revision 1.2  2004/09/12 10:15:07  jimmyo 
    35 # Added some documentation. 
    36 # 
    37 # Revision 1.1  2004/09/12 00:26:52  jimmyo 
    38 # Added new SNMP plugins for sensors, reading info from System-Informant on Windows boxes. 
    39 # 
    4029# 
    4130#%# family=snmpauto 
     
    9281if (defined $ARGV[0] and $ARGV[0] eq "config") 
    9382{ 
    94         print "host_name ", $session->hostname(), "\n"; 
     83        print "host_name ", $session->hostname(), "\n" 
     84          unless $session->hostname eq 'localhost'; 
    9585        print "graph_title Temperatures\n"; 
    9686        print "graph_args --upper-limit 100 -l 0\n"; 
  • people/ilmari/modularisation-branch/node/node.d/snmp__sensors_mbm_volt.in

    r903 r1012  
    2727#       port      - SNMP port 
    2828#       community - SNMP community 
    29 # 
    30 # $Log$ 
    31 # Revision 1.4  2004/11/16 20:08:26  jimmyo 
    32 # License cleanups. 
    33 # 
    34 # Revision 1.3  2004/09/25 22:36:10  jimmyo 
    35 # Removed graph_args. 
    36 # 
    37 # Revision 1.2  2004/09/12 10:15:07  jimmyo 
    38 # Added some documentation. 
    39 # 
    40 # Revision 1.1  2004/09/12 00:26:52  jimmyo 
    41 # Added new SNMP plugins for sensors, reading info from System-Informant on Windows boxes. 
    42 # 
    4329# 
    4430#%# family=snmpauto 
     
    9581if (defined $ARGV[0] and $ARGV[0] eq "config") 
    9682{ 
    97         print "host_name ", $session->hostname(), "\n"; 
     83        print "host_name ", $session->hostname(), "\n" 
     84          unless $session->hostname eq 'localhost'; 
    9885        print "graph_title Voltages\n"; 
    9986        print "graph_vlabel Volt\n"; 
  • people/ilmari/modularisation-branch/node/node.d/snmp__users.in

    r865 r1012  
    1616# along with this program; if not, write to the Free Software 
    1717# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. 
    18 # 
    19 # 
    20 # $Log$ 
    21 # Revision 1.7  2004/11/16 20:08:26  jimmyo 
    22 # License cleanups. 
    23 # 
    24 # Revision 1.6  2004/09/08 15:25:33  ilmari 
    25 # Use @@PERL@@ in all perl shebang lines. 
    26 # 
    27 # Revision 1.5  2004/09/07 13:19:22  ilmari 
    28 # SNMP plugins now honour the "host" environment variable if they can't deduce the hostname from zsh. 
    29 # 
    30 # Revision 1.4  2004/09/05 12:00:18  jimmyo 
    31 # Set family and capabilities. 
    32 # 
    33 # Revision 1.3  2004/09/04 21:58:28  jimmyo 
    34 # Set category and info fields. 
    35 # 
    36 # Revision 1.2  2004/09/03 22:56:51  jimmyo 
    37 # Added support for SNMP probing. 
    38 # 
    39 # Revision 1.1  2004/05/01 10:50:53  jimmyo 
    40 # New SNMP plugins users and load. 
    41 # 
    42 # Revision 1.1  2004/04/30 20:13:53  jimmyo 
    43 # New SNMP plugin for number of procs. 
    44 # 
    45 # Revision 1.1  2004/04/29 22:29:57  jimmyo 
    46 # New SNMP plugin for disk usage. 
    47 # 
    48 # Revision 1.3  2004/02/22 20:17:58  jimmyo 
    49 # Typo fix 
    50 # 
    51 # Revision 1.2  2004/02/18 21:54:56  jimmyo 
    52 # Did a bit of work on the snmp-thingie. 
    53 # 
    54 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    55 # Renamed occurrances of lrrd -> munin 
    56 # 
    57 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    58 # Import of LRRD CVS tree after renaming to Munin 
    59 # 
    60 # Revision 1.1  2003/12/19 20:53:45  jimmyo 
    61 # Created by jo 
    6218# 
    6319# 
     
    8642if (defined $ARGV[0] and $ARGV[0] eq "config") 
    8743{ 
    88         print "host_name ", $session->hostname(), "\n"; 
     44        print "host_name ", $session->hostname(), "\n" 
     45          unless $session->hostname eq 'localhost'; 
    8946        print "graph_title Number of users 
    9047graph_args --base 1000 -l 0  
  • people/ilmari/modularisation-branch/node/node.d/spamstats.in

    r864 r1012  
    11#!@@PERL@@ 
    2 # 
    3 # $Log$ 
    4 # Revision 1.5  2004/12/10 18:51:43  jimmyo 
    5 # linux/apt* has been forced to LANG=C, to get predictable output. 
    6 # 
    7 # Revision 1.4  2004/12/10 10:47:47  jimmyo 
    8 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    9 # 
    10 # Revision 1.3  2004/12/09 22:12:55  jimmyo 
    11 # Added "graph_period" option, to make "graph_sums" usable. 
    12 # 
    13 # Revision 1.2  2004/11/21 00:16:56  jimmyo 
    14 # Changed a lot of plugins so they use DERIVE instead of COUNTER. 
    15 # 
    16 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    17 # Renamed occurrances of lrrd -> munin 
    18 # 
    19 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    20 # Import of LRRD CVS tree after renaming to Munin 
    21 # 
    22 # Revision 1.1  2003/11/10 18:51:50  jimmyo 
    23 # Initial entries 
    24 # 
    252# 
    263 
  • people/ilmari/modularisation-branch/node/node.d/squid_cache.in

    r864 r1012  
    3131#       config    (required) 
    3232#       autoconf  (optional - only used by munin-config) 
    33 # 
    34 # $Log$ 
    35 # Revision 1.5  2005/01/24 21:44:06  jimmyo 
    36 # Plugin generic/squid_cache now handles multiple caches (Deb#288579). 
    37 # 
    38 # Revision 1.4  2004/11/16 20:18:09  jimmyo 
    39 # License cleanups. 
    40 # 
    41 # Revision 1.3  2004/05/20 13:57:12  jimmyo 
    42 # Set categories to some of the plugins. 
    43 # 
    44 # Revision 1.2  2004/03/14 11:33:13  auduny 
    45 # Added squidpatch from Jacques Caruso 
    46 # 
    47 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    48 # Renamed occurrances of lrrd -> munin 
    49 # 
    50 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    51 # Import of LRRD CVS tree after renaming to Munin 
    52 # 
    53 # Revision 1.7  2003/12/18 17:26:26  jimmyo 
    54 # Remove use of "use" 
    55 # 
    56 # Revision 1.6  2003/11/10 18:41:32  jimmyo 
    57 # Removed Data::Dumper dependency. 
    58 # 
    59 # Revision 1.5  2003/11/07 21:36:25  jimmyo 
    60 # Fixed typos and mental typos 
    61 # 
    62 # Revision 1.4  2003/11/07 17:43:16  jimmyo 
    63 # Cleanups and log entries 
    64 # 
    65 # 
    6633# 
    6734#%# family=auto 
  • people/ilmari/modularisation-branch/node/node.d/squid_icp.in

    r864 r1012  
    3232#       config    (required) 
    3333#       autoconf  (optional - only used by munin-config) 
    34 # 
    35 # $Log$ 
    36 # Revision 1.8  2004/12/10 18:51:43  jimmyo 
    37 # linux/apt* has been forced to LANG=C, to get predictable output. 
    38 # 
    39 # Revision 1.7  2004/12/10 10:47:47  jimmyo 
    40 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    41 # 
    42 # Revision 1.6  2004/12/09 22:12:55  jimmyo 
    43 # Added "graph_period" option, to make "graph_sums" usable. 
    44 # 
    45 # Revision 1.5  2004/11/16 20:18:09  jimmyo 
    46 # License cleanups. 
    47 # 
    48 # Revision 1.4  2004/09/26 22:03:52  jimmyo 
    49 # Changd COUNTER -> DERIVE for some plugins. Set min/max values. 
    50 # 
    51 # Revision 1.3  2004/05/20 13:57:12  jimmyo 
    52 # Set categories to some of the plugins. 
    53 # 
    54 # Revision 1.2  2004/03/14 11:33:13  auduny 
    55 # Added squidpatch from Jacques Caruso 
    56 # 
    57 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    58 # Renamed occurrances of lrrd -> munin 
    59 # 
    60 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    61 # Import of LRRD CVS tree after renaming to Munin 
    62 # 
    63 # Revision 1.6  2003/12/18 17:26:26  jimmyo 
    64 # Remove use of "use" 
    65 # 
    66 # Revision 1.5  2003/11/10 18:41:33  jimmyo 
    67 # Removed Data::Dumper dependency. 
    68 # 
    69 # Revision 1.4  2003/11/07 21:36:25  jimmyo 
    70 # Fixed typos and mental typos 
    71 # 
    72 # Revision 1.3  2003/11/07 17:43:16  jimmyo 
    73 # Cleanups and log entries 
    74 # 
    75 # 
    7634# 
    7735#%# family=manual 
  • people/ilmari/modularisation-branch/node/node.d/squid_requests.in

    r864 r1012  
    3131#       config    (required) 
    3232#       autoconf  (optional - only used by munin-config) 
    33 # 
    34 # $Log$ 
    35 # Revision 1.8  2004/12/10 18:51:43  jimmyo 
    36 # linux/apt* has been forced to LANG=C, to get predictable output. 
    37 # 
    38 # Revision 1.7  2004/12/10 10:47:47  jimmyo 
    39 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    40 # 
    41 # Revision 1.6  2004/12/09 22:12:55  jimmyo 
    42 # Added "graph_period" option, to make "graph_sums" usable. 
    43 # 
    44 # Revision 1.5  2004/11/16 20:18:09  jimmyo 
    45 # License cleanups. 
    46 # 
    47 # Revision 1.4  2004/09/26 22:03:52  jimmyo 
    48 # Changd COUNTER -> DERIVE for some plugins. Set min/max values. 
    49 # 
    50 # Revision 1.3  2004/05/20 13:57:12  jimmyo 
    51 # Set categories to some of the plugins. 
    52 # 
    53 # Revision 1.2  2004/03/14 11:33:13  auduny 
    54 # Added squidpatch from Jacques Caruso 
    55 # 
    56 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    57 # Renamed occurrances of lrrd -> munin 
    58 # 
    59 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    60 # Import of LRRD CVS tree after renaming to Munin 
    61 # 
    62 # Revision 1.7  2003/12/18 17:26:26  jimmyo 
    63 # Remove use of "use" 
    64 # 
    65 # Revision 1.6  2003/11/15 11:10:28  jimmyo 
    66 # Various fixes 
    67 # 
    68 # Revision 1.5  2003/11/10 18:41:33  jimmyo 
    69 # Removed Data::Dumper dependency. 
    70 # 
    71 # Revision 1.4  2003/11/07 17:43:16  jimmyo 
    72 # Cleanups and log entries 
    73 # 
    74 # 
    7533# 
    7634#%# family=auto 
     
    186144    print "errors.max 500000\n"; 
    187145    print "requests.label misses\n"; 
     146    print "requests.cdef requests,hits,-,errors,-\n"; 
    188147    print "requests.type DERIVE\n"; 
    189148    print "requests.draw STACK\n"; 
  • people/ilmari/modularisation-branch/node/node.d/squid_traffic.in

    r864 r1012  
    3131#       config    (required) 
    3232#       autoconf  (optional - only used by munin-config) 
    33 # 
    34 # $Log$ 
    35 # Revision 1.8  2004/12/10 18:51:43  jimmyo 
    36 # linux/apt* has been forced to LANG=C, to get predictable output. 
    37 # 
    38 # Revision 1.7  2004/12/10 10:47:47  jimmyo 
    39 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    40 # 
    41 # Revision 1.6  2004/12/09 22:12:55  jimmyo 
    42 # Added "graph_period" option, to make "graph_sums" usable. 
    43 # 
    44 # Revision 1.5  2004/11/16 20:18:09  jimmyo 
    45 # License cleanups. 
    46 # 
    47 # Revision 1.4  2004/09/26 22:03:52  jimmyo 
    48 # Changd COUNTER -> DERIVE for some plugins. Set min/max values. 
    49 # 
    50 # Revision 1.3  2004/05/20 13:57:12  jimmyo 
    51 # Set categories to some of the plugins. 
    52 # 
    53 # Revision 1.2  2004/03/14 11:33:13  auduny 
    54 # Added squidpatch from Jacques Caruso 
    55 # 
    56 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    57 # Renamed occurrances of lrrd -> munin 
    58 # 
    59 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    60 # Import of LRRD CVS tree after renaming to Munin 
    61 # 
    62 # Revision 1.7  2003/12/18 17:26:26  jimmyo 
    63 # Remove use of "use" 
    64 # 
    65 # Revision 1.6  2003/11/10 18:41:33  jimmyo 
    66 # Removed Data::Dumper dependency. 
    67 # 
    68 # Revision 1.5  2003/11/07 21:36:25  jimmyo 
    69 # Fixed typos and mental typos 
    70 # 
    71 # Revision 1.4  2003/11/07 17:43:16  jimmyo 
    72 # Cleanups and log entries 
    73 # 
    74 # 
    7533# 
    7634#%# family=auto 
  • people/ilmari/modularisation-branch/node/node.d/surfboard.in

    r864 r1012  
    1010# see how good my cable connection. good if you have choices in your area  
    1111# requires lwp::perl package. 
    12 # 
    13 # $Log$ 
    14 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    15 # Renamed occurrances of lrrd -> munin 
    16 # 
    17 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    18 # Import of LRRD CVS tree after renaming to Munin 
    19 # 
    20 # Revision 1.1  2003/11/17 09:29:34  jimmyo 
    21 # New plugin surfboard contributed by Andrew Ryder 
    22 # 
    2312# 
    2413#%# family=contrib 
  • people/ilmari/modularisation-branch/node/node.d/sybase_space.in

    r864 r1012  
    3333#       SYBASE_HOST  - Host 
    3434#        
    35 #        $Log$ 
    36 #        Revision 1.4  2004/12/09 18:39:01  jimmyo 
    37 #        Added more sensible autoconf to generic/munin_graph,munin_update,sybase_space. 
    38 # 
    39 #        Revision 1.3  2004/11/16 20:10:53  jimmyo 
    40 #        License cleanups. 
    41 #        
    42 #        Revision 1.2  2004/05/20 19:02:36  jimmyo 
    43 #        Set categories on a bunch of plugins 
    44 #        
    45 #        Revision 1.1  2004/01/02 18:50:00  jimmyo 
    46 #        Renamed occurrances of lrrd -> munin 
    47 #        
    48 #        Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    49 #        Import of LRRD CVS tree after renaming to Munin 
    50 #        
    51 #        Revision 1.3  2003/11/10 18:41:33  jimmyo 
    52 #        Removed Data::Dumper dependency. 
    53 #        
    54 #        Revision 1.2  2003/11/07 17:43:16  jimmyo 
    55 #        Cleanups and log entries 
    56 #        
    57 # 
    58 # 
    5935#%# family=manual 
    6036#%# capabilities= 
     
    9167my $databases = &list_dbs ($dbh); 
    9268 
    93 if (exists $ARGV[0] and $ARGV[0] =~ /^config$/) 
     69if (defined $ARGV[0] and $ARGV[0] =~ /^config$/) 
    9470{ 
    9571        print "host_name sybase-i.fileflow.com\n"; 
  • people/ilmari/modularisation-branch/node/node.d/vmstat.in

    r864 r1012  
    88#       config   (required) 
    99#       autoconf (optional - used by munin-config) 
    10 # 
    11 # $Log$ 
    12 # Revision 1.4  2004/05/20 13:57:12  jimmyo 
    13 # Set categories to some of the plugins. 
    14 # 
    15 # Revision 1.3  2004/01/30 14:40:08  jimmyo 
    16 # Added max value to generic/vmstat plugin (Deb#225489). 
    17 # 
    18 # Revision 1.2  2004/01/29 19:00:42  jimmyo 
    19 # Make vmstat plugin more portable (SF#882352). 
    20 # 
    21 # Revision 1.1  2004/01/02 18:50:00  jimmyo 
    22 # Renamed occurrances of lrrd -> munin 
    23 # 
    24 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    25 # Import of LRRD CVS tree after renaming to Munin 
    26 # 
    27 # Revision 1.3  2003/12/06 16:32:29  jimmyo 
    28 # Better names. Idea from Mike Fedyk. 
    29 # 
    30 # Revision 1.2  2003/11/07 17:43:16  jimmyo 
    31 # Cleanups and log entries 
    32 # 
    33 # 
    3410# 
    3511# Magick markers (optional): 
  • people/ilmari/modularisation-branch/node/plugins.history.in

    r864 r1012  
    116116[1.1.8] 
    117117[1.1.9] 
    118 [1.3.1
     118[1.3.0
    119119generic/hddtemp_smartctl 
    120120[1.3.1] 
     121[1.3.2] 
  • people/ilmari/modularisation-branch/server/Munin.pm.in

    r864 r1012  
    2121# 
    2222# $Id$ 
    23 # 
    24 # $Log$ 
    25 # Revision 1.49  2005/03/09 17:57:07  jimmyo 
    26 # Escape regexps more properly (Deb#296575). 
    27 # 
    28 # Revision 1.48  2005/03/06 22:23:10  jimmyo 
    29 # Make sure all rrd-tunes are correct after an upgrade (Deb#296454, Deb#296645). 
    30 # 
    31 # Revision 1.47  2005/03/06 19:33:20  jimmyo 
    32 # Make sure all rrd-tunes are correct after an upgrade (Deb#296454, Deb#296645). 
    33 # 
    34 # Revision 1.46  2005/02/01 21:51:50  jimmyo 
    35 # Added category_order, to complete the *_order options. 
    36 # 
    37 # Revision 1.45  2005/01/10 20:48:58  jimmyo 
    38 # Main/Node: Added support for TLS. 
    39 # 
    40 # Revision 1.44  2005/01/05 18:32:49  jimmyo 
    41 # Main: Tables in service-view now containt the correct "Type" when using data aliases. 
    42 # 
    43 # Revision 1.43  2005/01/05 18:08:01  jimmyo 
    44 # Main: Tables in service-view now sorted according to graph_order. 
    45 # 
    46 # Revision 1.42  2005/01/05 17:43:34  jimmyo 
    47 # Main: Bugfix with graphs using both "graph_sums" and data aliases. 
    48 # 
    49 # Revision 1.41  2004/12/25 18:56:59  jimmyo 
    50 # Allow dots in PNG paths (patch by Jacques Caruso). 
    51 # 
    52 # Revision 1.40  2004/12/22 21:08:30  jimmyo 
    53 # Bugfix when using long labels and CGI graphing. 
    54 # 
    55 # Revision 1.39  2004/12/22 20:13:30  jimmyo 
    56 # Added option cgiurl_graph. 
    57 # 
    58 # Revision 1.38  2004/12/22 20:01:14  jimmyo 
    59 # Optimised munin-cgi-graph a bit. 
    60 # 
    61 # Revision 1.37  2004/12/09 22:12:56  jimmyo 
    62 # Added "graph_period" option, to make "graph_sums" usable. 
    63 # 
    64 # Revision 1.36  2004/12/08 08:47:44  jimmyo 
    65 # Fix bug where munin-limits didn't warn properly in all situations. 
    66 # 
    67 # Revision 1.35  2004/11/26 13:06:00  jimmyo 
    68 # Bugfix in munin-html, when using groups/host names with more than one dot. 
    69 # 
    70 # Revision 1.34  2004/11/21 14:39:23  jimmyo 
    71 # Renamed function munin_get_val to munin_get. 
    72 # 
    73 # Revision 1.33  2004/11/21 14:30:55  jimmyo 
    74 # Added new field option "line", which draws HRULEs. 
    75 # 
    76 # Revision 1.32  2004/11/19 23:01:41  jimmyo 
    77 # Fixed irqstats plugin so it doesn't use numbers as field names. Also expanded the label if possible, since munin-graph now handles long labels. 
    78 # 
    79 # Revision 1.31  2004/11/19 22:09:48  jimmyo 
    80 # Write out contact info to datafile correctly. 
    81 # 
    82 # Revision 1.30  2004/11/19 21:32:38  jimmyo 
    83 # Added a --force option to munin-limits, to force sending absolutely all messages. 
    84 # 
    85 # Revision 1.29  2004/11/19 20:51:24  jimmyo 
    86 # New notification system finished (I think). 
    87 # 
    88 # Revision 1.28  2004/11/18 00:22:01  jimmyo 
    89 # Midway implementation of new notification scheme. 
    90 # 
    91 # Revision 1.27  2004/11/16 20:00:43  jimmyo 
    92 # License cleanups. 
    93 # 
    94 # Revision 1.26  2004/11/14 20:10:38  jimmyo 
    95 # Made sure the latest feature additions also work with the CGI option. 
    96 # 
    97 # Revision 1.25  2004/11/12 23:18:52  jimmyo 
    98 # Added new options notify_enable and notify_text, to allow more finely tuned notifications (both what to notify and what text to send.) 
    99 # 
    100 # Revision 1.24  2004/09/23 19:46:01  jimmyo 
    101 # Added option "compare". 
    102 # 
    103 # Revision 1.23  2004/09/23 16:52:55  jimmyo 
    104 # Don't show warnings/criticals in the HTML interface if the field/graph isn't plotted. 
    105 # 
    106 # Revision 1.22  2004/09/23 16:43:39  jimmyo 
    107 # Don't show warnings/criticals in the HTML interface if the field/graph isn't plotted. 
    108 # 
    109 # Revision 1.21  2004/09/13 21:00:38  jimmyo 
    110 # Added new config option "local_address", to specify which local address outgoing connections (from munin-update) should be used. 
    111 # 
    112 # Revision 1.20  2004/09/10 19:24:18  jimmyo 
    113 # Added new option "graph_sums" which creates summarised graphs. 
    114 # 
    115 # Revision 1.19  2004/09/07 21:45:37  jimmyo 
    116 # Changes of min and max values now causes corresponding changes in the RRD files. 
    117 # 
    118 # Revision 1.18  2004/09/04 21:33:13  jimmyo 
    119 # Handle strange characters better. 
    120 # 
    121 # Revision 1.17  2004/09/01 19:00:22  jimmyo 
    122 # Moved function get_picture_filename from munin-graph to Munin.pm. 
    123 # 
    124 # Revision 1.16  2004/09/01 18:30:21  jimmyo 
    125 # Added new options "graph_height" and "graph_width", to beter control size. 
    126 # 
    127 # Revision 1.15  2004/08/23 10:01:07  jimmyo 
    128 # Better error handling when fetching data from RRD files. 
    129 # 
    130 # Revision 1.14  2004/08/23 09:23:46  jimmyo 
    131 # Better error handling when fetching data from rrd files. 
    132 # 
    133 # Revision 1.13  2004/07/02 14:19:06  jimmyo 
    134 #   * Munin-graph: Added 'graph_sources' option. This is (in effect) the same as 
    135 #     graph_order, but with a default of 'graph no'. 
    136 # 
    137 # Revision 1.12  2004/06/24 14:32:17  jimmyo 
    138 # More work on output_graphs (renamed to graph_strategy, amongst others). 
    139 # 
    140 # Revision 1.11  2004/06/23 17:38:39  jimmyo 
    141 # * Created munin-cgi-graph, which creates dynamic graphs. 
    142 # * Added munin.conf option "output_graphs (cgi|cron)" which 
    143 #   defaults to cron. 
    144 # 
    145 # Revision 1.10  2004/06/08 15:30:31  jimmyo 
    146 # The server programs now open the log file at an earlier point. 
    147 # 
    148 # Revision 1.9  2004/06/08 15:18:21  jimmyo 
    149 # The server programs now open the log file at an earlier point. 
    150 # 
    151 # Revision 1.8  2004/05/20 22:30:08  jimmyo 
    152 # * Munin-limits added to distro. 
    153 # * Breached limis now show up in overview and node view. 
    154 # 
    155 # Revision 1.7  2004/05/20 20:47:19  jimmyo 
    156 # The server programs now open the log file at an earlier point. 
    157 # 
    158 # Revision 1.6  2004/05/20 12:20:24  jimmyo 
    159 # Added "graph_category" option, to categorise plugins. 
    160 # 
    161 # Revision 1.5  2004/05/16 11:27:39  jimmyo 
    162 # Added warning and critical statuses to the info table in the service view. 
    163 # 
    164 # Revision 1.4  2004/05/16 00:33:07  jimmyo 
    165 # Added a descriptionary table at the bottom of the service view page. Also added "graph_info" and "<field>.info" which can be used by plugins to supply supplementary information for it. 
    166 # 
    167 # Revision 1.3  2004/01/29 18:19:58  jimmyo 
    168 # Made Munin compatible with perl 5.005_03 (patch by Lupe Christoph) (SF#884622) 
    169 # 
    170 # Revision 1.2  2004/01/15 15:20:01  jimmyo 
    171 # Making things workable after name change. Upping for test verwion. 
    172 # 
    173 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    174 # Renamed occurrances of lrrd -> munin 
    175 # 
    176 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    177 # Import of LRRD CVS tree after renaming to Munin 
    178 # 
    179 # Revision 1.29  2003/12/12 18:59:30  jimmyo 
    180 # Change \1 to  to make lrrd-update shut up. 
    181 # 
    182 # Revision 1.28  2003/12/10 11:59:39  jimmyo 
    183 # Enable/disable notifications at any level 
    184 # 
    185 # Revision 1.27  2003/12/06 20:19:55  jimmyo 
    186 # Typo fix 
    187 # 
    188 # Revision 1.26  2003/12/06 19:12:57  jimmyo 
    189 # Added max_processes config variable. Also, removed zombie-generation code. :-P 
    190 # 
    191 # Revision 1.25  2003/12/06 17:13:56  jimmyo 
    192 # Can now escape #. Can now use \ to join lines. 
    193 # 
    194 # Revision 1.24  2003/12/02 11:48:56  jimmyo 
    195 # Forgot small change 
    196 # 
    197 # Revision 1.23  2003/12/02 10:14:43  jimmyo 
    198 # Moved some functions to LRRD.pm, since other programs use them as well. 
    199 # 
    200 # Revision 1.22  2003/11/24 16:25:51  jimmyo 
    201 # Make sure LRRD doesn't write any illegal lines to the datafile 
    202 # 
    203 # Revision 1.21  2003/11/24 14:22:10  jimmyo 
    204 # 0.9.9 release 2. Fixes a couple of stupid (minor) bugs 
    205 # 
    206 # Revision 1.20  2003/11/24 12:58:01  jimmyo 
    207 # minor bugfix - no noise about "extinfo" 
    208 # 
    209 # Revision 1.19  2003/11/16 11:33:16  jimmyo 
    210 # Minor bugfixes 
    211 # 
    212 # Revision 1.18  2003/11/15 13:26:01  jimmyo 
    213 # Added warn to legal options 
    214 # 
    215 # Revision 1.17  2003/11/15 11:10:29  jimmyo 
    216 # Various fixes 
    217 # 
    218 # Revision 1.16  2003/11/10 16:09:00  jimmyo 
    219 # Be nice to Nagios - don't DOS it. 
    220 # 
    221 # Revision 1.15  2003/11/07 23:57:05  jimmyo 
    222 # Remove trailing whitespace from config file 
    223 # 
    224 # Revision 1.14  2003/11/07 22:58:09  jimmyo 
    225 # Documentation of new features/changes 
    226 # 
    227 # Revision 1.13  2003/11/07 20:46:12  jimmyo 
    228 # Only require Config::General if using old config format. 
    229 # 
    230 # Revision 1.12  2003/11/07 20:12:02  jimmyo 
    231 # datafile now saved in new config format 
    232 # 
    233 # Revision 1.11  2003/11/07 17:43:16  jimmyo 
    234 # Cleanups and log entries 
    235 # 
    23623# 
    23724 
     
    29683        "always_send", "notify_alias", "line", "state", "graph_period", 
    29784        "cgiurl_graph", "cgiurl", "tls", "service_order", "category_order", 
    298         "version" 
     85        "version", "tls_certificate", "tls_private_key", "tls_pem",  
     86        "tls_verify_certificate", "tls_verify_depth", "graph_data_size" 
    29987    ); 
    30088 
  • people/ilmari/modularisation-branch/server/definitions.html

    • Property svn:mime-type set to text/html
    • Property svn:eol-style deleted
    • Property svn:keywords deleted
  • people/ilmari/modularisation-branch/server/logo.png

    • Property svn:mime-type changed from application/octet-stream to image/png
  • people/ilmari/modularisation-branch/server/munin-cgi-graph.in

    r864 r1012  
    2020# 
    2121# $Id$ 
    22 # 
    23 # $Log$ 
    24 # Revision 1.7  2005/03/09 20:12:21  jimmyo 
    25 # Correct expires-headers in CGI output (SF#1159742). 
    26 # 
    27 # Revision 1.6  2005/01/29 18:21:41  jimmyo 
    28 # Bugfix in munin-cgi-graph with hostnames including - (SF#1111510). 
    29 # 
    30 # Revision 1.5  2004/12/22 20:01:15  jimmyo 
    31 # Optimised munin-cgi-graph a bit. 
    32 # 
    33 # Revision 1.4  2004/11/16 20:00:44  jimmyo 
    34 # License cleanups. 
    35 # 
    3622 
    3723use RRDs; 
  • people/ilmari/modularisation-branch/server/munin-comparison-day.tmpl.in

    r864 r1012  
    66  <link rel="stylesheet" href="../style.css" type="text/css" />  
    77  <meta http-equiv="refresh" content="300" /> 
    8   <title>Munin :: <TMPL_VAR ESCAPE="HTML" NAME="DOMAIN"> :: <TMPL_VAR ESCAPE="HTML" NAME="NODE"></title> 
     8  <title>Munin :: <TMPL_VAR ESCAPE="HTML" NAME="DOMAIN"> :: day</title> 
    99  <meta http-equiv="content-type" content="application/xhtml+xml; charset=iso-8859-1" /> 
    1010  <meta name="author" content="Auto-generated by Munin" /> 
     
    4343                        <table class="invisiblebox"> 
    4444                          <tr><td colspan="2"></td></tr> 
    45                           <tr><td colspan="2"><div class="lighttext"><TMPL_VAR ESCAPE="HTML" NAME="NODE"> :: <TMPL_IF NAME="URL"><a <TMPL_IF NAME="STATE_WARNING">class="warn"</TMPL_IF> <TMPL_IF NAME="STATE_CRITICAL">class="crit"</TMPL_IF> href="<TMPL_VAR NAME="URL">"></TMPL_IF><TMPL_VAR ESCAPE="HTML" NAME="LABEL"><TMPL_IF NAME="URL"></a></TMPL_IF></div></td></tr> 
     45                          <tr><td colspan="2"><div class="lighttext"><a href="<TMPL_VAR ESCAPE="URL" NAME="NODE">.html"><TMPL_VAR ESCAPE="HTML" NAME="NODE"></a> :: <TMPL_IF NAME="URL"><a <TMPL_IF NAME="STATE_WARNING">class="warn"</TMPL_IF><TMPL_IF NAME="STATE_CRITICAL">class="crit"</TMPL_IF> href="<TMPL_VAR NAME="URL">"></TMPL_IF><TMPL_VAR ESCAPE="HTML" NAME="LABEL"><TMPL_IF NAME="URL"></a></TMPL_IF></div></td></tr> 
    4646                          <tr><td> 
    4747                        <a title="<TMPL_VAR ESCAPE="HTML" NAME="LABEL">"/><TMPL_IF NAME="IMGDAY"><a href="<TMPL_VAR NAME="URL">"><img src="<TMPL_VAR NAME="IMGDAY">" alt="<TMPL_VAR ESCAPE="HTML" NAME="LABEL">" <TMPL_IF NAME="IMGDAYWIDTH">width="<TMPL_VAR NAME="IMGDAYWIDTH">" </TMPL_IF> <TMPL_IF NAME="IMGDAYHEIGHT">height="<TMPL_VAR NAME="IMGDAYHEIGHT">"</TMPL_IF>/></a></TMPL_IF> 
  • people/ilmari/modularisation-branch/server/munin-comparison-month.tmpl.in

    r864 r1012  
    66  <link rel="stylesheet" href="../style.css" type="text/css" />  
    77  <meta http-equiv="refresh" content="300" /> 
    8   <title>Munin :: <TMPL_VAR ESCAPE="HTML" NAME="DOMAIN"> :: <TMPL_VAR ESCAPE="HTML" NAME="NODE"></title> 
     8  <title>Munin :: <TMPL_VAR ESCAPE="HTML" NAME="DOMAIN"> :: month</title> 
    99  <meta http-equiv="content-type" content="application/xhtml+xml; charset=iso-8859-1" /> 
    1010  <meta name="author" content="Auto-generated by Munin" /> 
     
    4343                        <table class="invisiblebox"> 
    4444                          <tr><td colspan="2"></td></tr> 
    45                           <tr><td colspan="2"><div class="lighttext"><TMPL_VAR ESCAPE="HTML" NAME="NODE"> :: <TMPL_IF NAME="URL"><a <TMPL_IF NAME="STATE_WARNING">class="warn"</TMPL_IF> <TMPL_IF NAME="STATE_CRITICAL">class="crit"</TMPL_IF> href="<TMPL_VAR NAME="URL">"></TMPL_IF><TMPL_VAR ESCAPE="HTML" NAME="LABEL"><TMPL_IF NAME="URL"></a></TMPL_IF></div></td></tr> 
     45                          <tr><td colspan="2"><div class="lighttext"><a href="<TMPL_VAR ESCAPE="URL" NAME="NODE">.html"><TMPL_VAR ESCAPE="HTML" NAME="NODE"></a> :: <TMPL_IF NAME="URL"><a <TMPL_IF NAME="STATE_WARNING">class="warn"</TMPL_IF> <TMPL_IF NAME="STATE_CRITICAL">class="crit"</TMPL_IF> href="<TMPL_VAR NAME="URL">"></TMPL_IF><TMPL_VAR ESCAPE="HTML" NAME="LABEL"><TMPL_IF NAME="URL"></a></TMPL_IF></div></td></tr> 
    4646                          <tr><td> 
    4747                        <a title="<TMPL_VAR ESCAPE="HTML" NAME="LABEL">"/><TMPL_IF NAME="IMGMONTH"><a href="<TMPL_VAR NAME="URL">"><img src="<TMPL_VAR NAME="IMGMONTH">" alt="<TMPL_VAR ESCAPE="HTML" NAME="LABEL">" <TMPL_IF NAME="IMGMONTHWIDTH">width="<TMPL_VAR NAME="IMGMONTHWIDTH">" </TMPL_IF> <TMPL_IF NAME="IMGMONTHHEIGHT">height="<TMPL_VAR NAME="IMGMONTHHEIGHT">"</TMPL_IF>/></a></TMPL_IF> 
  • people/ilmari/modularisation-branch/server/munin-comparison-week.tmpl.in

    r864 r1012  
    66  <link rel="stylesheet" href="../style.css" type="text/css" />  
    77  <meta http-equiv="refresh" content="300" /> 
    8   <title>Munin :: <TMPL_VAR ESCAPE="HTML" NAME="DOMAIN"> :: <TMPL_VAR ESCAPE="HTML" NAME="NODE"></title> 
     8  <title>Munin :: <TMPL_VAR ESCAPE="HTML" NAME="DOMAIN"> :: week</title> 
    99  <meta http-equiv="content-type" content="application/xhtml+xml; charset=iso-8859-1" /> 
    1010  <meta name="author" content="Auto-generated by Munin" /> 
     
    4343                        <table class="invisiblebox"> 
    4444                          <tr><td colspan="2"></td></tr> 
    45                           <tr><td colspan="2"><div class="lighttext"><TMPL_VAR ESCAPE="HTML" NAME="NODE"> :: <TMPL_IF NAME="URL"><a <TMPL_IF NAME="STATE_WARNING">class="warn"</TMPL_IF> <TMPL_IF NAME="STATE_CRITICAL">class="crit"</TMPL_IF> href="<TMPL_VAR NAME="URL">"></TMPL_IF><TMPL_VAR ESCAPE="HTML" NAME="LABEL"><TMPL_IF NAME="URL"></a></TMPL_IF></div></td></tr> 
     45                          <tr><td colspan="2"><div class="lighttext"><a href="<TMPL_VAR ESCAPE="URL" NAME="NODE">.html"><TMPL_VAR ESCAPE="HTML" NAME="NODE"></a> :: <TMPL_IF NAME="URL"><a <TMPL_IF NAME="STATE_WARNING">class="warn"</TMPL_IF> <TMPL_IF NAME="STATE_CRITICAL">class="crit"</TMPL_IF> href="<TMPL_VAR NAME="URL">"></TMPL_IF><TMPL_VAR ESCAPE="HTML" NAME="LABEL"><TMPL_IF NAME="URL"></a></TMPL_IF></div></td></tr> 
    4646                          <tr><td> 
    4747                        <a title="<TMPL_VAR ESCAPE="HTML" NAME="LABEL">"/><TMPL_IF NAME="IMGWEEK"><a href="<TMPL_VAR NAME="URL">"><img src="<TMPL_VAR NAME="IMGWEEK">" alt="<TMPL_VAR ESCAPE="HTML" NAME="LABEL">" <TMPL_IF NAME="IMGWEEKWIDTH">width="<TMPL_VAR NAME="IMGWEEKWIDTH">" </TMPL_IF> <TMPL_IF NAME="IMGWEEKHEIGHT">height="<TMPL_VAR NAME="IMGWEEKHEIGHT">"</TMPL_IF>/></a></TMPL_IF> 
  • people/ilmari/modularisation-branch/server/munin-comparison-year.tmpl.in

    r864 r1012  
    66  <link rel="stylesheet" href="../style.css" type="text/css" />  
    77  <meta http-equiv="refresh" content="300" /> 
    8   <title>Munin :: <TMPL_VAR ESCAPE="HTML" NAME="DOMAIN"> :: <TMPL_VAR ESCAPE="HTML" NAME="NODE"></title> 
     8  <title>Munin :: <TMPL_VAR ESCAPE="HTML" NAME="DOMAIN"> :: year</title> 
    99  <meta http-equiv="content-type" content="application/xhtml+xml; charset=iso-8859-1" /> 
    1010  <meta name="author" content="Auto-generated by Munin" /> 
     
    4343                        <table class="invisiblebox"> 
    4444                          <tr><td colspan="2"></td></tr> 
    45                           <tr><td colspan="2"><div class="lighttext"><TMPL_VAR ESCAPE="HTML" NAME="NODE"> :: <TMPL_IF NAME="URL"><a <TMPL_IF NAME="STATE_WARNING">class="warn"</TMPL_IF> <TMPL_IF NAME="STATE_CRITICAL">class="crit"</TMPL_IF> href="<TMPL_VAR NAME="URL">"></TMPL_IF><TMPL_VAR ESCAPE="HTML" NAME="LABEL"><TMPL_IF NAME="URL"></a></TMPL_IF></div></td></tr> 
     45                          <tr><td colspan="2"><div class="lighttext"><a href="<TMPL_VAR ESCAPE="URL" NAME="NODE">.html"><TMPL_VAR ESCAPE="HTML" NAME="NODE"></a> :: <TMPL_IF NAME="URL"><a <TMPL_IF NAME="STATE_WARNING">class="warn"</TMPL_IF> <TMPL_IF NAME="STATE_CRITICAL">class="crit"</TMPL_IF> href="<TMPL_VAR NAME="URL">"></TMPL_IF><TMPL_VAR ESCAPE="HTML" NAME="LABEL"><TMPL_IF NAME="URL"></a></TMPL_IF></div></td></tr> 
    4646                          <tr><td> 
    4747                        <a title="<TMPL_VAR ESCAPE="HTML" NAME="LABEL">"/><TMPL_IF NAME="IMGYEAR"><a href="<TMPL_VAR NAME="URL">"><img src="<TMPL_VAR NAME="IMGYEAR">" alt="<TMPL_VAR ESCAPE="HTML" NAME="LABEL">" <TMPL_IF NAME="IMGYEARWIDTH">width="<TMPL_VAR NAME="IMGYEARWIDTH">" </TMPL_IF> <TMPL_IF NAME="IMGYEARHEIGHT">height="<TMPL_VAR NAME="IMGYEARHEIGHT">"</TMPL_IF>/></a></TMPL_IF> 
  • people/ilmari/modularisation-branch/server/munin-cron.in

    r864 r1012  
    22[ -x @@LIBDIR@@/munin-update ] && @@LIBDIR@@/munin-update $@; 
    33[ -x @@LIBDIR@@/munin-limits ] && @@LIBDIR@@/munin-limits $@; 
    4 [ -x @@LIBDIR@@/munin-graph  ] && nice @@LIBDIR@@/munin-graph --cron $@
     4[ -x @@LIBDIR@@/munin-graph  ] && nice @@LIBDIR@@/munin-graph --cron $@ 2>&1 | while read line; do [ x"$line" = x"*** attempt to put segment in horiz list twice" ] && continue; echo $line; done
    55[ -x @@LIBDIR@@/munin-html   ] && nice @@LIBDIR@@/munin-html $@; 
    66 
  • people/ilmari/modularisation-branch/server/munin-graph.in

    r864 r1012  
    2020# $Id$ 
    2121# 
    22 # $Log$ 
    23 # Revision 1.52  2005/01/08 22:34:38  jimmyo 
    24 # Main: Fix bug with calculation of "Avg:" field when using graph_sums. 
    25 # 
    26 # Revision 1.51  2005/01/05 18:32:49  jimmyo 
    27 # Main: Tables in service-view now containt the correct "Type" when using data aliases. 
    28 # 
    29 # Revision 1.50  2005/01/05 18:08:01  jimmyo 
    30 # Main: Tables in service-view now sorted according to graph_order. 
    31 # 
    32 # Revision 1.49  2005/01/05 17:43:34  jimmyo 
    33 # Main: Bugfix with graphs using both "graph_sums" and data aliases. 
    34 # 
    35 # Revision 1.48  2005/01/04 08:38:51  jimmyo 
    36 # Fix bug which lead to some graphs failing with STACK error. 
    37 # 
    38 # Revision 1.47  2005/01/04 08:10:51  jimmyo 
    39 # Fix help text (it was modified by accident). 
    40 # 
    41 # Revision 1.46  2004/12/22 20:01:16  jimmyo 
    42 # Optimised munin-cgi-graph a bit. 
    43 # 
    44 # Revision 1.45  2004/12/10 10:47:50  jimmyo 
    45 # Change name from ${scale} to ${graph_period}, to be more consistent. 
    46 # 
    47 # Revision 1.44  2004/12/09 22:30:36  jimmyo 
    48 # Make sure graph_sums arent applied to GAUGE graphs. 
    49 # 
    50 # Revision 1.43  2004/12/09 22:12:57  jimmyo 
    51 # Added "graph_period" option, to make "graph_sums" usable. 
    52 # 
    53 # Revision 1.42  2004/12/09 16:06:40  jimmyo 
    54 # munin-graph now logs an illegal STACK in the first field better (SF#1081903). 
    55 # 
    56 # Revision 1.41  2004/12/09 12:40:08  jimmyo 
    57 # mumin-graph now treats CDEFs in fields with long names properly. 
    58 # 
    59 # Revision 1.40  2004/11/26 13:24:16  jimmyo 
    60 # Added --stdout-option to all programs. 
    61 # 
    62 # Revision 1.39  2004/11/21 15:43:08  jimmyo 
    63 # Copy info fields when using aliases. 
    64 # 
    65 # Revision 1.38  2004/11/21 14:39:23  jimmyo 
    66 # Renamed function munin_get_val to munin_get. 
    67 # 
    68 # Revision 1.37  2004/11/21 14:30:55  jimmyo 
    69 # Added new field option "line", which draws HRULEs. 
    70 # 
    71 # Revision 1.36  2004/11/19 23:01:46  jimmyo 
    72 # Fixed irqstats plugin so it doesn't use numbers as field names. Also expanded the label if possible, since munin-graph now handles long labels. 
    73 # 
    74 # Revision 1.35  2004/11/19 22:26:57  jimmyo 
    75 # Use column headers for min/max/cur/avg if label is too long. 
    76 # 
    77 # Revision 1.34  2004/11/16 20:00:44  jimmyo 
    78 # License cleanups. 
    79 # 
    80 # Revision 1.33  2004/11/13 22:50:49  jimmyo 
    81 # Draw min/max ranges in all graphs with only one visible field. 
    82 # 
    83 # Revision 1.32  2004/09/10 20:47:20  jimmyo 
    84 # Changed the calculation of daily sums on the summed year graph. 
    85 # 
    86 # Revision 1.31  2004/09/10 19:24:18  jimmyo 
    87 # Added new option "graph_sums" which creates summarised graphs. 
    88 # 
    89 # Revision 1.30  2004/09/08 15:25:33  ilmari 
    90 # Use @@PERL@@ in all perl shebang lines. 
    91 # 
    92 # Revision 1.29  2004/09/07 21:45:38  jimmyo 
    93 # Changes of min and max values now causes corresponding changes in the RRD files. 
    94 # 
    95 # Revision 1.28  2004/09/04 21:33:13  jimmyo 
    96 # Handle strange characters better. 
    97 # 
    98 # Revision 1.27  2004/09/01 19:00:22  jimmyo 
    99 # Moved function get_picture_filename from munin-graph to Munin.pm. 
    100 # 
    101 # Revision 1.26  2004/09/01 18:30:21  jimmyo 
    102 # Added new options "graph_height" and "graph_width", to beter control size. 
    103 # 
    104 # Revision 1.25  2004/08/23 10:37:31  jimmyo 
    105 # Fixed bug in munin-graph when choosing colours (Deb#267185). 
    106 # 
    107 # Revision 1.24  2004/08/18 15:32:20  jimmyo 
    108 # Applied patch from Matthieu Lochegnies to munin-graph, and fixed the same problem elsewhere in the code (Deb#250982, SF#924561). 
    109 # 
    110 # Revision 1.23  2004/07/02 14:19:06  jimmyo 
    111 #   * Munin-graph: Added 'graph_sources' option. This is (in effect) the same as 
    112 #     graph_order, but with a default of 'graph no'. 
    113 # 
    114 # Revision 1.22  2004/06/28 12:07:00  jimmyo 
    115 #   * Munin-graph: fixed bug when combining graph_order aliases with 
    116 #    "normal" fields, as reported by Jacques Caruso. 
    117 # 
    118 # Revision 1.21  2004/06/24 14:32:17  jimmyo 
    119 # More work on output_graphs (renamed to graph_strategy, amongst others). 
    120 # 
    121 # Revision 1.20  2004/06/23 17:48:06  jimmyo 
    122 # Bugfix in cdef calculations. 
    123 # 
    124 # Revision 1.19  2004/06/22 22:04:45  jimmyo 
    125 # Added --cron option to munin-graph. 
    126 # 
    127 # Revision 1.18  2004/06/19 21:29:35  jimmyo 
    128 # Added option to munin-graph to skip stats generation. 
    129 # 
    130 # Revision 1.17  2004/06/19 21:21:44  jimmyo 
    131 # Added option to munin-graph to skip locking. 
    132 # 
    133 # Revision 1.16  2004/06/19 21:19:28  jimmyo 
    134 # Log to correct log 
    135 # 
    136 # Revision 1.15  2004/06/16 21:08:33  jimmyo 
    137 # Added automatic "graph no" to negative field when using negatives. 
    138 # 
    139 # Revision 1.14  2004/06/08 15:30:34  jimmyo 
    140 # The server programs now open the log file at an earlier point. 
    141 # 
    142 # Revision 1.13  2004/05/20 20:47:19  jimmyo 
    143 # The server programs now open the log file at an earlier point. 
    144 # 
    145 # Revision 1.12  2004/05/20 11:14:17  jimmyo 
    146 # Tuned cdef-code to make it work properly after clean-up. 
    147 # 
    148 # Revision 1.11  2004/05/16 00:33:07  jimmyo 
    149 # Added a descriptionary table at the bottom of the service view page. Also added "graph_info" and "<field>.info" which can be used by plugins to supply supplementary information for it. 
    150 # 
    151 # Revision 1.10  2004/05/14 20:22:41  jimmyo 
    152 # Code cleanups. 
    153 # 
    154 # Revision 1.9  2004/05/13 21:48:49  jimmyo 
    155 # Code cleanups. 
    156 # 
    157 # Revision 1.8  2004/05/09 21:11:16  jimmyo 
    158 # New plugin (pm3users) and a bunch of patches from Jacques Caruso. 
    159 # 
    160 # Revision 1.7  2004/04/28 21:32:26  jimmyo 
    161 # Make "graph_scale no" affect y-axis as well as numbers below the graph (Deb#236834). 
    162 # 
    163 # Revision 1.6  2004/02/02 17:28:22  jimmyo 
    164 # Munin-graph now escapes ':' in labels properly.; Fixed bug in munin-graph where it caused a flood of cron-mail. 
    165 # 
    166 # Revision 1.5  2004/02/01 18:28:58  jimmyo 
    167 # A perl 5.005_03 compatabilty problem, which slipped through to version pre2. 
    168 # 
    169 # Revision 1.4  2004/01/30 15:04:02  jimmyo 
    170 # Code tidying in munin-graph (SF#884625). 
    171 # 
    172 # Revision 1.3  2004/01/29 17:34:06  jimmyo 
    173 # Updated copyright information 
    174 # 
    175 # Revision 1.2  2004/01/15 15:20:01  jimmyo 
    176 # Making things workable after name change. Upping for test verwion. 
    177 # 
    178 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    179 # Renamed occurrances of lrrd -> munin 
    180 # 
    181 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    182 # Import of LRRD CVS tree after renaming to Munin 
    183 # 
    184 # Revision 1.28  2003/12/22 15:40:08  jimmyo 
    185 # Keep quiet when not able to get lastupdate. 
    186 # 
    187 # Revision 1.27  2003/12/18 15:15:08  jimmyo 
    188 # Only log graphing errors (== less cron-mail). 
    189 # 
    190 # Revision 1.26  2003/12/02 11:52:25  jimmyo 
    191 # Bugfix when aliasing fields. 
    192 # 
    193 # Revision 1.25  2003/12/02 10:14:43  jimmyo 
    194 # Moved some functions to LRRD.pm, since other programs use them as well. 
    195 # 
    196 # Revision 1.24  2003/11/24 14:22:10  jimmyo 
    197 # 0.9.9 release 2. Fixes a couple of stupid (minor) bugs 
    198 # 
    199 # Revision 1.23  2003/11/15 11:10:29  jimmyo 
    200 # Various fixes 
    201 # 
    202 # Revision 1.22  2003/11/07 23:57:18  jimmyo 
    203 # More debug information 
    204 # 
    205 # Revision 1.21  2003/11/07 22:58:09  jimmyo 
    206 # Documentation of new features/changes 
    207 # 
    208 # Revision 1.20  2003/11/07 21:31:03  jimmyo 
    209 # Minor cleanup 
    210 # 
    211 # Revision 1.19  2003/11/07 20:46:12  jimmyo 
    212 # Only require Config::General if using old config format. 
    213 # 
    214 # Revision 1.18  2003/11/07 19:00:15  jimmyo 
    215 # Put lockfiles in the right place 
    216 # 
    217 # Revision 1.17  2003/11/07 17:43:16  jimmyo 
    218 # Cleanups and log entries 
    219 # 
    220 # 
    22122$|=1; 
    22223 
     
    23738my @limit_hosts = (); 
    23839my @limit_services = (); 
     40 
     41# RRDtool 1.2 requires \\: in comments 
     42my $RRDkludge = $RRDs::VERSION < 1.2 ? '' : '\\'; 
    23943 
    24044# Force drawing of "graph no".  
     
    311115if ($do_version) 
    312116{ 
    313     print "munin-graph version $VERSION.\n"; 
    314     print "Written by Audun Ytterdal, Jimmy Olsen, Tore Anderson / Linpro AS\n"; 
    315     print "\n"; 
    316     print "Copyright (C) 2002-2004\n"; 
    317     print "This is free software released under the GNU Public License. There is NO\n"; 
    318     print "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"; 
     117print <<"EOT"; 
     118munin-graph version $VERSION. 
     119Written by Audun Ytterdal, Jimmy Olsen, Tore Anderson / Linpro AS 
     120 
     121Copyright (C) 2002-2005 
     122 
     123This is free software released under the GNU General Public License. There 
     124is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR 
     125PURPOSE. For details, please refer to the file COPYING that is included 
     126with this software or refer to 
     127  http://www.fsf.org/licensing/licenses/gpl.txt 
     128EOT 
    319129    exit 0; 
    320130} 
     
    849659            { 
    850660                push (@rrd, "COMMENT:" . (" " x $max_field_len)); 
    851                 push (@rrd, "COMMENT: Cur:"); 
    852                 push (@rrd, "COMMENT:Min:"); 
    853                 push (@rrd, "COMMENT:Avg:"); 
    854                 push (@rrd, "COMMENT:Max:  \\j"); 
     661                push (@rrd, "COMMENT: Cur$RRDkludge:"); 
     662                push (@rrd, "COMMENT:Min$RRDkludge:"); 
     663                push (@rrd, "COMMENT:Avg$RRDkludge:"); 
     664                push (@rrd, "COMMENT:Max$RRDkludge:  \\j"); 
    855665                $global_headers++; 
    856666            } 
     
    925735            else 
    926736            { 
    927                 push (@rrd, "COMMENT: Cur:") unless $global_headers; 
     737                push (@rrd, "COMMENT: Cur$RRDkludge:") unless $global_headers; 
    928738                push (@rrd, "GPRINT:c$rrdname:LAST:%6.2lf" . (munin_get_bool_val ($node->{client}->{$service}->{graph_scale}, "yes")?"%s":"") . ""); 
    929                 push (@rrd, "COMMENT: Min:") unless $global_headers; 
     739                push (@rrd, "COMMENT: Min$RRDkludge:") unless $global_headers; 
    930740                push (@rrd, "GPRINT:i$rrdname:MIN:%6.2lf" . (munin_get_bool_val ($node->{client}->{$service}->{graph_scale}, 1)?"%s":"") . ""); 
    931                 push (@rrd, "COMMENT: Avg:") unless $global_headers; 
     741                push (@rrd, "COMMENT: Avg$RRDkludge:") unless $global_headers; 
    932742                push (@rrd, "GPRINT:g$rrdname:AVERAGE:%6.2lf" . (munin_get_bool_val ($node->{client}->{$service}->{graph_scale}, 1)?"%s":"") . ""); 
    933                 push (@rrd, "COMMENT: Max:") unless $global_headers; 
     743                push (@rrd, "COMMENT: Max$RRDkludge:") unless $global_headers; 
    934744                push (@rrd, "GPRINT:a$rrdname:MAX:%6.2lf" . (munin_get_bool_val ($node->{client}->{$service}->{graph_scale}, 1)?"%s":"") . "\\j"); 
    935745                push (@{$total_pos{'min'}}, "i$rrdname"); 
     
    992802            push (@rrd, "CDEF:dpostotal=ipostotal,UN,ipostotal,UNKN,IF"); 
    993803            push (@rrd, "LINE1:dpostotal#000000:" . $node->{client}->{$service}->{graph_total} . (" " x ($max_field_len - length ($node->{client}->{$service}->{graph_total}) + 1))); 
    994             push (@rrd, "COMMENT: Cur:") unless $global_headers; 
     804            push (@rrd, "COMMENT: Cur$RRDkludge:") unless $global_headers; 
    995805            push (@rrd, "GPRINT:gpostotal:LAST:%6.2lf" . (munin_get_bool_val ($node->{client}->{$service}->{graph_scale}, 1)?"%s":"") . ""); 
    996             push (@rrd, "COMMENT: Min:") unless $global_headers; 
     806            push (@rrd, "COMMENT: Min$RRDkludge:") unless $global_headers; 
    997807            push (@rrd, "GPRINT:ipostotal:MIN:%6.2lf" . (munin_get_bool_val ($node->{client}->{$service}->{graph_scale}, 1)?"%s":"") . ""); 
    998             push (@rrd, "COMMENT: Avg:") unless $global_headers; 
     808            push (@rrd, "COMMENT: Avg$RRDkludge:") unless $global_headers; 
    999809            push (@rrd, "GPRINT:gpostotal:AVERAGE:%6.2lf" . (munin_get_bool_val ($node->{client}->{$service}->{graph_scale}, 1)?"%s":"") . ""); 
    1000             push (@rrd, "COMMENT: Max:") unless $global_headers; 
     810            push (@rrd, "COMMENT: Max$RRDkludge:") unless $global_headers; 
    1001811            push (@rrd, "GPRINT:apostotal:MAX:%6.2lf" . (munin_get_bool_val ($node->{client}->{$service}->{graph_scale}, 1)?"%s":"") . "\\j"); 
    1002812        } 
     
    1011821            push @complete, @rrd; 
    1012822 
    1013             push (@complete, "COMMENT:Last update: " . localtime($lastupdate) .  "\\r"); 
     823            push (@complete, "COMMENT:Last update$RRDkludge: " . RRDescape(scalar localtime($lastupdate)) .  "\\r"); 
    1014824             
    1015825            if (time - 300 < $lastupdate) 
     
    1041851                } 
    1042852                push @rrd_sum, @rrd; 
    1043                 push (@rrd_sum, "COMMENT:Last update: " . localtime($lastupdate) .  "\\r"); 
     853                push (@rrd_sum, "COMMENT:Last update$RRDkludge: " . RRDescape(scalar localtime($lastupdate)) .  "\\r"); 
    1044854 
    1045855                my $labelled = 0; 
     
    12431053                  { 
    12441054                          print $log "$now - $comment\n"; 
     1055                          $log->flush; 
     1056                          close (STDERR); 
     1057                          open (STDERR, ">&", $log); 
    12451058                  } 
    12461059                  else 
     
    12901103} 
    12911104 
     1105sub RRDescape 
     1106{ 
     1107    my $text = shift; 
     1108    return $RRDs::VERSION < 1.2 ? $text : escape($text); 
     1109} 
     1110 
    129211111; 
    12931112 
  • people/ilmari/modularisation-branch/server/munin-html.in

    r864 r1012  
    2020# $Id$ 
    2121# 
    22 # $Log$ 
    23 # Revision 1.44  2005/03/07 17:43:39  jimmyo 
    24 # Re-enable width/height attributes to img tags. 
    25 # 
    26 # Revision 1.43  2005/02/01 21:51:51  jimmyo 
    27 # Added category_order, to complete the *_order options. 
    28 # 
    29 # Revision 1.42  2005/01/29 18:21:41  jimmyo 
    30 # Bugfix in munin-cgi-graph with hostnames including - (SF#1111510). 
    31 # 
    32 # Revision 1.41  2005/01/05 18:32:49  jimmyo 
    33 # Main: Tables in service-view now containt the correct "Type" when using data aliases. 
    34 # 
    35 # Revision 1.40  2005/01/05 18:08:01  jimmyo 
    36 # Main: Tables in service-view now sorted according to graph_order. 
    37 # 
    38 # Revision 1.39  2004/12/22 20:53:50  jimmyo 
    39 # Correct name of config variable. 
    40 # 
    41 # Revision 1.38  2004/12/22 20:52:29  jimmyo 
    42 # Corrected filename of munin-cgi-graph. 
    43 # 
    44 # Revision 1.37  2004/12/22 20:13:31  jimmyo 
    45 # Added option cgiurl_graph. 
    46 # 
    47 # Revision 1.36  2004/11/26 13:24:20  jimmyo 
    48 # Added --stdout-option to all programs. 
    49 # 
    50 # Revision 1.35  2004/11/21 15:29:19  jimmyo 
    51 # Take line definitions with labels into account. 
    52 # 
    53 # Revision 1.34  2004/11/21 14:39:23  jimmyo 
    54 # Renamed function munin_get_val to munin_get. 
    55 # 
    56 # Revision 1.33  2004/11/16 20:00:44  jimmyo 
    57 # License cleanups. 
    58 # 
    59 # Revision 1.32  2004/11/14 20:10:38  jimmyo 
    60 # Made sure the latest feature additions also work with the CGI option. 
    61 # 
    62 # Revision 1.31  2004/09/23 20:04:59  jimmyo 
    63 # Added option "compare". 
    64 # 
    65 # Revision 1.30  2004/09/23 19:46:01  jimmyo 
    66 # Added option "compare". 
    67 # 
    68 # Revision 1.29  2004/09/23 16:43:39  jimmyo 
    69 # Don't show warnings/criticals in the HTML interface if the field/graph isn't plotted. 
    70 # 
    71 # Revision 1.28  2004/09/23 15:23:33  jimmyo 
    72 # Added "comparison" views, to view a whole hostgroup at once. 
    73 # 
    74 # Revision 1.27  2004/09/14 22:08:58  jimmyo 
    75 # Bugfix with domain_order. 
    76 # 
    77 # Revision 1.26  2004/09/13 21:45:55  jimmyo 
    78 # node- and domain_order settings now does not exclude unmentioned entries. 
    79 # 
    80 # Revision 1.25  2004/09/10 21:06:56  jimmyo 
    81 # Made summarised grahps work with dynamically generated graphs. 
    82 # 
    83 # Revision 1.24  2004/09/10 19:24:18  jimmyo 
    84 # Added new option "graph_sums" which creates summarised graphs. 
    85 # 
    86 # Revision 1.23  2004/09/08 15:25:33  ilmari 
    87 # Use @@PERL@@ in all perl shebang lines. 
    88 # 
    89 # Revision 1.22  2004/09/07 20:38:33  jimmyo 
    90 # Added the internal field name to the HTML output as a tooltip. 
    91 # 
    92 # Revision 1.21  2004/09/07 18:56:03  jimmyo 
    93 # Small interface improvements in the HTML output. 
    94 # 
    95 # Revision 1.20  2004/09/01 19:46:01  jimmyo 
    96 # Removed debug info. 
    97 # 
    98 # Revision 1.19  2004/09/01 19:44:46  jimmyo 
    99 # Munin-html img-tags now sets image size, which helps when rendering pages with lots of graphs. 
    100 # 
    101 # Revision 1.18  2004/06/24 14:32:18  jimmyo 
    102 # More work on output_graphs (renamed to graph_strategy, amongst others). 
    103 # 
    104 # Revision 1.17  2004/06/23 17:38:40  jimmyo 
    105 # * Created munin-cgi-graph, which creates dynamic graphs. 
    106 # * Added munin.conf option "output_graphs (cgi|cron)" which 
    107 #   defaults to cron. 
    108 # 
    109 # Revision 1.16  2004/05/21 06:21:46  jimmyo 
    110 # Removed superfluous debug output. 
    111 # 
    112 # Revision 1.15  2004/05/20 22:30:08  jimmyo 
    113 # * Munin-limits added to distro. 
    114 # * Breached limis now show up in overview and node view. 
    115 # 
    116 # Revision 1.14  2004/05/20 20:47:20  jimmyo 
    117 # The server programs now open the log file at an earlier point. 
    118 # 
    119 # Revision 1.13  2004/05/20 19:05:53  jimmyo 
    120 # Show categories 
    121 # 
    122 # Revision 1.12  2004/05/20 13:57:11  jimmyo 
    123 # Set categories to some of the plugins. 
    124 # 
    125 # Revision 1.11  2004/05/20 12:20:24  jimmyo 
    126 # Added "graph_category" option, to categorise plugins. 
    127 # 
    128 # Revision 1.10  2004/05/16 16:58:41  jimmyo 
    129 # Added a definition file (definitions.html) to the server distribution. 
    130 # 
    131 # Revision 1.9  2004/05/16 11:27:39  jimmyo 
    132 # Added warning and critical statuses to the info table in the service view. 
    133 # 
    134 # Revision 1.8  2004/05/16 00:36:19  jimmyo 
    135 # Forgo an option 
    136 # 
    137 # Revision 1.7  2004/05/16 00:33:07  jimmyo 
    138 # Added a descriptionary table at the bottom of the service view page. Also added "graph_info" and "<field>.info" which can be used by plugins to supply supplementary information for it. 
    139 # 
    140 # Revision 1.6  2004/05/12 10:46:47  jimmyo 
    141 # Bugfix regarding logo namechange from logo.gif to logo.png, when installing. 
    142 # 
    143 # Revision 1.5  2004/01/29 17:40:10  jimmyo 
    144 # Fixed pod typos patched by Lupe Christoph (SF#884092) 
    145 # 
    146 # Revision 1.4  2004/01/29 17:34:06  jimmyo 
    147 # Updated copyright information 
    148 # 
    149 # Revision 1.3  2004/01/29 17:13:46  jimmyo 
    150 # Enabled domain_order-option. 
    151 # 
    152 # Revision 1.2  2004/01/15 15:20:01  jimmyo 
    153 # Making things workable after name change. Upping for test verwion. 
    154 # 
    155 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    156 # Renamed occurrances of lrrd -> munin 
    157 # 
    158 # Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo 
    159 # Import of LRRD CVS tree after renaming to Munin 
    160 # 
    161 # Revision 1.10  2003/12/02 10:15:14  jimmyo 
    162 # Minor bugfix reported by Chan Wilson 
    163 # 
    164 # Revision 1.9  2003/12/02 09:55:56  jimmyo 
    165 # Fixed stupid brain-bug (Chan Wilson) 
    166 # 
    167 # Revision 1.8  2003/11/07 20:46:12  jimmyo 
    168 # Only require Config::General if using old config format. 
    169 # 
    170 # Revision 1.7  2003/11/07 19:00:16  jimmyo 
    171 # Put lockfiles in the right place 
    172 # 
    173 # Revision 1.6  2003/11/07 17:43:16  jimmyo 
    174 # Cleanups and log entries 
    175 # 
    176 # 
    17722$|=1; 
    17823 
     
    22671if ($do_version) 
    22772{ 
    228     print "munin-html version $VERSION.\n"; 
    229     print "Written by Knut Haugen, Audun Ytterdal, Jimmy Olsen, Tore Anderson / Linpro AS\n"; 
    230     print "\n"; 
    231     print "Copyright (C) 2002-2004\n"; 
    232     print "This is free software released under the GNU Public License. There is NO\n"; 
    233     print "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"; 
     73    print <<"EOT"; 
     74munin-html version $VERSION. 
     75Written by Knut Haugen, Audun Ytterdal, Jimmy Olsen, Tore Anderson / Linpro AS 
     76 
     77Copyright (C) 2002-2005 
     78 
     79This is free software released under the GNU General Public License. There 
     80is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR 
     81PURPOSE. For details, please refer to the file COPYING that is included 
     82with this software or refer to 
     83  http://www.fsf.org/licensing/licenses/gpl.txt 
     84EOT 
    23485    exit 0; 
    23586} 
     
    538389            { 
    539390                push @categories, $categories{$cat} 
    540                         unless (grep /^$cat$/, @categories); 
     391                        unless (grep { $_->{name} eq $cat } @categories); 
    541392            } 
    542393        } else { 
     
    666517                  { 
    667518                          print $log "$now - $comment\n"; 
     519                          $log->flush; 
     520                          close (STDERR); 
     521                          open (STDERR, ">&", $log); 
    668522                  } 
    669523                  else 
  • people/ilmari/modularisation-branch/server/munin-limits.in

    r864 r1012  
    1616# along with this program; if not, write to the Free Software 
    1717# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. 
    18 # 
    19 # 
    20 # $Log$ 
    21 # Revision 1.26  2005/02/16 19:58:25  jimmyo 
    22 # yet another rewrite of munin-limits open call (SF#1115434) 
    23 # 
    24 # Revision 1.25  2005/01/25 20:06:55  jimmyo 
    25 # Make munin-limits work properly with perl 5.6 (SF#1109039). 
    26 # 
    27 # Revision 1.24  2005/01/05 15:40:35  jimmyo 
    28 # Main: "contacts" can now be set to "none". 
    29 # 
    30 # Revision 1.23  2005/01/05 12:12:30  jimmyo 
    31 # Main: Added limit message option "strtrunc" 
    32 # 
    33 # Revision 1.22  2004/12/08 08:47:44  jimmyo 
    34 # Fix bug where munin-limits didn't warn properly in all situations. 
    35 # 
    36 # Revision 1.21  2004/11/26 08:48:50  ilmari 
    37 # Allow floating point values in warning/critical limits. 
    38 # 
    39 # Revision 1.20  2004/11/24 12:01:07  jimmyo 
    40 # Bugfix in munin-limits (it didn't work properly). 
    41 # 
    42 # Revision 1.19  2004/11/19 21:51:05  jimmyo 
    43 # Cosmetics on the nagios warnings. 
    44 # 
    45 # Revision 1.18  2004/11/19 21:32:39  jimmyo 
    46 # Added a --force option to munin-limits, to force sending absolutely all messages. 
    47 # 
    48 # Revision 1.17  2004/11/19 21:05:54  jimmyo 
    49 # Removed the munin-nagios program, as it is no longer needed. 
    50 # 
    51 # Revision 1.16  2004/11/19 20:51:24  jimmyo 
    52 # New notification system finished (I think). 
    53 # 
    54 # Revision 1.15  2004/11/19 18:38:02  jimmyo 
    55 # Worked a bit more on the notification system. 
    56 # 
    57 # Revision 1.14  2004/11/18 15:31:37  jimmyo 
    58 # Worked a bit more on the notification system. 
    59 # 
    60 # Revision 1.13  2004/11/18 00:22:02  jimmyo 
    61 # Midway implementation of new notification scheme. 
    62 # 
    63 # Revision 1.12  2004/11/16 20:00:44  jimmyo 
    64 # License cleanups. 
    65 # 
    66 # Revision 1.11  2004/11/13 21:22:59  jimmyo 
    67 # Changed some of the critical/warning output.. 
    68 # 
    69 # Revision 1.10  2004/11/13 19:14:08  jimmyo 
    70 # Changed the default warning/critical output a bit. 
    71 # 
    72 # Revision 1.9  2004/11/12 23:18:52  jimmyo 
    73 # Added new options notify_enable and notify_text, to allow more finely tuned notifications (both what to notify and what text to send.) 
    74 # 
    75 # Revision 1.8  2004/09/24 16:31:07  jimmyo 
    76 # Bugfixes. 
    77 # 
    78 # Revision 1.7  2004/09/08 15:25:33  ilmari 
    79 # Use @@PERL@@ in all perl shebang lines. 
    80 # 
    81 # Revision 1.6  2004/06/08 15:30:34  jimmyo 
    82 # The server programs now open the log file at an earlier point. 
    83 # 
    84 # Revision 1.5  2004/05/20 22:30:08  jimmyo 
    85 # * Munin-limits added to distro. 
    86 # * Breached limis now show up in overview and node view. 
    87 # 
    88 # Revision 1.4  2004/01/29 17:40:10  jimmyo 
    89 # Fixed pod typos patched by Lupe Christoph (SF#884092) 
    90 # 
    91 # Revision 1.3  2004/01/29 17:34:06  jimmyo 
    92 # Updated copyright information 
    93 # 
    94 # Revision 1.2  2004/01/15 15:20:01  jimmyo 
    95 # Making things workable after name change. Upping for test verwion. 
    96 # 
    97 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    98 # Renamed occurrances of lrrd -> munin 
    99 # 
    100 # Revision 1.1.1.1  2004/01/02 15:18:08  jimmyo 
    101 # Import of LRRD CVS tree after renaming to Munin 
    102 # 
    103 # Revision 1.4  2003/11/07 20:46:12  jimmyo 
    104 # Only require Config::General if using old config format. 
    105 # 
    106 # Revision 1.3  2003/11/07 17:43:16  jimmyo 
    107 # Cleanups and log entries 
    108 # 
    10918 
    11019use strict; 
     
    18089 
    18190logger("Starting munin-limits, checking lock"); 
    182 munin_runlock("$config->{dbdir}/munin-limits.lock"); 
    183 logger("Created lock: $config->{dbdir}/munin-limits.lock"); 
     91munin_runlock("$config->{rundir}/munin-limits.lock"); 
     92logger("Created lock: $config->{rundir}/munin-limits.lock"); 
    18493 
    18594if (!defined $config->{'contact'}->{'nagios'}->{'command'} and 
     
    459368                } 
    460369                logger ("Debug: opening for writing: \"" . join('" "',@cmd) . "\".") if $DEBUG; 
    461                 if ($cmd[0] == ">") 
     370                if ($cmd[0] eq ">") 
    462371                { 
    463372                    if (! open ($pipe, join (' ', @cmd))) 
     
    477386                    if (!$pid) # Child 
    478387                    { 
     388                        # Fork of stdout-to-log filter 
     389                        my $logstdout; 
     390                        my $logstderr; 
     391                        my $logpid = open ($logstdout, "|-"); 
     392                        if (!defined $logpid) 
     393                        { 
     394                            logger ("Fatal: Unable to  fork: $!"); 
     395                            exit 3; 
     396                        } 
     397                        if (!$logpid) # Child 
     398                        { 
     399                            while (<STDIN>) 
     400                            { 
     401                                chomp; 
     402                                logger ("Command \"$c\" stdout: $_"); 
     403                            } 
     404                            exit 0; 
     405                        } 
     406                        close (STDOUT); 
     407                        *STDOUT = \$logstdout; 
     408                        my $logpid = open ($logstderr, "|-"); 
     409                        if (!defined $logpid) 
     410                        { 
     411                            logger ("Fatal: Unable to  fork: $!"); 
     412                            exit 3; 
     413                        } 
     414                        if (!$logpid) # Child 
     415                        { 
     416                            while (<STDIN>) 
     417                            { 
     418                                chomp; 
     419                                logger ("Command \"$c\" stderr: $_"); 
     420                            } 
     421                            exit 0; 
     422                        } 
     423                        close (STDERR); 
     424                        *STDERR = \$logstderr; 
     425 
    479426                        exec (@cmd[1 .. $#cmd]) or logger ("Warning: Could not run command \"" . join(' ',@cmd[1 .. $#cmd]) . "\": $!"); 
    480427                        exit 5; 
     
    605552                  { 
    606553                          print $log "$now - $comment\n"; 
     554                          $log->flush; 
     555                          close (STDERR); 
     556                          open (STDERR, ">&", $log); 
    607557                  } 
    608558                  else 
     
    651601=item B<< --[no]force >> 
    652602 
    653 Force sending of messages ieven if you normally wouldn't. [--noforce] 
     603Force sending of messages even if you normally wouldn't. [--noforce] 
    654604 
    655605=item B<< --[no]force-root >> 
    656606 
    657607Force running as root (stupid and unnecessary). [--noforce-root] 
    658  
    659 =item B<< --removeok >> 
    660  
    661 Reset warning status. 
    662608 
    663609=item B<< --help >> 
  • people/ilmari/modularisation-branch/server/munin-update.in

    r864 r1012  
    2222# 
    2323# $Id$ 
    24 # 
    25 # $Log$ 
    26 # Revision 1.34  2005/03/09 17:57:08  jimmyo 
    27 # Escape regexps more properly (Deb#296575). 
    28 # 
    29 # Revision 1.33  2005/03/06 21:23:29  jimmyo 
    30 # Better handling of broken connections (Deb#298108). 
    31 # 
    32 # Revision 1.32  2005/03/06 19:33:20  jimmyo 
    33 # Make sure all rrd-tunes are correct after an upgrade (Deb#296454, Deb#296645). 
    34 # 
    35 # Revision 1.31  2005/01/24 21:58:46  jimmyo 
    36 # Make munin-update shut up when reading from a socket goes wrong. 
    37 # 
    38 # Revision 1.30  2005/01/24 17:25:39  jimmyo 
    39 # Made TLS mode work. 
    40 # 
    41 # Revision 1.29  2005/01/10 20:48:58  jimmyo 
    42 # Main/Node: Added support for TLS. 
    43 # 
    44 # Revision 1.28  2004/12/10 09:12:13  jimmyo 
    45 # Fix bug when setting min to 0. 
    46 # 
    47 # Revision 1.27  2004/12/09 16:20:06  jimmyo 
    48 # generic/uptime was re-classified as linux/uptime (SF#1074576). 
    49 # 
    50 # Revision 1.26  2004/11/26 13:36:00  jimmyo 
    51 # Log updates of nonexisting fields better (SF#1073172). 
    52 # 
    53 # Revision 1.25  2004/11/26 13:26:44  jimmyo 
    54 # Added --stdout-option to all programs. 
    55 # 
    56 # Revision 1.24  2004/11/21 14:39:23  jimmyo 
    57 # Renamed function munin_get_val to munin_get. 
    58 # 
    59 # Revision 1.23  2004/11/16 20:00:44  jimmyo 
    60 # License cleanups. 
    61 # 
    62 # Revision 1.22  2004/10/22 16:35:32  jimmyo 
    63 # Don't read on a closed filehandle. 
    64 # 
    65 # Revision 1.21  2004/10/22 14:51:05  jimmyo 
    66 # Minor bugfix. 
    67 # 
    68 # Revision 1.20  2004/10/22 14:48:21  jimmyo 
    69 # Minor bugfix. 
    70 # 
    71 # Revision 1.19  2004/09/26 20:41:44  jimmyo 
    72 # Treat long field names properly. 
    73 # 
    74 # Revision 1.18  2004/09/13 21:00:38  jimmyo 
    75 # Added new config option "local_address", to specify which local address outgoing connections (from munin-update) should be used. 
    76 # 
    77 # Revision 1.17  2004/09/12 22:07:39  jimmyo 
    78 # Munin-update adapts to field type changes (loss-free conversion from COUNTER->DERIVE et al.) 
    79 # 
    80 # Revision 1.16  2004/09/10 19:24:18  jimmyo 
    81 # Added new option "graph_sums" which creates summarised graphs. 
    82 # 
    83 # Revision 1.15  2004/09/08 15:25:33  ilmari 
    84 # Use @@PERL@@ in all perl shebang lines. 
    85 # 
    86 # Revision 1.14  2004/09/07 21:45:38  jimmyo 
    87 # Changes of min and max values now causes corresponding changes in the RRD files. 
    88 # 
    89 # Revision 1.13  2004/09/04 21:33:13  jimmyo 
    90 # Handle strange characters better. 
    91 # 
    92 # Revision 1.12  2004/08/31 18:12:59  jimmyo 
    93 # Sanitise incoming field names a bit better. 
    94 # 
    95 # Revision 1.11  2004/08/31 18:11:04  jimmyo 
    96 # Sanitise incoming field names a bit better. 
    97 # 
    98 # Revision 1.10  2004/05/20 20:47:19  jimmyo 
    99 # The server programs now open the log file at an earlier point. 
    100 # 
    101 # Revision 1.9  2004/05/12 20:52:06  jimmyo 
    102 # Turned -w on in munin-update 
    103 # 
    104 # Revision 1.8  2004/05/09 21:11:16  jimmyo 
    105 # New plugin (pm3users) and a bunch of patches from Jacques Caruso. 
    106 # 
    107 # Revision 1.7  2004/02/10 19:27:02  jimmyo 
    108 # Munin-update now properly ignores nodes with "update no". 
    109 # 
    110 # Revision 1.6  2004/01/30 14:28:19  jimmyo 
    111 # More timeouts in munin-update (Deb#222674). 
    112 # 
    113 # Revision 1.5  2004/01/29 18:19:58  jimmyo 
    114 # Made Munin compatible with perl 5.005_03 (patch by Lupe Christoph) (SF#884622) 
    115 # 
    116 # Revision 1.4  2004/01/29 17:40:10  jimmyo 
    117 # Fixed pod typos patched by Lupe Christoph (SF#884092) 
    118 # 
    119 # Revision 1.3  2004/01/29 17:34:06  jimmyo 
    120 # Updated copyright information 
    121 # 
    122 # Revision 1.2  2004/01/15 15:20:01  jimmyo 
    123 # Making things workable after name change. Upping for test verwion. 
    124 # 
    125 # Revision 1.1  2004/01/02 18:50:01  jimmyo 
    126 # Renamed occurrances of lrrd -> munin 
    127 # 
    128 # Revision 1.1.1.1  2004/01/02 15:18:08  jimmyo 
    129 # Import of LRRD CVS tree after renaming to Munin 
    130 # 
    131 # Revision 1.35  2003/12/19 20:53:17  jimmyo 
    132 # ChangeLog 
    133 # 
    134 # Revision 1.34  2003/12/12 21:40:34  jimmyo 
    135 # Minor bugfix 
    136 # 
    137 # Revision 1.33  2003/12/12 19:23:59  jimmyo 
    138 # Fix bug with timeout handling of children. 
    139 # 
    140 # Revision 1.32  2003/12/06 20:21:53  jimmyo 
    141 # Removed forgotten debug info 
    142 # 
    143 # Revision 1.31  2003/12/06 20:09:17  jimmyo 
    144 # Better handling of dying children and timeouts. (Deb#222674) 
    145 # 
    146 # Revision 1.30  2003/12/06 19:12:57  jimmyo 
    147 # Added max_processes config variable. Also, removed zombie-generation code. :-P 
    148 # 
    149 # Revision 1.29  2003/11/15 11:10:29  jimmyo 
    150 # Various fixes 
    151 # 
    152 # Revision 1.28  2003/11/12 12:04:45  jimmyo 
    153 # Make sure extinfo comes accross 
    154 # 
    155 # Revision 1.27  2003/11/07 23:39:09  jimmyo 
    156 # Filter out illegal chars 
    157 # 
    158 # Revision 1.26  2003/11/07 22:10:13  jimmyo 
    159 # Changed use_default_name -> use_node_name. Better name. 
    160 # 
    161 # Revision 1.25  2003/11/07 21:02:24  jimmyo 
    162 # Bugfix when a new node is unreachable. 
    163 # 
    164 # Revision 1.24  2003/11/07 20:46:12  jimmyo 
    165 # Only require Config::General if using old config format. 
    166 # 
    167 # Revision 1.23  2003/11/07 17:43:16  jimmyo 
    168 # Cleanups and log entries 
    169 # 
    170 # 
    17124 
    17225$|=1; 
     
    19851my $print_stdout = 0; 
    19952my $tls; 
     53my %tls_verified = ( "level" => 0, "cert" => "", "verified" => 0, "required_depth" => 5 ); 
    20054 
    20155my $log = new IO::Handle; 
     
    23993if ($do_version) 
    24094{ 
    241     print "munin-update version $VERSION.\n"; 
    242     print "Written by Audun Ytterdal, Jimmy Olsen, Tore Anderson / Linpro AS\n"; 
    243     print "\n"; 
    244     print "Copyright (C) 2002-2004\n"; 
    245     print "This is free software released under the GNU Public License. There is NO\n"; 
    246     print "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"; 
     95    print <<"EOT"; 
     96munin-update version $VERSION. 
     97Written by Audun Ytterdal, Jimmy Olsen, Tore Anderson / Linpro AS 
     98 
     99Copyright (C) 2002-2005 
     100 
     101This is free software released under the GNU General Public License. There 
     102is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR 
     103PURPOSE. For details, please refer to the file COPYING that is included 
     104with this software or refer to 
     105  http://www.fsf.org/licensing/licenses/gpl.txt 
     106EOT 
    247107    exit 0; 
    248108} 
     
    345205                            my $oldnode = $children{$key}->[3]; 
    346206 
    347                             logger ("Child has unexpectedly died: $domain -> $name."); 
     207                            logger ("Reaping child: $domain -> $name."); 
    348208                            delete $children{$key}; 
    349209                            use_old_config ($domain, $name, $oldnode); 
     
    621481  return if (exists ($node->{fetch_data}) and !$node->{fetch_data}); 
    622482  return if (exists ($node->{update}) and $node->{update} ne "yes"); 
     483  unless ($node->{address}) { 
     484      logger("No address defined for node: $name"); 
     485      return; 
     486  } 
    623487 
    624488  # Then we fork... 
     
    722586                } 
    723587                &fetch_node($domain,$name,$node,$socket); 
    724               Net::SSLeay::free ($tls) if ($tls); # Shut down TLS 
     588#             Net::SSLeay::free ($tls) if ($tls); # Shut down TLS 
    725589                close $socket; 
    726590                alarm (0); # Don't want to interrupt this. 
     
    746610                next unless (&config_node($domain,$name,$node,$oldnode,$socket)); 
    747611                &fetch_node($domain,$name,$node,$socket); 
    748               Net::SSLeay::free ($tls) if ($tls); # Shut down TLS 
     612#             Net::SSLeay::free ($tls) if ($tls); # Shut down TLS 
    749613                close $socket; 
    750614      } 
     
    753617} 
    754618 
     619sub tls_verify_callback  
     620{ 
     621    my ($ok, $subj_cert, $issuer_cert, $depth,  
     622            $errorcode, $arg, $chain) = @_; 
     623 
     624    if ($tls_verified{"level"}++ > $tls_verified{"required_depth"}) 
     625    { 
     626        logger ("TLS Notice: Certificate verification failed at depth ".$tls_verified{"level"}."."); 
     627        return 1; 
     628    } 
     629 
     630    if ($ok) 
     631    { 
     632        $tls_verified{"verified"} = 1; 
     633        logger ("TLS Notice: Verified certificate.") if $DEBUG; 
     634        return 1; # accept 
     635    } 
     636 
     637    return 1; # accept anyway 
     638} 
     639 
    755640sub start_tls { 
    756     my $socket = shift; 
     641    my $socket       = shift; 
     642    my $tls_paranoia = shift; 
     643    my $tls_cert     = shift; 
     644    my $tls_priv     = shift; 
     645    my $tls_verify   = shift; 
     646    my $tls_vdepth   = shift; 
     647 
    757648    my $ctx; 
    758  
    759     logger("Enabling TLS."); 
     649    my $err; 
     650    my $remote_key = 0; 
     651 
     652    %tls_verified = ( "level" => 0, "cert" => "", "verified" => 0, "required_depth" => $tls_vdepth ); 
     653 
     654    logger("Enabling TLS.") if $DEBUG; 
    760655    if (! eval "require Net::SSLeay;") 
    761656    { 
    762657        logger ("Fatal: TLS enabled but Net::SSLeay unavailable."); 
    763         exit 2; 
    764     } 
     658        return 0; 
     659    } 
     660 
     661    # Init SSLeay 
    765662    Net::SSLeay::load_error_strings(); 
    766663    Net::SSLeay::SSLeay_add_ssl_algorithms(); 
     
    769666    if (!$ctx) 
    770667    { 
    771         logger ("Fatal: Could not create SSL_CTX"); 
    772         exit 11; 
    773     } 
     668        logger ("TLS Error: Could not create SSL_CTX"); 
     669        return 0; 
     670    } 
     671 
     672    # Tune a few things... 
    774673    if (Net::SSLeay::CTX_set_options($ctx, &Net::SSLeay::OP_ALL)) 
    775674    { 
    776         logger ("Fatal: Could not set SSL_CTX options"); 
    777         exit 12; 
    778     } 
    779  
     675        logger ("TLS Error: Could not set SSL_CTX options"); 
     676        return 0; 
     677    } 
     678 
     679    # Tell the node that we want TLS 
    780680    write_socket_single ($socket, "STARTTLS\n"); 
    781681    my $tlsresponse = read_socket_single ($socket); 
    782     if ($tlsresponse !~ /^200 /i) 
    783     { 
    784         logger ("Bad TLS response \"$tlsresponse\"."); 
    785         exit 13; 
    786     } 
    787  
     682    if (!defined $tlsresponse) 
     683    { 
     684        logger ("TLS Error: Bad TLS response \"\"."); 
     685        return 0 
     686    } 
     687    if ($tlsresponse =~ /^TLS OK/) 
     688    { 
     689        $remote_key = 1; 
     690    } 
     691    elsif ($tlsresponse !~ /^TLS MAYBE/i) 
     692    { 
     693        logger ("TLS Error: Bad TLS response \"$tlsresponse\"."); 
     694        return 0; 
     695    } 
     696 
     697    # Should we use a private key? 
     698    if (defined $tls_priv and length $tls_priv) 
     699    { 
     700        if (-e $tls_priv or $tls_paranoia eq "paranoid") 
     701        { 
     702            if (!Net::SSLeay::CTX_use_PrivateKey_file($ctx, $tls_priv,  
     703                &Net::SSLeay::FILETYPE_PEM)) 
     704            { 
     705                if ($tls_paranoia eq "paranoid")  
     706                { 
     707                    logger ("TLS Error: Problem occured when trying to read file with private key \"$tls_priv\": $!"); 
     708                    return 0; 
     709                } 
     710                else 
     711                { 
     712                    logger ("TLS Notice: Problem occured when trying to read file with private key \"$tls_priv\": $!. Continuing without private key."); 
     713                } 
     714            } 
     715        } 
     716        else 
     717        { 
     718            logger ("TLS Notice: No key file \"$tls_priv\". Continuing without private key."); 
     719        } 
     720    } 
     721 
     722    # How about a certificate? 
     723    if (-e $tls_cert) 
     724    { 
     725        if (defined $tls_cert and length $tls_cert) 
     726        { 
     727            if (!Net::SSLeay::CTX_use_certificate_file($ctx, $tls_cert,  
     728                    &Net::SSLeay::FILETYPE_PEM)) 
     729            { 
     730                logger ("TLS Warning: Problem occured when trying to read file with private key \"$tls_cert\": $!. Continuing without private key."); 
     731            } 
     732        } 
     733    } 
     734    else 
     735    { 
     736        logger ("TLS Notice: No certificate file \"$tls_cert\". Continuing without private key."); 
     737    } 
     738 
     739    # Now let's define our requirements of the node 
     740    $tls_vdepth = 5 if !defined $tls_vdepth; 
     741    Net::SSLeay::CTX_set_verify_depth ($ctx, $tls_vdepth); 
     742    $err = &Net::SSLeay::print_errs(); 
     743    if (defined $err and length $err) 
     744    { 
     745        logger ("TLS Warning in set_verify_depth: $err"); 
     746    } 
     747    Net::SSLeay::CTX_set_verify ($ctx, &Net::SSLeay::VERIFY_PEER, \&tls_verify_callback); 
     748    $err = &Net::SSLeay::print_errs(); 
     749    if (defined $err and length $err) 
     750    { 
     751        logger ("TLS Warning in set_verify: $err"); 
     752    } 
     753 
     754    # Create the local tls object 
    788755    if (! ($tls = Net::SSLeay::new($ctx))) 
    789756    { 
    790         logger ("Fatal: Could not create TLS: $!"); 
    791         exit 14; 
    792     } 
     757        logger ("TLS Error: Could not create TLS: $!"); 
     758        return 0; 
     759    } 
     760    if ($DEBUG) 
     761    { 
     762        my $i = 0; 
     763        my $p = ''; 
     764        my $cipher_list = 'Cipher list: '; 
     765        $p=Net::SSLeay::get_cipher_list($tls,$i); 
     766        $cipher_list .= $p if $p; 
     767        do { 
     768            $i++; 
     769            $cipher_list .= ', ' . $p if $p; 
     770            $p=Net::SSLeay::get_cipher_list($tls,$i); 
     771        } while $p; 
     772        $cipher_list .= '\n'; 
     773        logger ("TLS Notice: Available cipher list: $cipher_list."); 
     774    } 
     775 
     776    # Connect it to the local fd that munin-update will print to 
    793777    Net::SSLeay::set_fd($tls, fileno($socket)); 
    794  
    795     my $res = Net::SSLeay::connect($tls) 
     778    $err = &Net::SSLeay::print_errs(); 
     779    if (defined $err and length $err) 
     780    { 
     781        logger ("TLS Error: Could not define encrypted fd: " . $err); 
     782    } 
     783 
     784    # Try to negotiate the tls connection 
     785    my $res; 
     786    if ($remote_key) 
     787    { 
     788        $res = Net::SSLeay::connect($tls); 
     789    } 
     790    else 
     791    { 
     792        $res = Net::SSLeay::accept($tls); 
     793    } 
     794    $err = &Net::SSLeay::print_errs(); 
     795    if (defined $err and length $err) 
     796    { 
     797        logger ("TLS Error: Could not enable TLS: " . $err); 
     798        Net::SSLeay::free ($tls); 
     799        Net::SSLeay::CTX_free ($ctx); 
     800        $tls = undef; 
     801    } 
     802    elsif (!$tls_verified{"verified"} and $tls_paranoia eq "paranoid") 
     803    { 
     804        logger ("TLS Error: Could not verify CA: " . Net::SSLeay::dump_peer_certificate($tls)); 
     805        write_socket_single ($tls, "quit\n"); 
     806        Net::SSLeay::free ($tls); 
     807        Net::SSLeay::CTX_free ($ctx); 
     808        $tls = undef; 
     809    } 
     810    else 
     811    { 
     812        logger ("TLS Notice: TLS enabled."); 
     813        logger ("TLS Notice: Cipher `" . Net::SSLeay::get_cipher($tls) . "'."); 
     814        logger ("TLS Notice: client cert: " . Net::SSLeay::dump_peer_certificate($tls)); 
     815    } 
     816    read_socket_single(); # Get rid of empty line 
     817    return $tls; 
    796818} 
    797819 
     
    804826        local $SIG{ALRM} = sub { die "Could not run list on socket: $!\n"}; 
    805827        alarm 5; 
    806         if ($tls) 
     828        if (defined $tls and $tls) 
    807829        { 
    808             unless (Net::SSLeay::write($tls, $text)) 
     830            Net::SSLeay::write($tls, $text); 
     831            my $err = &Net::SSLeay::print_errs(); 
     832            if (defined $err and length $err) 
    809833            { 
    810                 logger ("Fatal: error during socket write: $!"); 
     834                logger ("TLS Warning in write_socket_single: $err"); 
    811835                exit 9; 
    812836            } 
    813             Net::SSLeay::print_errs('SSL_write'); 
    814837        } 
    815838        else 
     
    835858      { 
    836859          $res = Net::SSLeay::read($tls); 
    837           Net::SSLeay::print_errs('SSL_read'); 
     860          my $err = &Net::SSLeay::print_errs(); 
     861          if (defined $err and length $err) 
     862          { 
     863            logger ("TLS Warning in read_socket_single: $err"); 
     864          } 
    838865      } 
    839866      else 
     
    866893      { 
    867894          while (defined ($_ = Net::SSLeay::read($tls))) { 
     895            my $err = &Net::SSLeay::print_errs(); 
     896            if (defined $err and length $err) 
     897            { 
     898              logger ("TLS Warning in read_socket: $err"); 
     899            } 
    868900            chomp; 
    869             Net::SSLeay::print_errs('SSL_read'); 
    870901            last if (/^\.$/); 
    871902            push @array,$_; 
     
    915946  my $nodeconf_time = Time::HiRes::time; 
    916947 
    917   if (&munin_get_bool ($config, "tls", undef, $domain, $name)) 
     948  my $tls_requirement = &munin_get ($config, "tls", "auto", $domain, $name); 
     949  logger ("TLS Debug: TLS set to \"$tls_requirement\".") if $DEBUG; 
     950  if ($tls_requirement ne "disabled") 
    918951  { 
    919       start_tls ($socket); 
     952      my $key; 
     953      my $cert; 
     954      $key = $cert = munin_get ($config, "tls_pem", undef, $domain, $name); 
     955      $key = &munin_get ($config, "tls_private_key", "@@CONFDIR@@/munin.pem", $domain, $name) 
     956          unless defined $key; 
     957      $cert = &munin_get ($config, "tls_certificate", "@@CONFDIR@@/munin.pem", $domain, $name) 
     958          unless defined $cert; 
     959      if (!start_tls ($socket, $tls_requirement, $cert, $key, 
     960                  &munin_get ($config, "tls_verify_certificate", undef, $domain, $name), 
     961                  &munin_get ($config, "tls_verify_depth", 5, $domain, $name), 
     962                  )) 
     963      { 
     964          if ($tls_requirement eq "paranoid" or $tls_requirement eq "enabled") 
     965          { 
     966              logger ("ERROR: Could not establish TLS connection to \"$domain :: $name\". Skipping."); 
     967              exit 13; 
     968          } 
     969      } 
    920970  } 
    921971 
     
    927977    write_socket_single ($socket, "list $fetchdomain\n"); 
    928978    my $list = read_socket_single ($socket); 
     979    exit 1 unless defined $list; 
    929980    chomp $list; 
    930981    @services = split / /,$list; 
     
    947998             $node->{client}->{$servname}->{fetch_data} == 0); 
    948999    next if (exists ($node->{client}->{$servname}->{update}) and  
    949              !$node->{client}->{$servname}->{update} eq "yes"); 
     1000             $node->{client}->{$servname}->{update} ne "yes"); 
    9501001    next if (@limit_services and !grep (/^$servname$/, @limit_services)); 
    9511002    my @graph_order = (exists $node->{client}->{$servname}->{graph_order} ?  
     
    10041055          logger ("creating rrd-file for $servname->$subservice"); 
    10051056          mkdir "$config->{dbdir}/$domain/",0777; 
    1006           RRDs::create ("$fname", 
     1057          my @args = ("$fname", 
    10071058                        "DS:42:".($node->{client}->{$servname}->{"$client.type"} || "GAUGE").":600:". 
    10081059                        (defined $node->{client}->{$servname}->{"$client.min"} ?  
    10091060                         $node->{client}->{$servname}->{"$client.min"} : 
    1010                          "U") . ":" . ($node->{client}->{$servname}->{"$client.max"} || "U"), 
     1061                         "U") . ":" . ($node->{client}->{$servname}->{"$client.max"} || "U")); 
     1062          my $resolution = &munin_get ($config, "graph_data_size", "normal", $domain, $node, $servname); 
     1063          if ($resolution eq "normal") 
     1064          { 
     1065                push (@args, 
    10111066                        "RRA:AVERAGE:0.5:1:576", # resolution 5 minutes 
    10121067                        "RRA:MIN:0.5:1:576", 
     
    10211076                        "RRA:MIN:0.5:288:450", 
    10221077                        "RRA:MAX:0.5:288:450"); 
     1078          } 
     1079          elsif ($resolution eq "huge") 
     1080          { 
     1081                push (@args, "RRA:AVERAGE:0.5:1:115200"); # resolution 5 minutes, for 400 days 
     1082                push (@args, "RRA:MIN:0.5:1:115200"); # Three times? ARGH! 
     1083                push (@args, "RRA:MAX:0.5:1:115200"); # Three times? ARGH! 
     1084          } 
     1085          RRDs::create @args; 
    10231086          if (my $ERROR = RRDs::error) { 
    10241087            logger ("Unable to create \"$fname\": $ERROR"); 
     
    10491112             $node->{client}->{$service}->{fetch_data} == 0); 
    10501113    next if (exists ($node->{client}->{$service}->{update}) and  
    1051              !$node->{client}->{$service}->{update} eq "yes"); 
     1114             $node->{client}->{$service}->{update} ne "yes"); 
    10521115    next if (@limit_services and !grep (/^$service$/, @limit_services)); 
    10531116    my $realservname = $node->{client}->{$service}->{realservname} || $service; 
     
    11121175    if (!$log->opened) 
    11131176    { 
    1114           unless (open ($log, ">>$dirname/munin-html.log")) 
     1177          unless (open ($log, ">>$dirname/munin-update.log")) 
    11151178          { 
    1116                   print STDERR "Warning: Could not open log file \"$dirname/munin-html.log\" for writing: $!"; 
     1179                  print STDERR "Warning: Could not open log file \"$dirname/munin-update.log\" for writing: $!"; 
    11171180          } 
    11181181    } 
     
    11231186  my $now = strftime "%b %d %H:%M:%S", localtime; 
    11241187 
     1188  chomp ($comment); 
     1189  $comment =~ s/\n/\\n/g; 
    11251190  print "$now [$$] - $comment\n" if $print_stdout; 
    11261191  if ($log->opened) 
     
    11371202                          print $log "$now - $comment\n"; 
    11381203                          $log->flush; 
     1204                          close (STDERR); 
     1205                          open (STDERR, ">&", $log); 
    11391206                  } 
    11401207                  else 
  • people/ilmari/modularisation-branch/server/munin.conf.in

    r864 r1012  
    2222# For those with Nagios, the following might come in handy. In addition, 
    2323# the services must be defined in the Nagios server as well. 
    24 #contact.nagios.command /usr/bin/send_nsca nagios.host.comm -c /etc/nsca.conf >/dev/null 
     24#contact.nagios.command /usr/bin/send_nsca nagios.host.comm -c /etc/nsca.conf 
    2525 
    2626# a simple host tree