1 #This config file defined Shinken specific objects like
4 #This file is for defining a simple environement :
5 #*one scheduler that schedules checks (but does not launch them)
6 #*one poller (that launches checks)
7 #*one reactionner (that sends 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 job)
10 #*one arbiter (that reads the configuration and dispatches it to all others)
12 #So here no high availability, just a simple "Nagios equivalent" (but with
13 #more perf and less code! )
15 #The scheduler is a "Host manager". It get hosts and theirs
16 #services. It scheduler checks for them.
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,MemcacheRetention
29 # modules NagiosRetention
32 realm All ; optional (realm are multisites features)
36 #Pollers launch checks
43 manage_sub_realms 0 ; optional and advanced: take jobs from schedulers of sub realms?
44 min_workers 4 ; optional : start with N processes workers
45 max_workers 4 ; optional : no more than N processes workers
46 processes_by_worker 256 ; optional : each workers manage 256 checks
47 polling_interval 1 ; optional : take jobs from schedulers each 1 second
48 timeout 3 ; 'ping' timeout
49 data_timeout 120 ; 'data send' timeout
50 max_check_attempts 3 ; if at least max_check_attempts ping failed, the node is DEAD
58 #Reactionner launch notifications
60 reactionner_name reactionner-1
66 manage_sub_realms 0 ;optionnal : like for poller
67 min_workers 1 ;optionnal : like for poller
68 max_workers 15 ;optionnal : like for poller
69 polling_interval 1 ;optionnal : like for poller
70 timeout 3 ; 'ping' timeout
71 data_timeout 120 ; 'data send' timeout
72 max_check_attempts 3 ; if at least max_check_attempts ping failed, the node is DEAD
78 #The broker manage data export (in flat file or in database)
80 #Here just log files and status.dat file modules
87 #Which modules to load? Here only status.dat and nagios.log
89 # modules Livestatus, Simple-log, Service-Perfdata
92 manage_sub_realms 1 ; optionnal, like for poller
93 manage_arbiters 1 ; optionnal : take data from Arbiter. There should be
94 ;only one broker for the arbiter
96 timeout 3 ; 'ping' timeout
97 data_timeout 120 ; 'data send' timeout
98 max_check_attempts 3 ; if at least max_check_attempts ping failed, the node is DEAD
105 ##Now the modules for broker. First the 2 that are used, and all the others :)
107 #The log managment for ALL daemons (all in one log, cool isn't it? ).
109 module_name Simple-log
110 module_type simple_log
111 path c:\shinken/var/nagios.log
112 archive_path c:\shinken/var/archives/
116 #Status.dat and objects.cache export. For the old Nagios
119 module_name Status-Dat
120 module_type status_dat
121 status_file /usr/local/shinken/var/status.dat
122 object_cache_file /usr/local/shinken/var/objects.cache
123 status_update_interval 15 ; update status.dat every 15s
126 ##All other modules thtat can be called if you have installed
127 #the databses, or if you want to test something else :)
129 #Here the NDO/MySQL module
130 #So you can use with NagVis or Centreon
132 module_name ToNdodb_Mysql
133 module_type ndodb_mysql
134 database ndo ; database name
135 user root ; user of the database
136 password root ; must be changed
137 host localhost ; host to connect to
138 character_set utf8 ;optionnal, UTF8 is the default
142 #Here a NDO/Oracle module. For Icinga web connexion
143 #Or for DBA that do not like MySQL
145 module_name ToNdodb_Oracle
146 module_type ndodb_oracle
147 database XE ;database name (listener in fact)
148 user system ;user to connect
149 password password ;Yes I know I have to change my default password...
150 oracle_home /usr/lib/oracle/xe/app/oracle/product/10.2.0/server ;optional, but can be useful
154 #Here for Merlin/MySQL. For the cool Ninja connexion
156 module_name ToMerlindb_Mysql
158 backend mysql ;backend to use, here mysql databse
159 database merlin ;database name
160 user root ; ? .. yes, the user of the database...
161 password root ; wtf? you ask?
162 host localhost ; host of the database
163 character_set utf8 ;optionnal, UTF8 is the default
167 #Here the Merlin/Sqlite. No one use it for now :)
168 #You look at something : it's also the merlindb module, like the previous,
169 #it's the same code, it's just the backend parameter that change (and path).
171 module_name ToMerlindb_Sqlite
173 backend sqlite ;like the mysql, but sqlite :)
174 database_path /tmp/merlindb.sqlite ;path of the sqlite file
178 #Here the couchdb export. Maybe use one day...
179 #I should do a mangodb too one day...
182 #and all other NoSQL database in fact :)
184 module_name ToCouchdb
192 #Export services perfdata to flat file. for centreon or
195 module_name Service-Perfdata
196 module_type service_perfdata
197 path /usr/local/shinken/var/service-perfdata
198 # mode a ; optionnal. a = append, w = overwrite, p =pipe
199 # template $LASTSERVICECHECK$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$\t$SERVICESTATE$\n
204 #like the previous, but for hosts....
206 module_name Host-Perfdata
207 module_type host_perfdata
208 path /usr/local/shinken/var/host-perfdata
209 # mode a ; optionnal. a = append, w = overwrite, p =pipe
210 # template $LASTHOSTCHECK$\t$HOSTNAME$\t$HOSTOUTPUT$\t$HOSTSTATE$\t$HOSTPERFDATA$\n
215 #You know livestatus? Yes, there a Livestatus module for shinken too :)
217 module_name Livestatus
218 module_type livestatus
219 host * ; * = listen on all configured ip addresses
220 port 50000 ; port to listen
221 database_file /usr/local/shinken/var/livestatus.db
225 #Send all logs to syslog
232 #Use with the PNP interface
236 config_file /usr/local/pnp4nagios/etc/npcd.cfg
241 ############################# For the schedulers
242 #Now the good flat file retention module
244 module_name PickleRetention
245 module_type pickle_retention_file
246 path /tmp/retention.dat
250 ############################# For the schedulers
251 #Now the good flat file retention module
253 module_name NagiosRetention
254 module_type nagios_retention_file
255 path /tmp/retention-nagios.dat
259 #Now the memcache one
260 #Now the good flat file retention module
262 module_name MemcacheRetention
263 module_type memcache_retention
270 #Now the good flat file retention module
272 module_name RedisRetention
273 module_type redis_retention
279 #You know GLPI? You can load your hosts from this app (
280 #with the webservices plugins for GLPI, in xmlrpc mode)
281 #All hosts read from this will be added to the others of the
283 #Warning : just load host_name, experimental.
285 module_name GLPIImport
286 module_type glpi_import
287 uri http://localhost/glpi/plugins/webservices/xmlrpc.php
290 # use_property otherserial ;optionnal. Will take use value from the otherserial
291 # field in GLPI (Inventory number: in the web interface)
294 #You know NSCA? You can send check result to shinken
295 #using send_nsca command
298 module_type nsca_server
308 #The arbiter definition is optionnal
309 #WARNING : You must change host_name with the
310 #hostname of your machine !!!!
312 arbiter_name Arbiter-Master
313 # host_name node1 ;result of the hostname command under Unix
314 address localhost ;IP or DNS adress
317 #uncomment the line below if you want to use the GLPI module and the NSCA one
318 # modules GLPIImport, NSCA
322 #Very advanced feature for multisite managment.
323 #Consider look at the doc before touch it :)
332 ###Now specific objects that allow easy change in the service/hots behavior
334 #A result modulation is use to module a check result, like CRITICAL->WARNING here
335 define resultmodulation{
336 resultmodulation_name critical_is_warning ;required
337 exit_codes_match 2 ;optionnal, list of code to change
338 exit_code_modulation 1 ;code that will be put if the code match
339 modulation_period 24×7 ;period when to apply the modulation