@@ -185,22 +185,22 @@ The evaluation is done like this:
185
185
186
186
For example here is a cpu check on a linux server:
187
187
188
- {
189
- "check": {
190
- "interval": "10s",
191
- "apply_on": "linux",
188
+ check:
189
+ interval: 10s
190
+ apply_on: linux
192
191
193
- " ok_output" : "'OK: cpu is great: %s%%' % (100-{collector.cpustats.cpuall.%idle})",
192
+ ok_output: "'OK: cpu is great: %s%%' % (100-{collector.cpustats.cpuall.%idle})"
194
193
195
- " critical_if" : "{collector.cpustats.cpuall.%idle} < {configuration.thresholds.cpuidle.critical}",
196
- " critical_output" : "'Critical: cpu is too high: %s%%' % (100-{collector.cpustats.cpuall.%idle})",
194
+ critical_if: "{collector.cpustats.cpuall.%idle} < {configuration.thresholds.cpuidle.critical}"
195
+ critical_output: "'Critical: cpu is too high: %s%%' % (100-{collector.cpustats.cpuall.%idle})"
197
196
198
- " warning_if" : "{collector.cpustats.cpuall.%idle} < {configuration.thresholds.cpuidle.warning}",
199
- " warning_output" : "'Warning: cpu is very high: %s%%' % (100-{collector.cpustats.cpuall.%idle})",
197
+ warning_if: "{collector.cpustats.cpuall.%idle} < {configuration.thresholds.cpuidle.warning}"
198
+ warning_output: "'Warning: cpu is very high: %s%%' % (100-{collector.cpustats.cpuall.%idle})"
200
199
201
- "thresholds" : {"cpuidle" : { "warning": 5, "critical": 1} }
202
- }
203
- }
200
+ thresholds :
201
+ cpuidle :
202
+ warning: 5
203
+ critical: 1
204
204
205
205
206
206
@@ -213,19 +213,15 @@ The parameter for this is:
213
213
214
214
Here is an example
215
215
216
- {
217
- "check": {
218
- "apply_on": "linux",
219
- "script": "$nagiosplugins$/check_mailq -w $mailq.warning$ -c $mailq.critical$",
220
- "interval": "60s",
216
+ check:
217
+ apply_on: linux
218
+ script: "$nagiosplugins$/check_mailq -w $mailq.warning$ -c $mailq.critical$"
219
+ interval: 60s
221
220
222
- "mailq" : {
223
- "warning": 1,
224
- "critical": 2
225
- }
226
- }
227
- }
228
-
221
+ mailq:
222
+ warning: 1
223
+ critical: 2
224
+
229
225
230
226
NOTE: the $$ evaluation is not matching the previous checks, we will fix it in a future version but it will break the current version configuration.
231
227
@@ -236,17 +232,19 @@ You can be notified about check state changed with handlers. currently 2 are man
236
232
237
233
You must define it in your local configuration:
238
234
239
- {
240
- "handler": {
241
- "type": "mail",
242
- "severities": [ "ok", "warning", "critical", "unknown" ],
243
- "contacts": [ "[email protected] " ],
244
-
245
- "smtp_server": "localhost",
246
- "subject_template": "email.subject.tpl",
247
- "text_template": "email.text.tpl"
248
- }
249
- }
235
+ handler:
236
+ type: mail
237
+ severities:
238
+ - ok
239
+ - warning
240
+ - critical
241
+ - unknown
242
+ contacts:
243
+
244
+
245
+ smtp_server: localhost
246
+ subject_template: "email.subject.tpl"
247
+ text_template: "email.text.tpl"
250
248
251
249
* type: email
252
250
* severities: raise this handler only for this new states
@@ -293,11 +291,8 @@ You can export all your nodes informations (new, deleted or change node) into yo
293
291
294
292
You must add in the agent installed on your shinken arbiter daemon the following local configuration:
295
293
296
- {
297
- "shinken": {
298
- "cfg_path": "/etc/shinken/agent"
299
- }
300
- }
294
+ shinken:
295
+ cfg_path: "/etc/shinken/agent"
301
296
302
297
* cfg_path: a directory where all your nodes will be sync as shinken hosts configuration (cfg files)
303
298
@@ -312,13 +307,11 @@ If you enable the DNS interface for your agent, it will start an internal DNS se
312
307
313
308
You must define a dns object in your local configuration to enable this interface:
314
309
315
- {
316
- "dns":{
317
- "enabled" : true,
318
- "port" : 6766,
319
- "domain" : ".kunai"
320
- }
321
- }
310
+ dns:
311
+ enabled : true
312
+ port : 6766
313
+ domain : ".kunai"
314
+
322
315
323
316
* enabled: start or not the listener
324
317
* port: UDP port to listen for UDP requests
@@ -346,19 +339,16 @@ The statsd daemon part will agregate counters for 10s and will then export the m
346
339
347
340
In order to enable the statsd listener, you must define the statsd in your local configuration:
348
341
349
- {
350
- "statsd": {
351
- "enabled" : true,
352
- "port" : 8125,
353
- "interval" : 10
354
- }
355
- }
356
-
342
+ statsd:
343
+ enabled : true
344
+ port : 8125
345
+ interval : 10
346
+
357
347
* enabled: launch or not the statsd listener
358
348
* port: UDP port to listen
359
349
* interval: store metrics into memory for X seconds, then export them into graphite for storing
360
350
361
- ** TODO** : change the ts tag that enable this feature to real * role*
351
+ ** TODO** : change the ts tag that enable this feature to real * role* /addons
362
352
363
353
364
354
### Store your metrics for long term into Graphite
@@ -367,14 +357,11 @@ You can store your metrics into a graphite like system, that will automatically
367
357
368
358
In order to enable the graphite system, you must declare a graphite object in your local configuration:
369
359
370
- {
371
- "graphite": {
372
- "enabled" : true,
373
- "port" : 2003,
374
- "udp" : true,
375
- "tcp" : true
376
- }
377
- }
360
+ graphite:
361
+ enabled : true
362
+ port : 2003
363
+ udp : true
364
+ tcp : true
378
365
379
366
* enabled: launch or not the graphite listener
380
367
* port: TCP and/or UDP port to listen metrics
@@ -394,12 +381,9 @@ You can get notified about a node change (new node, deleted node or new tag or c
394
381
395
382
All you need is to enable it on your local node configuration:
396
383
397
- {
398
- "websocket": {
399
- "enabled" : true,
400
- "port" : 6769
401
- }
402
- }
384
+ websocket:
385
+ enabled : true
386
+ port : 6769
403
387
404
388
* enabled: start or not the websocket listener
405
389
* port: which TCP port to listen for the websocket connections
0 commit comments