-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathworker.cfg
253 lines (167 loc) · 6.68 KB
/
worker.cfg
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
###############################################################################
#
# Mod-Gearman - distribute checks with gearman
#
# Copyright (c) 2022 Sven Nierlein
#
# Worker Module Config
#
###############################################################################
# Identifier, hostname will be used if undefined
#identifier=hostname
# use debug to increase the verbosity of the module.
# Possible values are:
# 0 = only errors
# 1 = debug messages
# 2 = trace messages
# 3 = trace and all gearman related logs are going to stdout.
# Default is 0.
debug=0
# Path to the logfile.
logfile=/var/log/gearman/worker.log
# sets the addess of your gearman job server. Can be specified
# more than once to add more server.
server=localhost:4730
# sets the address of your 2nd (duplicate) gearman job server. Can
# be specified more than once o add more servers.
#dupserver=<host>:<port>
# defines if the worker should execute eventhandlers.
eventhandler=yes
# defines if the worker should execute notifications.
notifications=yes
# defines if the worker should execute
# service checks.
services=yes
# defines if the worker should execute
# host checks.
hosts=yes
# sets a list of hostgroups which this worker will work
# on. Either specify a comma seperated list or use
# multiple lines.
#hostgroups=name1
#hostgroups=name2,name3
# sets a list of servicegroups which this worker will
# work on.
#servicegroups=name1,name2,name3
# enables or disables encryption. It is strongly
# advised to not disable encryption. Anybody will be
# able to inject packages to your worker.
# Encryption is enabled by default and you have to
# explicitly disable it.
# When using encryption, you will either have to
# specify a shared password with key=... or a
# keyfile with keyfile=...
# Default is On.
encryption=yes
# A shared password which will be used for
# encryption of data pakets. Should be at least 8
# bytes long. Maximum length is 32 characters.
#key=should_be_changed
# The shared password will be read from this file.
# Use either key or keyfile. Only the first 32
# characters will be used.
keyfile=/etc/mod-gearman/secret.key
# Path to the pidfile. Usually set by the init script
#pidfile=/var/run/mod-gearman.pid
# Default job timeout in seconds. Currently this value is only used for
# eventhandler. The worker will use the values from the core for host and
# service checks.
job_timeout=60
# Minimum number of worker processes which should
# run at any time.
min-worker=5
# Maximum number of worker processes which should
# run at any time. You may set this equal to
# min-worker setting to disable dynamic starting of
# workers. When setting this to 1, all services from
# this worker will be executed one after another.
max-worker=50
# Time after which an idling worker exists
# This parameter controls how fast your waiting workers will
# exit if there are no jobs waiting.
idle-timeout=30
# max-age is the threshold for discarding too old jobs. When a new job is older
# than this amount of seconds it will not be executed and just discarded. Set to
# zero to disable this check.
#max-age=0
# defines the rate of spawned worker per second as long
# as there are jobs waiting
spawn-rate=3
# defines the rate at which idle worker will be reduced
sink-rate=1
# Continue long running checks in background after this amount of seconds and work on next check.
# Set to 0 to disable. This setting controls how long a plugin may block a worker while waiting
# ex. on network timeouts.
backgrounding-threshold=30
# Set load limit based on number of CPUs. Will set load_limit1/5/15 unless those options are already set.
# No limit will be used when set to 0.
load_cpu_multi=2.5
# Set a limit based on the 1min load average. When exceding the load limit,
# no new worker will be started until the current load is below the limit.
# No limit will be used when set to 0.
#load_limit1=0
# Same as load_limit1 but for the 5min load average.
#load_limit5=0
# Same as load_limit1 but for the 15min load average.
#load_limit15=0
# Total used memory must not exceed limit before starting new worker (in percent).
mem_limit=70
# Use this option to show stderr output of plugins too.
# Default: yes
show_error_output=yes
# Defines the return code for timed out checks. Accepted return codes
# are 0 (Ok), 1 (Warning), 2 (Critical) and 3 (Unknown)
# Default: 3
#timeout_return=3
# Use dup_results_are_passive to set if the duplicate result send to the dupserver
# will be passive or active.
# Default is yes (passive).
#dup_results_are_passive=yes
# When embedded perl has been compiled in, you can use this
# switch to enable or disable the embedded perl interpreter.
enable_embedded_perl=on
# Default value used when the perl script does not have a
# "nagios: +epn" or "nagios: -epn" set.
# Perl scripts not written for epn support usually fail with epn,
# so its better to set the default to off.
use_embedded_perl_implicitly=off
# Cache compiled perl scripts. This makes the worker process a little
# bit bigger but makes execution of perl scripts even faster.
# When turned off, Mod-Gearman will still use the embedded perl
# interpreter, but will not cache the compiled script.
use_perl_cache=on
# path to mod_gearman_worker_epn.pl file which is used to execute
# and cache the perl scripts run by the embedded perl interpreter
#p1_file=./mod_gearman_worker_epn.pl
# Gearman connection timeout(in milliseconds) while submitting jobs to
# gearmand server
# Default is 5000
# gearman_connection_timeout=5000
# Security
# restrict_path allows you to restrict this worker to only execute plugins
# from these particular folders. Can be used multiple times to specify more
# than one folder.
#restrict_path=/usr/local/plugins/
# list of forbidden characters in command lines. Only active if 'restrict_path'
# is in use.
#restrict_command_characters=$&();<>`"'|
# internal checks improve check performance since they do not require any fork
# use internal negate
#internal_negate = 1
# use internal check_nsc_web plugin
#internal_check_nsc_web = 1
# use internal check_dummy plugin
#internal_check_dummy = 1
# Show worker identifier in result output
# Possible values:
# off: Do not show worker identifier. (default)
# on: The worker identifier is displayed at the beginning of the plugin output. E.g. "(worker: w1) Service is Running"
# pre_perfdata: The worker identifier is displayed at the end of the plugin output text, but before the perfdata. E.g. "Service is Running (worker: w1) | duration=10ms, version=1"
#
# Default is off
#worker_name_in_result=off
# Prometheus
# export prometheus metrics
#prometheus_server=127.0.0.1:9050
# Import conf.d folders to override default settings
#config=/etc/mod-gearman/worker.d/