forked from alinefr/monit-formula
-
Notifications
You must be signed in to change notification settings - Fork 12
/
pillar.example
86 lines (80 loc) · 1.83 KB
/
pillar.example
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
monit:
mail_alert:
account:
server: smtp.gmail.com
port: 587
email: some@example.com
password: p@ssw0rd;)
send_as: monit@example.com
users:
- first@example.com
- second@example.com
http_access:
port: 2812
bind: 127.0.0.1
allowed:
users:
- ['user1', 'pass1']
- ['user2', 'pass2']
hosts:
- 127.0.0.1
- 192.168.0.10
- 192.168.0.11
modules:
nginx_init:
process:
custom:
name: nginx
with:
pidfile: /var/run/nginx.pid
config:
group: www
start: "/etc/init.d/nginx start"
stop: "/etc/init.d/nginx stop"
if:
failed: host 127.0.0.1 port 80 protocol http
action: restart
postfix:
process:
with:
pidfile: /var/spool/postfix/pid/master.pid
config:
group: mail
start: "/etc/init.d/postfix start"
stop: "/etc/init.d/postfix stop"
if:
failed: port 25 protocol smtp
action: restart
cron:
process:
with:
pidfile: /var/run/cron.pid
config:
group: system
start: "/etc/init.d/cron start"
stop: "/etc/init.d/cron stop"
depends: on cron_rc
file:
custom:
name: cron_rc
with:
path: /etc/init.d/cron
if:
failed: checksum
action: unmonitor
if2:
failed: permission 755
action: unmonitor
if3:
failed: uid root
action: unmonitor
if4:
failed: gid root
action: unmonitor
gdm:
process:
with:
pidfile: /var/run/gdm.pid
config:
start: "/etc/init.d/gdm start"
stop: "/etc/init.d/gdm stop"