Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!

Close
Munin is a performance monitoring system which creates nice RRD graphs and has
a very easy plugin interface. The munin homepage is http://munin.projects.linpro.no/

To use this module, follow these directions:

1. Install the "common" module -- the munin module depends on functions that are
   defined and installed via the common module, see README.common for how to do this

   This module can be found at https://github.com/puppet-modules/puppet-common or
   https://github.com/daks/puppet-common


2. You will need storedconfigs enabled in your puppet setup, to do that you need to
   add a line to your puppet.conf in your [puppetmasterd] section which says:
   
   storeconfigs=true

   You may wish to immediately setup a mysql/pgsql database for your storedconfigs, as
   the default method uses sqlite, and is not very efficient, to do that you need lines
   such as the following below the storeconfigs=true line (adjust as needed):

   dbadapter=mysql
   dbserver=localhost
   dbuser=puppet
   dbpassword=puppetspasswd


3. Install the "munin" module:

   a. Your modules directory will need all the files included in this repository placed 
      under a directory called "munin"

   b. add the following line to your modules.pp:
   
      import "munin" 

      (NOTE: if you have followed the directions in README.common then you will have import 
      "modules.pp" in your site.pp, if you do not have that, then you will need to add the 
      import line to your site.pp)

   c. Add to the top of your site.pp a variable which indicates what IP should be allowed to 
      connect to your individual munin-nodes (this is typically your main munin host's IP):

      $munin_cidr_allow = '192.168.0.1/32'

		You can also put an array there.

		On pre-lenny systems, you have to use the older Regexp-variant:

      $munin_allow = '^192\.168\.0\.1$'

   d. In the node definition in your site.pp for your main munin host, add the following:

      include munin::host
   
   e. On each node that will gather munin statistics, add this line to that node's entry 
      in site.pp (you may want to also add this to your main munin host):
      
      include munin::client

   f. If there are particular munin plugins you want to enable or configure, you define them
      in the node definition, like follows:

      # Enable monitoring of disk stats in bytes
      munin::plugin { df_abs: }

      # Use a non-standard plugin path to use custom plugins
      munin::plugin { "spamassassin":
         ensure => "spamassassin",
         script_path => "/usr/local/share/munin-plugins",
      }

      # Use a special config to pass parameters to the plugin
      munin::plugin {
         [ "apache_accesses", "apache_processes", "apache_volume" ]:
            ensure => present,
            config => "env.url http://127.0.0.1:80/server-status?auto"
      }


   g. If you have Linux-Vservers configured, you will likely have multiple munin-node processes
      competing for the default port 4949, for those nodes, set an alternate port for munin-node
      to run on by putting something similar to the following in the node definition:

      $munin_port = 4948

4.  If you need any manual configuration, you can customise /etc/munin/munin.conf.header
    on the munin::host.

    If you want to define extra nodes (not configured with Puppet), you can create a file named
    munin.hosts.$fqdn (with $fqdn the FQDN of the munin::host) and put it on your Puppet fileserver
    which serves the [files] share.
    The alternative is to modify the munin/files/munin.hosts file in the module.
    

Recent activity

Éric Veiras Galisson

Commits by Éric Veiras Galisson were pushed to daks/puppet-munin

0783633 - Changed the way to add custom nodes to the munin::host. No need to modify /etc/munin/munin.conf.header on the host now, just create a file:///puppet/files/munin/munin.hosts.$fqdn on your ...
Daniel Hahler

Commits by Daniel Hahler were pushed to daks/puppet-munin

ec581a2 - Use user munin for munin_stats. This apparently was/is required, although I do not know any details anymore unfortunately.
Daniel Hahler

Commits by Daniel Hahler were pushed to daks/puppet-munin

1ec71c9 - Fix df plugin: user root, include "simfs". "user root" is required if you have some mounts in /root, so that only root can read them. ...
Daniel Hahler

Commits by Daniel Hahler were pushed to daks/puppet-munin

7fb696a - Add support for OpenVZ, similar to vserver. This adds munin::plugins::openvz, derived from vserver, and uses it in the munin::client class.
Daniel Hahler

Commits by Daniel Hahler were pushed to daks/puppet-munin

71b29b9 - Remove duplicated "setsid" config line.
Daniel Hahler

Commits by Daniel Hahler were pushed to daks/puppet-munin

b6db86f - Fix wrong "user (postfix)" config. "(foo)" appears to be valid only for groups IIRC - I had fixed this a long time ago already.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.