forked from johan/munin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
259 lines (180 loc) · 8.08 KB
/
INSTALL
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
Munin installation requirements
===============================
On all hosts:
- A reasonable Perl 5
- GNU Make - do not attempt to use any other make (build time only)
- Module::Build - this is part of perl 5.10, for earlier Perls it must
be installed (build time only)
- The perl module Time::HiRes
- For TLS(SSL) to work you'll need Net::SSLeay everywhere
Server:
- A web server. Apache HTTPD should be suitable. Any web server supporting
simple file service and perhaps CGIs will work.
- RRD with Perl support - this means that RRDs.pm must be available
and "perl -MRRDs -e ':;'" must run without errors.
- Perl modules for server:
- Time::HiRes
- Storable (needed for ProcessManager. Should we port datafile to storable too?)
- Digest::MD5,
- HTML::Template
- Text::Balanced
- Params::Validate
- TimeDate
- Net::SSLeay if you want to use SSL/TLS
- Getopt::Long
- Log::Log4perl (which depends on
- IPC::Shareable
- Log::Dispatch
- Log::Dispatch::FileRotate
- MIME::Lite
- Mail::Sender
- Mail::Sendmail
- MailTools)
- Developers/packagers: For testing
- Test::MockModule
- Test::MockObject
- Test::Pod::Coverage
- Test::Perl::Critic 1.096 or later
- Test::Exception
- Directory::Scratch (err, wherefrom?)
- As well as all the modules needed on a node - most servers are also
nodes.
Node:
- Perl modules: Net::Server, Net::Server::Fork, Time::HiRes
- Perl module Net::SNMP for SNMP autoconfiguration and plugins
- For SNMPv3: Perl modules Crypt::DES, Digest::SHA1, Digest::HMAC
- Net::SSLeay if you want to use SSL/TLS
- Perl modules for plugins: Depends on the plugins you want to use,
but not many.
- If you want to use Java JMX plugins to monitor a Java app: Sun Java
5+ compiler (a basic JDK Standard Edition from java.sun.com or your
package system).
If you're missing some Perl modules and they are not in your package
system it's recommended to use the cpan shell (as root) to install the
needed ones. There is a short cpan shell section at the bottom of
this file if you do not know how to use it.
Please note that BSD and Linux OSes such as Red Hat Enterprise Linux
(and CentOS), Fedora, Debian, Ubuntu, SuSE and others will have quite
a few of these packages available to install with their standard
install tools.
Installing
==========
NOTE!!!! If you're using NFS please note that the "make install"
process is slightly problematic in that it (Module::Build actually)
writes files under $CWD. Since "make install" is usually run by root
and root usually cannot write files on a NFS volume, this will fail.
If you use NFS please install munin from /var/tmp, /tmp or some such
to work around this.
There are make targets for node, master, documentation and man files.
Generally you want to install everything on the master, and just the
node and plugiuns on ... the nodes.
To install both master and node:
- Review/edit Makefile.config to suit your needs.
- Create the user "munin" and the group "munin" if these are
not made automatically. The user needs no shell and no
privileges. On most Linux systems the munin user's shell
is the nologin shell (it has different paths on different
systems - but the user still needs to be able to
run cron jobs.
- make (do _NOT_ do "make install" directly, there is a bug
somewhere that will result in a very defective
Munin::Common::Defaults to be installed).
- make install
- In your HTMLDIR you will now find a .htaccess file with two
main features:
* Password protection. Users/passwords are kept in
CONFDIR/munin-httpasswd. Use htpasswd to create/modify
users in normal Apache fashion.
* Munin page expiry to refresh contents. This requires
mod_expires to be enabled.
NOTE: Both these features require the relevant AllowOverride
statement in Apache. AuthConfig and Indexes, respectively.
If you already have a .htaccess file in HTMLDIR it will not
be overwritten.
If you prefer that munin be openly available make the
.htaccess file empty to avoid overwriting it later.
- Review CONFDIR/munin.conf to set up some nodes. At least
one node needs to have at least one functional plugin for
HTML generation.
- Create a cron-entry to run "munin-cron" as the user "munin"
every 5 minutes. See build/resources for generic or
build/dists for distribution-specific scripts.
- If you want to use the dynamic graphs: Configure the CGI
directory, you will find a Apache config example in
build/resources. See also
http://munin.projects.linpro.no/wiki/CgiHowto
NOTE: Dynamic graphs are not exactly perfect.
To install a node:
- Edit Makefile.config to suit your needs.
- Create the group "munin".
- make
- make install-common-prime install-node-prime \
install-plugins-prime
NOTE: This overwrites any existing plugins.
- Decide which plugins to use. The quick auto-plug-and-play
solution:
munin-node-configure --shell --families=contrib,auto | sh -x
- Review CONFDIR/munin-node.conf. Ensure that your
munin-master can access it.
- Start the node agent (as root) SBINDIR/munin-node.
You probably want to use an init-script instead and you
might find a good one under build/dists or in the
build/resources directory (maybe you need to edit the init
script, check the given paths in the script you might use).
For further build alternatives, see Makefile.
Munin-gather
============
Munin-gather is an incomplete work in progress for the server side.
Please ignore it, and if you're a packager certainly don't package
it.
Notes about node plugins
========================
"make install-node-plugins" installs the plugins in LIBDIR (defined in
Makefile.config). Put the ones you want to use (or better yet, create
softlinks) in CONFDIR/plugins/ . An easy way to do this, is the
program "munin-node-configure", using the parameter "--shell". It will
then suggest commands to do this.
Some of the plugins require some configuration to get running. Some
example configuration files (plugins.conf) is found under the
build/dists directory.
Whenever the plugin list changes, the node needs to be restarted.
Many OSes and releases thereof have different ways of gathering data.
A lot of OSes still have none. If you create plugins for an OS/system
which is not already in the package, please send us a copy of them, so
we can add them for others to use. We'd also be happy if you sent us
any new plugins on systems already in the package.
Using CPAN shell
================
If your OS does not provide all the needed perl packages they can be
intalled by a perl installation tool called CPAN-Shell. There is
ample documentation about it on the web, but here is a brief tour.
As root execute:
# perl -MCPAN -e shell
The first time you run this you are interviewed about various things.
Answer the questions, you can probably answer blank on any you do not
understand.
You will then be presented with a CPAN prompt (cpan>) . From this
prompt you type:
cpan> install Time::HiRes
You could also do it one at a time like this:
# perl -MCPAN -e 'install Time::HiRes'
Do the same for all modules needed. E.g.,
install Time:HiRes
install Storable
install Digest::MD5
install Text::Balanced
and so on.
If you need to install Munin on a host with no Internet access you can
use CPAN shell on a host _with_ Internet access and use the "get"
command to retrive the needed modules. One problem: The dependencies
of modules will change over time so the list above may not be correct
6 months after it was last updated. SO: If you want to make sure you
get all the needed modules you can do a full install of munin on a
Internet connected system and then transfer all the modules to the
non-connected system after. All the modules that the CPAN shell
retrived can be found like this:
# cd ~/.cpan/sources
# find . -name '*.tar.gz
./authors/id/G/GA/GAAS/Digest-MD5-2.39.tar.gz
...
Now just make sure the sources directory is empty before you begin.