forked from tech-angels/puppet-monit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
50 lines (36 loc) · 1.42 KB
/
README
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
=========================
Puppet module for monit
=========================
This is a puppet module for monit. It provides a simple way to install the
package, run the service, and handle the configuration. It also provides a
separate directory for other packages to install monit snippets.
Usage
=====
How to use the module
---------------------
Add the following to your node manifest::
$monit_secret="something secret, something safe"
$monit_alert="[email protected]"
$monit_mailserver="mail.example.org"
include monit
This will add a host-only "/etc/monit/monitrc" configuration file, which in
turn will include any file ending with ".monitrc" in the "/etc/monit/conf.d/"
directory.
Making passwords
----------------
The $monit_secret variable is used to construct a password for your monit
instance.
If you do not set a monit secret, it will use a default "secret" to make
passwords.
How to provide monit configuration snippets?
--------------------------------------------
This module can be used by other modules and classes to monitor their services.
Example::
monit::check::process{"openssh":
pidfile => "/var/run/sshd.pid",
start => "/etc/init.d/ssh start",
stop => "/etc/init.d/ssh stop",
customlines => ["if failed port 22 then restart",
"if 2 restarts within 3 cycles then timeout"]
}
For more information, see the inline documentation in manifests/init.pp