summaryrefslogtreecommitdiff
path: root/README
blob: 309d63d9094408bfd9f412ee4931ea5f61370790 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
== Munin ==

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

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. you will also need to create the following empty directories:

      mkdir -p /etc/puppet/modules/munin/files/nodes/modules_dir
      mkdir -p /etc/puppet/modules/munin/files/plugins/modules_dir

   d. 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$'

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

      include munin::host

      If you want to specify a particular package version for the main munin
      host, you can set the $munin_ensure_version variable _before_ the above
      include, like this

      $munin_ensure_version = "1.2.6-17"
   
   f. 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

      If you want to specify a particular package version for the munin
      client, you can set the $munin_node_ensure_version variable _before_ the
      above include, like this

      $munin_node_ensure_version = "1.2.6-17"

   g. 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_in => "/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"
      }


   h. 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

   i. If you'd like to do cgi graphing, please note the following page: http://munin.projects.linpro.no/wiki/CgiHowto
      For CentOS this is enabled in the default header config

   j. Per default (on CentOS) munin will send warnings and critical messages to root

== Notes for existing users ==
The name of the helper module changed from site-munin to site_munin. See http://projects.puppetlabs.com/issues/4314 for more details on naming.