1 #This config file defines Shinken specific objects like
4 #This file can be used for defining a simple environement :
5 #*one scheduler that schedules the checks (but doesn't launch them)
6 #*one poller (that launches the checks)
7 #*one reactionner (that sends the notifiations)
8 #*one broker (that gives jobs to modules. Modules export data like logs, status.dat, mysql export, etc etc)
9 #*some of the brokers modules (that do the jobs)
10 #*one arbiter (that reads the configuration and dispatches it to all others)
12 #So there is no high availability here, just a simple "Nagios equivalent" (but with
13 #more perf and less code! )
15 #The scheduler is a "Host manager". It gets the hosts and theirs
16 #services and it schedules the checks for the pollers.
18 scheduler_name scheduler-1 ; just the name
19 address localhost ; ip or dns address of the daemon
20 port 7768 ; tcp port of the daemon
23 spare 0 ; (0 = not a spare, 1 = is spare)
24 weight 1 ; (some schedulers can manage more hosts than others)
25 timeout 3 ; 'ping' timeout
26 data_timeout 120 ; 'data send' timeout
27 max_check_attempts 3 ; if at least max_check_attempts ping failed, the node is DEAD
28 # modules PickleRetention
29 # Interesting modules :
30 # PickleRetention : Save data before exiting in flat file
31 # MemcacheRetention : Same but in a memcache server
32 # RedisRetention : same, but in a Redis server :)
33 # NagiosRetention : only READ retention info from a nagios retention file
36 realm All ; optional (realm are multisites features)
40 #Pollers launch checks
47 manage_sub_realms 0 ; optional and advanced: does it take jobs from schedulers of sub realms?
48 min_workers 4 ; optional : starts with N processes workers
49 max_workers 4 ; optional : no more than N processes workers
50 processes_by_worker 256 ; optional : each workers manage 256 checks
51 polling_interval 1 ; optional : take jobs from schedulers each 1 second
52 timeout 3 ; 'ping' timeout
53 data_timeout 120 ; 'data send' timeout
54 max_check_attempts 3 ; if at least max_check_attempts ping failed, the node is DEAD
64 # Poller can have a nrpe module : commands tagged with
65 # nrpe_poller as module_type will be managed by this module.
66 # it will bypass the launch of check_nrpe, and will do the
69 module_name NrpeBooster
70 module_type nrpe_poller
74 #Reactionner launch notifications
76 reactionner_name reactionner-1
82 manage_sub_realms 0 ;optionnal : like for poller
83 min_workers 1 ;optionnal : like for poller
84 max_workers 15 ;optionnal : like for poller
85 polling_interval 1 ;optionnal : like for poller
86 timeout 3 ; 'ping' timeout
87 data_timeout 120 ; 'data send' timeout
88 max_check_attempts 3 ; if at least max_check_attempts ping failed, the node is DEAD
94 #The broker manages data export (in flat file or in database)
96 #Here just log files and status.dat file modules
103 #Which modules to load? Here only status.dat and nagios.log
104 modules Livestatus, Simple-log
105 # Other interesting modules to add :
106 # PickleRetentionBroker : save data when quitting
107 # ToNdodb_Mysql : NDO database support
110 manage_sub_realms 1 ; optionnal, like for poller
111 manage_arbiters 1 ; optionnal : take data from Arbiter. There should be
112 ;only one broker for the arbiter
114 timeout 3 ; 'ping' timeout
115 data_timeout 120 ; 'data send' timeout
116 max_check_attempts 3 ; if at least max_check_attempts ping failed, the node is DEAD
123 ##Now the modules for the broker. The first 2 that are used, and all the others :)
125 #The log managment for ALL daemons (all in one log, cool isn't it? ).
127 module_name Simple-log
128 module_type simple_log
129 path /usr/local/shinken/var/nagios.log
130 archive_path /usr/local/shinken/var/archives/
134 #Status.dat and objects.cache export. For the old Nagios
137 module_name Status-Dat
138 module_type status_dat
139 status_file /usr/local/shinken/var/status.dat
140 object_cache_file /usr/local/shinken/var/objects.cache
141 status_update_interval 15 ; update status.dat every 15s
144 ##All other modules that can be called if you have installed
145 #the databases, or if you want to test something else :)
147 #Here the NDO/MySQL module
148 #So you can use with NagVis or Centreon
150 module_name ToNdodb_Mysql
151 module_type ndodb_mysql
152 database ndo ; database name
153 user root ; user of the database
154 password root ; must be changed
155 host localhost ; host to connect to
156 character_set utf8 ;optionnal, UTF8 is the default
160 #Here a NDO/Oracle module. For Icinga web connexion
161 #Or for DBA that do not like MySQL
163 module_name ToNdodb_Oracle
164 module_type ndodb_oracle
165 database XE ;database name (listener in fact)
166 user system ;user to connect
167 password password ;Yes I know I have to change my default password...
168 oracle_home /usr/lib/oracle/xe/app/oracle/product/10.2.0/server ;optional, but can be useful
172 #Here for Merlin/MySQL. For the cool Ninja connexion
174 module_name ToMerlindb_Mysql
176 backend mysql ;backend to use, here mysql databse
177 database merlin ;database name
178 user root ; ? .. yes, the user of the database...
179 password root ; wtf? you ask?
180 host localhost ; host of the database
181 character_set utf8 ;optionnal, UTF8 is the default
185 #Here the Merlin/Sqlite. No one uses it for now :)
186 #You look at something : it's also the merlindb module, like the previous,
187 #it's the same code, it's just the backend parameter that change (and path).
189 module_name ToMerlindb_Sqlite
191 backend sqlite ;like the mysql, but sqlite :)
192 database_path /tmp/merlindb.sqlite ;path of the sqlite file
196 #Here the couchdb export. Maybe use one day...
197 #I should do a mangodb too one day...
200 #and all other NoSQL database in fact :)
202 module_name ToCouchdb
210 #Export services perfdata to flat file. For centreon or
213 module_name Service-Perfdata
214 module_type service_perfdata
215 path /usr/local/shinken/var/service-perfdata
216 # mode a ; optionnal. a = append, w = overwrite, p =pipe
217 # template $LASTSERVICECHECK$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$\t$SERVICESTATE$\n
222 #like the previous, but for hosts...
224 module_name Host-Perfdata
225 module_type host_perfdata
226 path /usr/local/shinken/var/host-perfdata
227 # mode a ; optionnal. a = append, w = overwrite, p =pipe
228 # template $LASTHOSTCHECK$\t$HOSTNAME$\t$HOSTOUTPUT$\t$HOSTSTATE$\t$HOSTPERFDATA$\n
233 #You know livestatus? Yes, there a Livestatus module for shinken too :)
235 module_name Livestatus
236 module_type livestatus
237 host * ; * = listen on all configured ip addresses
238 port 50000 ; port to listen
239 database_file /usr/local/shinken/var/livestatus.db
243 #Send all logs to syslog
250 #Use with the PNP interface
254 config_file /usr/local/pnp4nagios/etc/npcd.cfg
259 ############################# For the schedulers
260 #Now the good flat file for retention module
262 module_name PickleRetention
263 module_type pickle_retention_file_generic
264 path /tmp/retention.dat
268 #Now the good flat file for retention module
270 module_name PickleRetentionBroker
271 module_type pickle_retention_file_generic
272 path /tmp/retention_broker.dat
275 #Now the good flat file for retention module
277 module_name PickleRetentionArbiter
278 module_type pickle_retention_file_generic
279 path /tmp/retention_arbiter.dat
283 ############################# For the schedulers
284 #Now the good flat file for retention module
286 module_name NagiosRetention
287 module_type nagios_retention_file
288 path /tmp/retention-nagios.dat
292 #Now the memcache one
293 #Now the good flat file for retention module
295 module_name MemcacheRetention
296 module_type memcache_retention
303 #Now the good flat file for retention module
305 module_name RedisRetention
306 module_type redis_retention
312 #You know GLPI? You can load your hosts from this app (
313 #with the webservices plugins for GLPI, in xmlrpc mode)
314 #All hosts read from this will be added to the others of the
316 #Warning : just load host_name, experimental.
318 module_name GLPIImport
319 module_type glpi_import
320 uri http://localhost/glpi/plugins/webservices/xmlrpc.php
323 # use_property otherserial ;optionnal. Will take use value from the otherserial
324 # field in GLPI (Inventory number: in the web interface)
327 #You know NSCA? You can send check results to shinken
328 #using send_nsca command
331 module_type nsca_server
339 # You know VMWare? It's cool to VMotion VM, but after it's hard to
340 # follow host dependencies when it move. With this module, you can
341 # just lookup at the vcenter from times to times and update dependencies
343 module_name VMWare_auto_linking
344 module_type hot_dependencies
345 mapping_file /tmp/vmware_mapping_file.json
346 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
347 mapping_command_interval 60 ; optionnal
348 mapping_command_timeout 300 ; optionnal
351 # Arbiter module to change on the fly a poller tag of a
352 # command by another.
353 # Useful when you use a fixed configuration tool that do not allow you
354 # to configure poller_tag.
356 module_name HackCommandsPollerTag
357 module_type hack_commands_poller_tag
358 cmd_line_match (.*)check_esx3(.*)
362 #The arbiter definition is optionnal
363 #WARNING : You must change host_name with the
364 #hostname of your machine !!!!
366 arbiter_name Arbiter-Master
367 # host_name node1 ;result of the hostname command under Unix
368 address localhost ;IP or DNS adress
371 # uncomment the line below if you want to use the GLPI module and the NSCA one
372 # modules GLPIImport, NSCA, VMWare_auto_linking
374 # List of interesting modules :
375 # PickleRetentionArbiter : save data before exiting
377 # VMWare_auto_linking : lookup at Vphere server for dependencies
378 # GLPIImport : import hosts from GLPI
382 # The receiver manages passive information. It's just a "buffer" that
383 # will be readfrom the arbiter to dispatch data
385 receiver_name receiver-1
390 # The main goal of the receiver is to load
391 # Passive modules, like the NSCA one
394 timeout 3 ; 'ping' timeout
395 data_timeout 120 ; 'data send' timeout
396 max_check_attempts 3 ; if at least max_check_attempts ping failed, the node is DEAD
404 #Very advanced feature for multisite managment.
405 #Consider to look at the doc before touching it :)
414 ###Now specific objects that allow easy change in the service/hots behavior
416 #A result modulation is use to module a check result, like CRITICAL->WARNING here
417 define resultmodulation{
418 resultmodulation_name critical_is_warning ;required
419 exit_codes_match 2 ;optionnal, list of code to change
420 exit_code_modulation 1 ;code that will be put if the code match
421 modulation_period 24×7 ;period when to apply the modulation