-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmain.yml
329 lines (300 loc) · 8.53 KB
/
main.yml
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
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
---
# Defaults vars file for shinken role
# Shinken general settings
shinken_system_dependencies_state: 'present'
shinken_pip_packages:
- name: 'shinken'
state: 'present'
version: '2.4.3'
# Clear configuration after a new installation or upgrade
shinken_clear_configuration_after_install: True
# Used to manage module dependencies (system and pip)
shinken_pip_additional_packages: []
shinken_system_additional_packages: []
# Shinken user settings
shinken_user_group: 'shinken'
shinken_user_home: '/var/lib/shinken'
shinken_user_name: 'shinken'
shinken_user_password: 'shinken'
shinken_user_shell: '/bin/bash'
shinken_user_update_password: 'always'
# Shinken .ssh folder permissions
shinken_user_ssh_folder_permissions: '0700'
# Shinken config modes
shinken_config_files_mode: '0600'
shinken_config_folders_mode: '0700'
# Shinken paths
shinken_paths_etc: '/etc/shinken'
shinken_paths_run: '/var/run/shinken'
shinken_paths_log: '/var/log/shinken'
shinken_paths_configuration:
- "{{ shinken_paths_etc }}/arbiters"
- "{{ shinken_paths_etc }}/brokers"
- "{{ shinken_paths_etc }}/commands"
- "{{ shinken_paths_etc }}/contactgroups"
- "{{ shinken_paths_etc }}/contacts"
- "{{ shinken_paths_etc }}/daemons"
- "{{ shinken_paths_etc }}/dependencies"
- "{{ shinken_paths_etc }}/discovery"
- "{{ shinken_paths_etc }}/escalations"
- "{{ shinken_paths_etc }}/hostgroups"
- "{{ shinken_paths_etc }}/hosts"
- "{{ shinken_paths_etc }}/modules"
- "{{ shinken_paths_etc }}/notificationways"
- "{{ shinken_paths_etc }}/packs"
- "{{ shinken_paths_etc }}/pollers"
- "{{ shinken_paths_etc }}/reactionners"
- "{{ shinken_paths_etc }}/realms"
- "{{ shinken_paths_etc }}/receivers"
- "{{ shinken_paths_etc }}/resource.d"
- "{{ shinken_paths_etc }}/schedulers"
- "{{ shinken_paths_etc }}/servicegroups"
- "{{ shinken_paths_etc }}/services"
- "{{ shinken_paths_etc }}/templates"
- "{{ shinken_paths_etc }}/timeperiods"
shinken_resources:
- name: 'paths'
variables:
- name: '$USER1$'
value: '$NAGIOSPLUGINSDIR$'
- name: '$NAGIOSPLUGINSDIR$'
value: '/usr/lib/nagios/plugins'
- name: '$PLUGINSDIR$'
value: '/var/lib/shinken/libexec'
- name: 'snmp'
variables:
- name: '$SNMPCOMMUNITYREAD$'
value: 'public'
# Daemons
shinken_daemons:
arbiter:
debug: False
enabled: True
started: True
broker:
debug: False
enabled: True
started: True
poller:
debug: False
enabled: True
started: True
reactionner:
debug: False
enabled: True
started: True
receiver:
debug: False
enabled: True
started: True
scheduler:
debug: False
enabled: True
started: True
shinken_daemon_defaults:
workdir: "{{ shinken_paths_run }}"
logdir: "{{ shinken_paths_log }}"
user: "{{ shinken_user_name }}"
group: "{{ shinken_user_group }}"
host: '0.0.0.0'
idontcareaboutsecurity: 0
daemon_enabled: 1
use_local_log: 1
log_level: 'WARNING'
max_queue_size: 100000
modules_dir: "{{ shinken_user_home }}/modules"
ssl:
use_ssl: 0
ca_cert: "/etc/shinken/certs/ca.pem"
server_cert: "/etc/shinken/certs/server.cert"
server_key: "/etc/shinken/certs/server.key"
hard_ssl_name_check: 0
http_backend: 'auto'
daemon_thread_pool_size: 16
shinken_brokerd:
pidfile: "{{ shinken_paths_run }}/brokerd.pid"
port: 7772
local_log: "{{ shinken_paths_log }}/brokerd.log"
shinken_pollerd:
pidfile: "{{ shinken_paths_run }}/pollerd.pid"
port: 7771
local_log: "{{ shinken_paths_log }}/pollerd.log"
shinken_reactionnerd:
pidfile: "{{ shinken_paths_run }}/reactionnerd.pid"
port: 7769
local_log: "{{ shinken_paths_log }}/reactionnerd.log"
shinken_receiverd:
pidfile: "{{ shinken_paths_run }}/receiverd.pid"
port: 7773
local_log: "{{ shinken_paths_log }}/receiverd.log"
shinken_schedulerd:
pidfile: "{{ shinken_paths_run }}/schedulerd.pid"
port: 7768
local_log: "{{ shinken_paths_log }}/schedulerd.log"
# Modules
shinken_modules: []
# Main configuration file
#------------------------
shinken_main_config_directories: "{{ shinken_paths_configuration }}"
shinken_main_config_retention_update_interval: 60
shinken_main_config_max_service_check_spread: 5
shinken_main_config_max_host_check_spread: 5
shinken_main_config_service_check_timeout: 60
shinken_main_config_timeout_exit_status: 2
shinken_main_config_flap_history: 20
shinken_main_config_max_plugins_output_length: 65536
shinken_main_config_enable_problem_impacts_states_change: 1
shinken_main_config_disable_old_nagios_parameters_whining: 1
shinken_main_config_use_timezone: ''
shinken_main_config_enable_environment_macros: 0
shinken_main_config_log_initial_states: 0
shinken_main_config_no_event_handlers_during_downtimes: 1
shinken_main_config_pack_distribution_file: "{{ shinken_user_home }}/pack_distribution.dat"
shinken_main_config_workdir: "{{ shinken_user_home }}/"
shinken_main_config_lock_file: "{{ shinken_paths_run }}/arbiterd.pid"
shinken_main_config_local_log: "{{ shinken_paths_log }}/arbiterd.log"
shinken_main_config_log_level: 'WARNING'
shinken_main_config_use_custom_arbiter_user: False
shinken_main_config_custom_arbiter_user: 'shinken'
shinken_main_config_custom_arbiter_group: 'shinken'
shinken_main_config_modules_dir: "{{ shinken_user_home }}/modules"
shinken_main_config_daemon_enabled: 1
shinken_main_config_use_ssl: 0
shinken_main_config_ca_cert: "{{ shinken_paths_etc }}/certs/ca.pem"
shinken_main_config_server_cert: "{{ shinken_paths_etc }}/certs/server.cert"
shinken_main_config_server_key: "{{ shinken_paths_etc }}/certs/server.key"
shinken_main_config_hard_ssl_name_check: 0
shinken_main_config_http_backend: 'auto'
shinken_main_config_use_shinken_io: False
shinken_main_config_shinken_io_api_key: ''
shinken_main_config_shinken_io_secret: ''
shinken_main_config_shinken_io_http_proxy: ''
shinken_main_config_statsd_host: 'localhost'
shinken_main_config_statsd_port: 8125
shinken_main_config_statsd_prefix: 'shinken'
shinken_main_config_statsd_enabled: 0
# Shinken brokers
shinken_brokers:
- broker_name: 'broker-master'
address: '127.0.0.1'
port: 7772
spare: 0
manage_arbiters: 1
manage_sub_realms: 1
timeout: 3
data_timeout: 120
max_check_attempts: 3
check_interval: 60
modules: []
use_ssl: 0
hard_ssl_name_check: 0
realm: 'All'
# Shinken schedulers
shinken_schedulers:
- scheduler_name: 'scheduler-master'
address: '127.0.0.1'
port: 7768
spare: 0
weight: 1
timeout: 3
data_timeout: 120
max_check_attempts: 3
check_interval: 60
modules: []
satellitemap: []
skip_initial_broks: 0
use_ssl: 0
hard_ssl_name_check: 0
realm: 'All'
# Shinken receivers
shinken_receivers:
- receiver_name: 'receiver-master'
address: '127.0.0.1'
port: 7773
spare: 0
timeout: 3
data_timeout: 120
max_check_attempts: 3
check_interval: 60
modules: []
use_ssl: 0
hard_ssl_name_check: 0
realm: 'All'
direct_routing: 0
# Shinken reactionners
shinken_reactionners:
- reactionner_name: 'reactionner-master'
address: '127.0.0.1'
port: 7769
spare: 0
manage_sub_realms: 0
min_workers: 1
max_workers: 15
polling_interval: 1
timeout: 3
data_timeout: 120
max_check_attempts: 3
check_interval: 60
modules: []
reactionner_tags:
- 'None'
use_ssl: 0
hard_ssl_name_check: 0
realm: 'All'
# Shinken pollers
shinken_pollers:
- poller_name: 'poller-master'
address: '127.0.0.1'
port: 7771
spare: 0
manage_sub_realms: 0
min_workers: 0
max_workers: 0
processes_by_worker: 256
polling_interval: 1
timeout: 3
data_timeout: 120
max_check_attempts: 3
check_interval: 60
modules: []
passive: 0
poller_tags:
- 'None'
use_ssl: 0
hard_ssl_name_check: 0
realm: 'All'
# Shinken arbiters
shinken_arbiters:
- arbiter_name: 'arbiter-master'
host_name: ''
address: '127.0.0.1'
port: 7770
spare: 0
timeout: 3
data_timeout: 120
max_check_attempts: 3
check_interval: 60
modules: []
use_ssl: 0
hard_ssl_name_check: 0
# Shinken realms
shinken_realms:
- realm_name: 'All'
default: 1
# Configuration elements
shinken_contacts: []
shinken_contact_templates: []
shinken_contactgroups: []
shinken_hostgroups: []
shinken_servicegroups: []
shinken_timeperiods: []
shinken_notficationways: []
shinken_commands: []
shinken_hosts: []
shinken_host_templates: []
shinken_services: []
shinken_service_templates: []
shinken_host_dependencies: []
shinken_service_dependencies: []
shinken_host_escalations: []
shinken_service_escalations: []