/
shinken-specific.cfg
executable file
·1000 lines (896 loc) · 39.1 KB
/
shinken-specific.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
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
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
################################################################################
# shinken-specifics.cfg - Main configuration file for Shinken Processes
#===============================================================================
# This sample configuration file is used to define a simple environment:
# - 1 arbiter = reads the configuration and dispatches it to all
# others
# - 1 scheduler = schedules the checks, but doesn't launch them
# - 1 poller = launches the checks
# - 1 reactionner = sends the notifications
# - 1 broker = gives jobs to modules (Modules export data such as
# logs, status.dat, mysql export, etc.)
# - broker's modules = executes the jobs given by the broker
#
# It is a "Nagios equivalent" configuration, but with more performance.
# For high-availability, see other sample files.
#
# This file has three sections for easier reading:
# - Section_1 = Shinken daemon process definitions
# - S1_Arbiter, S1_Scheduler, S1_Poller, S1_Broker, S1_Reactionner, S1_Receiver
# - Section_2_1 = Modules to configure
# - Section_2_2 = Modules (configuration probably not needed)
# - Section_2_3 = Modules (no configuration needed)
# - Section_3 = Realm definitions
# (You can use section names to jump there)
#===============================================================================
# Quickstart: http://www.shinken-monitoring.org/wiki/configure_shinken
# Reference: http://www.shinken-monitoring.org/wiki/official/configuringshinken-config
################################################################################
################################################################################
# Section_1 - Shinken Daemon Process Definitions
################################################################################
#===============================================================================
# ARBITER (S1_Arbiter)
#===============================================================================
# Description: The Arbiter is responsible for:
# - Loading, manipulating and dispatching the configuration
# - Validating the health of all other Shinken daemons
# - Issuing global directives to Shinken daemons (kill, activate-spare, etc.)
# http://www.shinken-monitoring.org/wiki/official/configuringshinken/configobjects/arbiter
#===============================================================================
# IMPORTANT: If you use several arbiters you MUST set the host_name on each
# servers to its real DNS name ('hostname' command).
#===============================================================================
define arbiter {
arbiter_name Arbiter-Master
#host_name node1 ; CHANGE THIS if you have several Arbiters
address localhost ; DNS name or IP
port 7770
spare 0 ; 1 = is a spare, 0 = is not a spare
## Interesting modules:
# - CommandFile = Open the named pipe nagios.cmd
# - Mongodb = Load hosts from a mongodb database
# - PickleRetentionArbiter = Save data before exiting
# - NSCA = NSCA server
# - VMWare_auto_linking = Lookup at Vphere server for dependencies
# - GLPI = Import hosts from GLPI
# - TSCA = TSCA server
# - MySQLImport = Load configuration from a MySQL database
# - WS_Arbiter = WebService for pushing results to the arbiter
# - Collectd = Wait collectd data, and take perfdata for
# services from it.
modules
#modules CommandFile, Mongodb, NSCA, VMWare_auto_linking, WS_Arbiter, Collectd, Landscape
## Uncomment these lines in a HA architecture so the master and slaves know
## how long they may wait for each other.
#timeout 3 ; Ping timeout
#data_timeout 120 ; Data send timeout
#max_check_attempts 3 ; If ping fails N or more, then the node is dead
#check_interval 60 ; Ping node every minutes
}
#===============================================================================
# SCHEDULER (S1_Scheduler)
#===============================================================================
# The scheduler is a "Host manager". It gets the hosts and their services,
# schedules the checks and transmit them to the pollers.
# Description: The scheduler is responsible for:
# - Creating the dependancy tree
# - Scheduling checks
# - Calculating states
# - Requesting actions from a reactionner
# - Buffering and forwarding results its associated broker
# http://www.shinken-monitoring.org/wiki/official/configuringshinken/configobjects/scheduler
#===============================================================================
define scheduler {
scheduler_name scheduler-1 ; Just the name
address localhost ; IP or DNS address of the daemon
port 7768 ; TCP port of the daemon
## Optional
spare 0 ; 1 = is a spare, 0 = is not a spare
weight 1 ; Some schedulers can manage more hosts than others
timeout 3 ; Ping timeout
data_timeout 120 ; Data send timeout
max_check_attempts 3 ; If ping fails N or more, then the node is dead
check_interval 60 ; Ping node every minutes
## Interesting modules that can be used:
# - PickleRetention = Save data before exiting in flat-file
# - MemcacheRetention = Same, but in a MemCache server
# - RedisRetention = Same, but in a Redis server
# - MongodbRetention = Same, but in a MongoDB server
# - NagiosRetention = Read retention info from a Nagios retention file
# (does not save, only read)
modules
#modules PickleRetention
## Advanced Features
# Realm is for multi-datacenters
realm All
# Skip initial broks creation. Boot fast, but some broker modules won't
# work with it!
skip_initial_broks 0
# In NATted environments, you declare each satellite ip[:port] as seen by
# *this* scheduler (if port not set, the port declared by satellite itself
# is used)
#satellitemap poller-1=1.2.3.4:1772, reactionner-1=1.2.3.5:1773, ...
}
#===============================================================================
# POLLER (S1_Poller)
#===============================================================================
# Description: The poller is responsible for:
# - Active data acquisition
# - Local passive data acquisition
# http://www.shinken-monitoring.org/wiki/official/configuringshinken/configobjects/poller
#===============================================================================
define poller {
poller_name poller-1
address localhost
port 7771
## Optional
manage_sub_realms 0 ; Does it take jobs from schedulers of sub-Realms?
min_workers 0 ; Starts with N processes (0 = 1 per CPU)
max_workers 0 ; No more than N processes (0 = 1 per CPU)
processes_by_worker 256 ; Each worker manages N checks
polling_interval 1 ; Get jobs from schedulers each 1 second
timeout 3 ; Ping timeout
data_timeout 120 ; Data send timeout
max_check_attempts 3 ; If ping fails N or more, then the node is dead
check_interval 60 ; Ping node every minutes
## Interesting modules that can be used:
# - NrpeBooster = Makes the check_nrpe binary useless. Therefore it
# enhance performances when there are lot of NRPE
# calls.
# - CommandFile = Allow the poller to read a nagios.cmd named pipe.
# This permits the use of distributed check_mk checks
# should you desire it.
modules
#modules NrpeBooster, CommandFile
## Advanced Features
#passive 0 ; For DMZ monitoring, set to 1 so the connections
; will be from scheduler -> poller.
#poller_tags None
realm All
}
#===============================================================================
# BROKER (S1_Broker)
#===============================================================================
# Description: The broker is responsible for:
# - Exporting centralized logs of all Shinken daemon processes
# - Exporting status data
# - Exporting performance data
# - Exposing Shinken APIs:
# - Status data
# - Performance data
# - Configuration data
# - Command interface
# http://www.shinken-monitoring.org/wiki/official/configuringshinken/configobjects/broker
#===============================================================================
define broker {
broker_name broker-1
address localhost
port 7772
spare 0
## Optional
manage_arbiters 1 ; Take data from Arbiter. There should be only one
; broker for the arbiter.
manage_sub_realms 1 ; Does it take jobs from schedulers of sub-Realms?
timeout 3 ; Ping timeout
data_timeout 120 ; Data send timeout
max_check_attempts 3 ; If ping fails N or more, then the node is dead
check_interval 60 ; Ping node every minutes
## Modules
# Default: Livestatus, Simple-log, WebUI
# Other interesting modules that can be used:
# - PickleRetentionBroker = Save data when quitting
# - ToNdodb_Mysql = NDO DB support
# - NPCDMOD = Use the PNP addon
# - Graphite-Perfdata = Use a Graphite time series DB for perfdata
# - WebUI = Shinken Web interface
# - glpidb = Save data in GLPI MySQL database
modules Livestatus, Simple-log, WebUI
## Advanced
realm All
}
#===============================================================================
# REACTIONNER (S1_Reactionner)
#===============================================================================
# Description: The reactionner is responsible for:
# - Executing notification actions
# - Executing event handler actions
# http://www.shinken-monitoring.org/wiki/official/configuringshinken/configobjects/reactionner
#===============================================================================
define reactionner {
reactionner_name reactionner-1
address localhost
port 7769
spare 0
## Optionnal
manage_sub_realms 0 ; Does it take jobs from schedulers of sub-Realms?
min_workers 1 ; Starts with N processes (0 = 1 per CPU)
max_workers 15 ; No more than N processes (0 = 1 per CPU)
polling_interval 1 ; Get jobs from schedulers each 1 second
timeout 3 ; Ping timeout
data_timeout 120 ; Data send timeout
max_check_attempts 3 ; If ping fails N or more, then the node is dead
check_interval 60 ; Ping node every minutes
## Modules
modules
## Advanced
realm All
}
#===============================================================================
# REACTIONNER (S1_Reactionner)
# Sample of an Android SMS reactionner
#===============================================================================
# 2 requirements:
# - "modules AndroidSMS" = in order to load SMS sending code
# - "reactionner_tags android_sms" = so ONLY commands with this tag will be
# sent to this reactionner, not mail things.
#===============================================================================
#define reactionner {
# reactionner_name reactionner-Android
# address WIFI-IP-OF-YOUR-ANDROID-PHONE
# port 7769
# spare 0
# ## Optional
# manage_sub_realms 0 ; Does it take jobs from schedulers of sub-Realms?
# min_workers 1 ; Starts with N processes (0 = 1 per CPU)
# max_workers 15 ; No more than N processes (0 = 1 per CPU)
# polling_interval 1 ; Get jobs from schedulers each 1 second
# timeout 3 ; Ping timeout
# data_timeout 120 ; Data send timeout
# max_check_attempts 3 ; If ping fails N or more, then the node is dead
# check_interval 60 ; Ping node every minutes
# ## Modules
# modules AndroidSMS
# reactionner_tags android_sms
# ## Advanced Feature
# realm All
#}
#===============================================================================
# RECEIVER (S1_Receiver)
#===============================================================================
# The receiver manages passive information. It's just a "buffer" which will
# load passive modules (like NSCA) and be read by the arbiter to dispatch data.
#===============================================================================
define receiver {
receiver_name receiver-1
address localhost
port 7773
spare 0
## Optional
timeout 3
data_timeout 120
max_check_attempts 3
check_interval 60
## Modules
#modules NSCA, CommandFile
modules
## Advanced Feature
direct_routing 0 ; If enabled, it will directly send commands to the
; schedulers if it know about the hostname in the
; command.
realm All
}
################################################################################
# Section_2_1 - Modules to configure
################################################################################
# Note: Modules can only be defined in a compatible Shinken daemon process.
#===============================================================================
## Module: WebUI
## Loaded by: Broker
# The Shinken web interface and integrated web server.
define module {
module_name WebUI
module_type webui
host 0.0.0.0 ; All interfaces = 0.0.0.0
port 7767
auth_secret CHANGE_ME ; CHANGE THIS or someone could forge
; cookies!!
allow_html_output 0 ; Allow or not HTML chars in plugins output.
; WARNING: Allowing can be a security issue.
max_output_length 100 ; Maximum output length for plugin output in webui
manage_acl 1 ; Use contacts ACL. 0 allow actions for all.
play_sound 0 ; Play sound on new non-acknowledged problems.
#login_text Welcome on Shinken WebUI ; Text in the login form.
## Modules for WebUI
# - Apache_passwd = Use an htpasswd file for auth backend.
# - ActiveDir_UI = Use AD for auth backend (and retrieve photos).
# - Cfg_password = Use the password setted in Shinken contact for auth.
# - PNP_UI = Use PNP graphs in the UI.
# - GRAPHITE_UI = Use graphs from Graphite time series database.
# - Mongodb = Save user preferences to a Mongodb database
# - SQLitedb = Save user preferences to a SQLite database
modules Apache_passwd, ActiveDir_UI, Cfg_password, PNP_UI, Mongodb
## Advanced Options
# Don't use them as long as you don't know what you are doing!
#http_backend auto ; Choice is: auto, wsgiref, cherrypy,
; paste, tornado, twisted or gevent.
; Leave auto to find the best available.
#remote_user_enable 1 ; If WebUI is behind a web server which
; has already authentified user, enable.
#remote_user_variable X_Remote_User ; Set to the HTTP header containing
; the authentificated user s name, which
; must be a Shinken contact.
}
## Module: ActiveDir_UI
## Loaded by: WebUI
## Usage: Uncomment and set your value in ldap_uri
# Check authentification for WebUI using an Active Directory server.
define module {
module_name ActiveDir_UI
module_type ad_webui
#ldap_uri ldaps://myserver
username user
password password
basedn DC=google,DC=com
# For mode you can switch between ad (active dir)
# and openldap
mode ad
}
## Module: OpenLDAP_UI
## Loaded by: WebUI
## Usage: Uncomment and set your value in ldap_uri
# Check authentification for WebUI using an OpenLDAP server.
define module {
module_name OpenLDAP_UI
module_type openldap_webui
#ldap_uri ldaps://myserver
username user
password password
basedn DC=google,DC=com
}
## Module: Apache_passwd
## Loaded by: WebUI
# Check authentification using an Apache password file.
define module {
module_name Apache_passwd
module_type passwd_webui
passwd /etc/shinken/htpasswd.users ; Absolute path only!
}
## Module: Graphite-Perfdata
## Loaded by: Broker
# Export host and service performance data to Graphite carbon process.
# Graphite is a time series database with a rich web service interface, viewed
# as a modern alternative to RRDtool. http://graphite.wikidot.com/start
define module {
module_name Graphite-Perfdata
module_type graphite_perfdata
host localhost
port 2003
# Optionally specify a source identifier for the metric data sent to
# Graphite. This can help differentiate data from multiple sources for the
# same hosts. HostA.GRAPHITE_DATA_SOURCE.service
# You MUST set the same value in the graphite_perfdata and GRAPHITE_UI module
# configuration.
#graphite_data_source shinken
}
## Module: GRAPHITE_UI
## Loaded by: WebUI
# Use Graphite graphs in the WebUI, based on default or graphite URL API
# templates.
define module {
module_name GRAPHITE_UI
module_type graphite_webui
uri http://YOURSERVERNAME/ ; Set your Graphite URI. Note : YOURSERVERNAME will be
; changed by your broker hostname
templates_path /usr/local/shinken/share/templates/graphite/
# Optionally specify a source identifier for the metric data sent to
# Graphite. This can help differentiate data from multiple sources for the
# same hosts. HostA.GRAPHITE_DATA_SOURCE.service
# You MUST set the same value in the graphite_perfdata and GRAPHITE_UI module
# configuration.
#graphite_data_source shinken
}
## Module: PNP_UI
## Loaded by: WebUI
# Use PNP graphs in the WebUI
define module {
module_name PNP_UI
module_type pnp_webui
uri http://YOURSERVERNAME/pnp4nagios/ ; Set your PNP4Nagios URI. Note : YOURSERVERNAME will be
; changed by your broker hostname
}
## Module: ToNdodb_Mysql
## Loaded by: Broker
# Alternate web frontend. The NDO/MySQL module for use with NagVis or Centreon
# web frontend and configuration management.
define module {
module_name ToNdodb_Mysql
module_type ndodb_mysql
host localhost ; Database server name or IP
port 3306 ; Server listening port
database ndo ; Database name
prefix nagios_ ; prefix for ndo tables
user root ; Database user
password root
character_set utf8 ; Optional. Default is utf8.
# If you want to mix Shinken AND Nagios/icinga in the same DB enable this.
# It will use in database instance_id, and not use the shinken ones
# override/delete other ones. It can slow a little the performance.
synchronise_database_id 0
}
## Module: ToNdodb_Oracle
## Loaded by: Broker
# Alternate web frontend. To use Shinken with Icinga web front-end (or for DBAs
# who don't like MySQL!)
define module {
module_name ToNdodb_Oracle
module_type ndodb_oracle
database XE ; Database name (Listener, in fact)
user system ; User to connect
password password
# oracle_home is optional, but it can be useful:
oracle_home /usr/lib/oracle/xe/app/oracle/product/10.2.0/server
}
## Module: ToMerlindb_Mysql
## Loaded by: Broker
# Alternate web frontend. Export data for an op5 (Ninja web front-end MySQL
# database)
define module {
module_name ToMerlindb_Mysql
module_type merlindb
backend mysql ; Backend to use
host localhost ; Database server name or IP
database merlin ; Database name
user root ; Database user
password root
character_set utf8 ; Optional. Default is utf8
}
## Module: ToMerlindb_Sqlite
## Loaded by: Broker
## DEPRECATED!
# Alternate web frontend. Export data for an op5 (Ninja web front-end SQLite
# database)
#define module {
# module_name ToMerlindb_Sqlite
# module_type merlindb
# backend sqlite
# database_path /tmp/merlindb.sqlite ; Absolute path to the sqlite file
#}
## Module: ToCouchdb
## Loaded by: Broker
## Not Commonly Used! : DEPRECATED
# NoSQL database export. Mongodb is the preferred choice via Livestatus API module.
#define module {
# module_name ToCouchdb
# module_type couchdb
# host localhost
# user root
# password root
#}
## Module: Livestatus
## Loaded by: Broker
# The LIVESTATUS API makes internal Shinken data available via the network
# using an SQL-like syntax. The API supports various access methods,
# authentication and sophisticated performance options. The premier interface
# to Shinken internal host and service states, historical data, performance
# data, configuration data, comments, maintenance periods, etc.
define module {
module_name Livestatus
module_type livestatus
host * ; * = listen on all configured IP addresses
port 50000 ; port to listen
#socket /usr/local/shinken/var/rw/live ; If a Unix socket is required
## Available modules:
# - logsqlite: send historical logs to a local sqlite database
# - mongologs: send historical logs to a mongodb database
# - nulllogs : send historical logs to a black hole
modules logsqlite
#debug /tmp/ls.debug ; Enable only for debugging this module
#debug_queries 0 ; Set to 1 to dump queries/replies too (very verbose)
}
## Module: logsqlite
## Loaded by: Livestatus
# Put the Livestatus logs in an sqlite database, and so LS can query them.
define module {
module_name logsqlite
module_type logstore_sqlite
database_file /usr/local/shinken/var/livelogs.db
# Prefer SQL queries if available instead of internal in-memory lookups
# Some corner cases may return invalid or no data. Defaults to 0 if unset.
#use_aggressive_sql 1 ; Set to 1 for large installations
# Only use this module to read log. Useful if you load balance
# your livestatus activity over severals livestatus broker module.
# Defaults to 0 if unset
#read_only 1 ; Read only logstore
max_logs_age 3m ; d = days, w = weeks, m = months, y = years
}
## Module: mongologs
## Loaded by: Livestatus
# Put the Livestatus logs in an mongodb database, so LS can query them.
define module {
module_name mongologs
module_type logstore_mongodb
mongodb_uri mongodb://localhost/?safe=true ; Set to your value
# If you are running a MongoDB cluster (called a “replica set” in MongoDB),
# you need to specify it's name here.
# With this option set, you can also write the mongodb_uri as a comma-separated
# list of host:port items. (But one is enough, it will be used as a “seed”)
#replica_set
#database
#collection
#max_logs_age
}
## Module: nulllogs
## Loaded by: Livestatus
# Put the Livestatus logs in a black hole, so LS can not query them.
# Useful if you run a livestatus backend dedicated to nagvis in addition
# to your regular livestatus backend.
define module {
module_name nulllogs
module_type logstore_null
}
## Module: NPCDMOD
## Loaded by: Broker
# Module to send host and service perfdata to a NPCD daemon, which makes the
# data available to PNP4Nagios.
define module {
module_name NPCDMOD
module_type npcdmod
config_file /usr/local/pnp4nagios/etc/npcd.cfg ; Set to your value
}
## Module : Canopsis
## Loaded by: Broker
# Canospis hypervisor for event management. - Experimental -
define module{
module_name Canopsis
module_type canopsis
host localhost ; host to connect to
port 5672 ; rabbitmq port
user guest ; must be changed
password guest ; must be changed
virtual_host canopsis
exchange_name canopsis.events
identifier shinken-1 ; need a unique indentifier because there should be more than on shinken in canopsis
maxqueuelength 50000 ; maximum event stored in queue when connection with canopsis is lost
queue_dump_frequency 300 ; frequency (in seconds) on wich the queue is saved for retention
}
## Module: MongodbRetention
## Loaded by: Scheduler
# Retention file to keep state between process restarts.
define module {
module_name MongodbRetention
module_type mongodb_retention
uri mongodb://localhost/?safe=true
database shinken
}
## Module: MemcacheRetention
## Loaded by: Scheduler
# Retention file to keep state between process restarts in resident memory.
# Data loss occurs if the server restarts and Memcache replication is not
# enabled between two memcached instances.
define module {
module_name MemcacheRetention
module_type memcache_retention
server 127.0.0.1
port 11211
}
## Module: RedisRetention
## Loaded by: Scheduler
# Retention file to keep state between process restarts in resident memory.
# Data loss occurs if the server restarts and Redis replication is not enabled
# between two Redis instances.
define module {
module_name RedisRetention
module_type redis_retention
server 127.0.0.1
}
## Module: GLPI
## Loaded by: Arbiter
# It loads configuration from GLPI web application.
# All configuration read from the DB will be added to those read from the
# standard flat files. -- Be careful of duplicated names!
# GLPI needs Webservices and Monitoring plugins installed and enabled.
define module {
module_name GLPI
module_type glpi
uri http://localhost/glpi/plugins/webservices/xmlrpc.php
login_name glpi
login_password glpi
tag
}
## Module: glpidb
## Loaded by: Broker
# Export data to the GLPI database from a Shinken broker.
define module {
module_name glpidb
module_type glpidb
host localhost ; GLPI database server name or IP
database glpi ; Database name
user root ; Database user
password root
}
## Module: Landscape
## Loaded by: Arbiter
# Used to load hosts from the Landscape (Ubuntu) website
define module {
module_name Landscape
module_type landscape_import
# Configure your REAL key and secret from Landscape
key PAAAB2CILT80I0ZA0999
secret GGtWAAAzEItz0utWUeCe9BJKIYWX/hdSbA6YCHHH
default_template generic-host ; if the host is not tagged, use this one
# If you are using a specific certificate for landscape_api
#ca /path/to.ca.cert
# If you need a proxy to access https://landscape.canonical.com/api/
#https_proxy http://user:secret@myproxy.com:3128
}
## Module: Mongodb
## Loaded by: Arbiter, WebUI
# In Arbiter: Read objects in a mongodb database (like hosts or services).
# In WebUI: Save/read user preferences.
define module {
module_name Mongodb
module_type mongodb
uri mongodb://localhost/?safe=true
database shinken
}
## Module: SQLite
## Loaded by: WebUI
# In WebUI: Save/read user preferences
define module {
module_name SQLitedb
module_type sqlitedb
uri /usr/local/shinken/var/webui.db
}
## Module: NSCA
## Loaded by: Arbiter, Receiver
# Receive check results sent from send_nsca scripts.
define module {
module_name NSCA
module_type nsca_server
host *
port 5667
encryption_method 1
password helloworld
}
## Module: TSCA
## Loaded by: Arbiter, Receiver
# Receive check results using TSCA, a thrift interface.
define module {
module_name TSCA
module_type tsca_server
host *
port 9090
}
## Module: WS_Arbiter
## Loaded by: Arbiter, Receiver
# WebService module for the Arbiter and Receiver so you can send (POST) passive
# checks to it :)
define module {
module_name WS_Arbiter
module_type ws_arbiter
host 0.0.0.0
port 7760
username anonymous ; If you want auth, set username and password.
#password secret
}
## Module: VMWare_auto_linking
## Loaded by: Arbiter
# Follow your hosts in a virtual infrastructure.
# Mapping dependancies following VMotions. With this module, you can just
# connect to vcenter from time to time and update dependencies.
# Arbiter restart required to apply updated configurations.
define module {
module_name VMWare_auto_linking
module_type hot_dependencies
mapping_file /tmp/vmware_mapping_file.json
mapping_command /usr/local/shinken/libexec/link_vmware_host_vm.py -x '/usr/local/shinken/libexec/check_esx3.pl' -V 'vcenter.mydomain.com' -u 'admin' -p 'secret' -r 'lower|nofqdn' -o /tmp/vmware_mapping_file.json
mapping_command_interval 60 ; Optional
mapping_command_timeout 300 ; Optional
#debug 1 ; For debug only (quite verbose in large environments)
}
## Module: External_auto_linking
## Loaded by: Arbiter
# Another way to update dependencies is to update a flat file.
# See some examples to do that in external_mapping.py Python script.
define module {
module_name External_auto_linking
module_type hot_dependencies
mapping_file /tmp/external_mapping_file.json
mapping_command /usr/local/shinken/libexec/external_mapping.py -i /tmp/shinken_flat_mapping -o /tmp/external_mapping_file.json
mapping_command_interval 60 ; Optional
mapping_command_timeout 300 ; Optional
}
## Module: HackCommandsPollerTag
## Loaded by: Arbiter
# Replace on-the-fly a command's poller tag by another.
# Useful when you use a fixed configuration tool that doesn't allow you to
# configure poller_tag.
define module {
module_name HackCommandsPollerTag
module_type hack_commands_poller_tag
cmd_line_match (.*)check_esx3(.*)
poller_tag esx3
}
## Module: HackPollerTagByMacros
## Loaded by: Arbiter
# Replace on-the-fly hosts and services' poller tag by searching for a custom
# macro.
# Useful when you use a fixed configuration tool that doesn't allow you to
# configure poller_tag.
define module {
module_name HackPollerTagByMacros
module_type hack_poller_tag_by_macros
host_macro_name _poller_tag
service_macro_name _poller_tag
}
## Module: MySQLImport
## Loaded by: Arbiter
# Hosts, Services, Contacts and Dependencies configuration can be pulled from a
# MySQL database.
# All configuration read from the DB will be added to those read from the
# standard flat files. -- Be careful of duplicated names!
# You can easily use an existing database, you just have to define the queries
# to suit your database.
# It can be a useful module to use for HA too! :)
define module {
module_name MySQLImport
module_type mysql_import
host localhost
database supervision
login root
password pass
reqhosts SELECT host_name, alias, realm, address, template AS 'use' FROM hosts
reqservices SELECT host_name, service_description, normal_check_interval, check_command, template AS 'use' FROM services
reqcontacts SELECT contact_name, email, template AS 'use' FROM contacts
reqcontactgroups SELECT contactgroup_name, members FROM contactgroups
reqhostdependencies SELECT host_name, dependent_host_name, notification_failure_criteria FROM hostdependencies
reqservicedependencies SELECT host_name, service_description, dependent_host_name, dependent_service_description, execution_failure_criteria, notification_failure_criteria FROM servicedependencies
reqrealms SELECT realm_name, realm_members, `default` FROM realms
reqschedulers SELECT scheduler_name, address, port, spare, realm, modules FROM schedulers
reqpollers SELECT poller_name, address, port, spare, realm, manage_sub_realms, poller_tags, modules FROM pollers
reqreactionners SELECT reactionner_name, address, port, spare, realm, manage_sub_realms, modules FROM reactionners
reqbrokers SELECT broker_name, address, port, spare, realm, manage_sub_realms, modules FROM brokers
reqreceivers SELECT receiver_name, address, port, spare, realm, manage_sub_realms, modules FROM receivers
}
## Module: IpTag
## Loaded by: Arbiter
# Will modify host definitions by looking at host address and, if its IP is in
# the range defined, it will apply the "property value" just like if that line
# was set in the host definition.
# Method : replace or append.
# - replace = put the value if not another one is in place
# - append = add with a comma (,) if a value already exist
define module{
module_name IpTag
module_type ip_tag
ip_range 127.0.0.0/30
method replace ; replace or append
property poller_tag
value LOCAL
}
################################################################################
# Section_2_2 - Modules (configuration probably not needed)
################################################################################
## Module: Simple-log
## Loaded by: Broker
# Centralized log management for all Shinken processes. This module consumes
# log broks (inter process messages) and exports them to a flat-file local to
# where the active broker is running.
define module {
module_name Simple-log
module_type simple_log
path nagios.log
archive_path archives/
}
## Module: Status-dat
## Loaded by: Broker
# Legacy module for the old Nagios interface. For migration purposes only, as
# this is one reason Nagios is so slow.
define module {
module_name Status-Dat
module_type status_dat
status_file status.dat
object_cache_file objects.cache
status_update_interval 15 ; Update status.dat every N seconds
}
## Module: Service-Perfdata
## Loaded by: Broker
# Export services perfdata to a flat file. For Centreon or PerfParse. This does
# not scale and should only be used for small installations.
define module {
module_name Service-Perfdata
module_type service_perfdata
path service-perfdata
#mode a ; Optional. a = append, w = overwrite, p = pipe
#template $LASTSERVICECHECK$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$\t$SERVICESTATE$\n
}
## Module: Host-Perfdata
## Loaded by: Broker
# Export host perfdata to a flat file. For Centreon or PerfParse. This does not
# scale and should only be used for small installations.
define module {
module_name Host-Perfdata
module_type host_perfdata
path host-perfdata
#mode a ; Optional. a = append, w = overwrite, p = pipe
#template $LASTHOSTCHECK$\t$HOSTNAME$\t$HOSTOUTPUT$\t$HOSTSTATE$\t$HOSTPERFDATA$\n
}
## Module: PickleRetention
## Loaded by: Scheduler
# Retention file to keep state between process restarts.
define module {
module_name PickleRetention
module_type pickle_retention_file_generic
path /tmp/retention.dat
}
## Module: PickleRetentionBroker
## Loaded by: Broker
# Retention file to keep state between process restarts.
define module {
module_name PickleRetentionBroker
module_type pickle_retention_file_generic
path /tmp/retention_broker.dat
}
## Module: PickleRetentionArbiter
## Loaded by: Arbiter
# Retention file to keep state between process restarts.
define module {
module_name PickleRetentionArbiter
module_type pickle_retention_file_generic
path /tmp/retention_arbiter.dat
}
## Module: NagiosRetention
## Loaded by: Scheduler
# Read retention info from a Nagios retention file (does not save, only read)
define module {
module_name NagiosRetention
module_type nagios_retention_file
path /tmp/retention-nagios.dat
}
## Module: CommandFile
## Loaded by: Poller, Arbiter, Receiver
# Receive passive host and service results, typically from check_mk plugins.
# No other commands or inputs accepted (Restricted to host and service results)
define module {
module_name CommandFile
module_type named_pipe
command_file rw/nagios.cmd
}
################################################################################
# Section_2_3 - Modules (no configuration needed)
################################################################################
## Module: NrpeBooster
## Loaded by: Poller
## Usage: Tag commands with "module_type nrpe_poller"
# NRPE commands tagged with nrpe_poller as module_type will be managed by this
# module. It will bypass the launch of check_nrpe binary, and will do the
# connection itself. You should not use check_nrpe binary with Shinken.
define module {
module_name NrpeBooster
module_type nrpe_poller
}
## Module: Syslog
## Loaded by: Broker
# Send all logs to system's Syslog
# Send all logs to a local syslog server. Support for remote syslog can be
# implemented if requested. Just lookup the syslog module source code, it's
# easy to modify. Use for example with Splunk Molog, Logstash or other log
# management and analysis system.
define module {
module_name Syslog
module_type syslog
}
## Module: Cfg_password
## Loaded by: WebUI
# Check authentification using password parameter in contact definition.
define module {
module_name Cfg_password
module_type cfg_password_webui
}
## Module: AndroidSMS
## Loaded by: Reactionner
# Reactionner can be launched on an Android device and be used to send SMS.
define module {
module_name AndroidSMS
module_type android_sms
}
################################################################################
# Section_3 - Realm definitions
################################################################################
# Very advanced feature for multisite management.
# Read the docs VERY CAREFULLY before changing these settings :)
define realm {
realm_name All
default 1
}