-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.yml
More file actions
212 lines (177 loc) · 6.48 KB
/
Copy pathmain.yml
File metadata and controls
212 lines (177 loc) · 6.48 KB
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
# vim: tabstop=2 expandtab shiftwidth=2 softtabstop=2 smartindent nu
---
# Notes on using *dicts* for defining lists:
# As ansible is not merging lists, we use dicts
# to define lists.
# Only the values of the dict will be used.
# This way you can merge the settings for different
# environments.
# Example:
# basic settings
# check_mk_XXX:
# all:
# - aa
# - ab
# - ac
# and then for group x:
# check_mk_XXX:
# x: xx
# y: yy
# resulting in a list per host:
# - "aa"
# - "ab"
# - "ac"
# - "xx"
# - "yy"
#
# using the old list format will still work
# define the hostname of the checkmk server
# required for fetching the deb package from the server
# the server must be reachable from the control machine, not from the target host
# checkmk_hostname:
# protocoll used by the server (http|https)
checkmk_proto: http
# IP of the checkmk server
# required for limiting the access to the agent via xinetd,
# as it will be added to the 'only_from' xinetd config line.
# configure this to your needs!
checkmk_ip: 127.0.0.1
# site name
checkmk_site: SITENAME
# path part of the uri to get the agents from the checkmk server
# mostly SITENAME/check_mk/agents
checkmk_path: "{{ checkmk_site }}/check_mk/agents"
# api path
checkmk_api_url: "{{ checkmk_proto }}://{{ checkmk_hostname }}/{{ checkmk_site }}/check_mk/api/1.0"
# optionaly define a hardcoded version of the agent in order to prevent upgrades
# if this is not set, we will detect the lates version from the server
# checkmk_agent_version: "2.0.0p4"
# agent deb package name template
checkmk_agent_deb: "check-mk-agent_{{ checkmk_agent_version }}-1_all.deb"
# skip installation of checkmk_agent package, just perform the config steps
# default:
# skip_checkmk_agent_deb: false
# register host on the server from the client
# if set to true, the monitoring client host needs access to
# the monitoring server on port 8000
# only makes sense if check_mk_agent_use_systemd is configured
checkmk_agent_register: false
checkmk_agent_register_port: 8000
# register host on the server in proxy mode
# in this mode, the monitoring agent host needs no access to
# the monitoring server
checkmk_agent_register_proxy: false
# create host on checkmk site if it does not exists
# if not set, register will be only performed for existing hosts
# this requires more priviledges than agent_registration
checkmk_agent_register_create_host: false
# fail if checkmk_agent_register is set to true
# but checkmk_agent_register_create_host to false
# and the host does not exists
checkmk_agent_register_fail_if_host_is_missing: true
# by default register tasks will have set `no_log` to true
# for debug you can set
# checkmk_agent_register_nolog: false
# set the proxy host for the
# cmk-agent-ctl proxy-register command
# the proxy host must have the agent installed and needs access to
# the monitoring server on port 8000
checkmk_agent_register_proxy_host: "{{ checkmk_hostname }}"
# API user to use for registration
# requires at least agent_registration role
checkmk_agent_register_user:
# Password for API user
checkmk_agent_register_password:
# hostname to use for registration
checkmk_agent_register_hostname: "{{ ansible_fqdn | default(ansible_hostname) | default(inventory_hostname) }}"
# create new hosts in this folder
# example:
# checkmk_agent_register_folder: "/{{ checkmk_site }}"
checkmk_agent_register_folder: "/"
# set hosts IP address during register
checkmk_agent_register_ipaddress: "{{ ansible_default_ipv4.address }}"
# use logwatch
check_mk_logwatch: true
#check_mk_logwatch_plugin: mk_logwatch_2.py # python2 version
check_mk_logwatch_plugin: mk_logwatch.py
# patterns for logwatch
# example:
# check_mk_logwatch_syslog_patterns:
# global:
# - I softdog
# - I hispanic
check_mk_logwatch_syslog_patterns: {}
check_mk_logwatch_authlog_patterns: {}
# deprecated patterns for logwatch as list
# check_mk_logwatch_syslog_patterns: []
# additional logwatch files
# check_mk_logwatch_additional_files:
# filename: # filename may include the options to be applied
# # i.e. '/var/log/y.log maxlinesize=512 encoding=utf-8':
# - pattern list
# example:
# check_mk_logwatch_additional_files:
# /var/log/my.log:
# - W \[WARN\] nodeJS
# - C \[ERROR\] nodeJS
check_mk_logwatch_additional_files: {}
# dict of additional packages to install
checkmkagent_required_packages: {}
# deprecated list of additional packages to install
# checkmkagent_required_packages: []
# dict of all plugins to be downloaded and installed from main check_mk site
# will be installed to /usr/lib/check_mk_agent/plugins/
check_mk_plugins: {}
# deprecated list of all plugins to be downloaded and installed from main check_mk site
# check_mk_plugins: []
# plugins that should be removed
check_mk_plugins_remove: {}
# dict of all local plugins to be installed
# will be installed to /usr/lib/check_mk_agent/local/
#
# in the role we have included some plugins
# check_mk_local_plugins:
# all:
# - check_apt-update-success
# - check_apt_updates_for_packages_on_hold
# - check_reboot
# - check_keepalived
# - check_samba_repl
# - check_fail2ban
# - check_zammad_health
check_mk_local_plugins: {}
# deprecated list of all local plugins to be installed
# check_mk_local_plugins: []
# check_mk_local_plugins as templates
# will be installed to /usr/lib/check_mk_agent/local/
# the file listed here can contain path elements, as the will be removed for the target
# the template listed here should contain just the filename, we will look for a file with that name and the '.j2' extension
# example:
# check_mk_local_plugins_template:
# all:
# - check_this
# - check_that
# cloud:
# - cloud/check_cloud
# will look for templates/check_this.j2, templates/check_that.j2 and templates/cloud/check_cloud.j2
check_mk_local_plugins_template: {}
# plugins to remove
check_mk_local_plugins_remove: {}
# dict of local cfg files
# will be installed into /etc/check_mk/
check_mk_local_cfg: {}
# deprecated list of local cfg files
# check_mk_local_cfg: []
# dict of local cfg files as templates
# will be installed into /etc/check_mk/
check_mk_local_cfg_templates: {}
# method how the agent should be started
# check_mk_agent_use_xinetd and check_mk_agent_use_systemd are mutualy exclusive
check_mk_agent_use_xinetd: true
check_mk_agent_use_systemd: false
# purge xinetd package (in case check_mk_agent_use_systemd == true)
# default:
# purge_xinetd: false
# set this to "{{ lookup('config', 'DEFAULT_LOCAL_TMP') | dirname }}" to make the playbook multi user aware
_local_tmp: /var/tmp
...