*Fix : the super() do nto work with non new style class, so the ArbiterInterface...
[shinken.git] / etc / shinken-specific.cfg
blobe4119f8caa02066c298da3f155caddc971007d7a
1 #This config file defines Shinken specific objects like
2 #satellites or Realms
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.
17 define scheduler{
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
22        #optional
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
31        #advanced feature
32        realm    All                   ; optional (realm are multisites features)
33        }
36 #Pollers launch checks
37 define poller{
38        poller_name      poller-1
39        address          localhost
40        port             7771
42        #optional
43        manage_sub_realms 0      ; optional and advanced: does it take jobs from schedulers of sub realms?
44        min_workers       4      ; optional : starts 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
52        
53        # advanced features
54        #modules         NrpeBooster
55        realm            All
59 # Poller can have a nrpe module : commands tagged with
60 # nrpe_poller as module_type will be managed by this module.
61 # it will bypass the launch of check_nrpe, and will do the
62 # connexion itself.
63 define module{
64        module_name      NrpeBooster
65        module_type      nrpe_poller
69 #Reactionner launch notifications
70 define reactionner{
71        reactionner_name         reactionner-1
72        address                  localhost
73        port                     7769
74        spare                    0
76        #optionnal
77        manage_sub_realms 0      ;optionnal : like for poller
78        min_workers       1      ;optionnal : like for poller
79        max_workers       15     ;optionnal : like for poller
80        polling_interval         1       ;optionnal : like for poller
81        timeout          3             ; 'ping' timeout 
82        data_timeout     120           ; 'data send' timeout
83        max_check_attempts       3     ;  if at least max_check_attempts ping failed, the node is DEAD
85        #optionnal
86        realm                    All
87        }
89 #The broker manages data export (in flat file or in database)
90 #with it's modules
91 #Here just log files and status.dat file modules
92 define broker{
93        broker_name      broker-1
94        address          localhost
95        port             7772
96        spare            0
98        #Which modules to load? Here only status.dat and nagios.log
99        modules           Simple-log, Status-Dat
100  #Livestatus, Simple-log
101 #       modules          ToNdodb_Mysql
103        #optionnal
104        manage_sub_realms 1   ; optionnal, like for poller
105        manage_arbiters   1   ; optionnal : take data from Arbiter. There should be
106                              ;only one broker for the arbiter
108        timeout          3             ; 'ping' timeout 
109        data_timeout     120           ; 'data send' timeout
110        max_check_attempts       3     ;  if at least max_check_attempts ping failed, the node is DEAD
112        #advanced
113        realm    All
114        }
117 ##Now the modules for the broker. The first 2 that are used, and all the others :)
119 #The log managment for ALL daemons (all in one log, cool isn't it? ).
120 define module{
121        module_name      Simple-log
122        module_type      simple_log
123        path             /usr/local/shinken/var/nagios.log
124        archive_path     /usr/local/shinken/var/archives/
128 #Status.dat and objects.cache export. For the old Nagios
129 #interface
130 define module{
131        module_name              Status-Dat
132        module_type              status_dat
133        status_file              /usr/local/shinken/var/status.dat
134        object_cache_file        /usr/local/shinken/var/objects.cache
135        status_update_interval   15 ; update status.dat every 15s
138 ##All other modules that can be called if you have installed
139 #the databases, or if you want to test something else :)
141 #Here the NDO/MySQL module
142 #So you can use with NagVis or Centreon
143 define module{
144        module_name      ToNdodb_Mysql
145        module_type      ndodb_mysql
146        database         ndo       ; database name
147        user             root      ; user of the database
148        password         root      ; must be changed
149        host             localhost ; host to connect to
150        character_set    utf8      ;optionnal, UTF8 is the default
154 #Here a NDO/Oracle module. For Icinga web connexion
155 #Or for DBA that do not like MySQL
156 define module{
157        module_name      ToNdodb_Oracle
158        module_type      ndodb_oracle
159        database         XE              ;database name (listener in fact)
160        user             system          ;user to connect
161        password         password        ;Yes I know I have to change my default password...
162        oracle_home      /usr/lib/oracle/xe/app/oracle/product/10.2.0/server     ;optional, but can be useful
166 #Here for Merlin/MySQL. For the cool Ninja connexion
167 define module{
168        module_name      ToMerlindb_Mysql
169        module_type      merlindb
170        backend          mysql    ;backend to use, here mysql databse
171        database         merlin   ;database name
172        user             root     ; ? .. yes, the user of the database...
173        password         root     ; wtf? you ask?
174        host             localhost ; host of the database
175        character_set    utf8     ;optionnal, UTF8 is the default
179 #Here the Merlin/Sqlite. No one uses it for now :)
180 #You look at something : it's also the merlindb module, like the previous,
181 #it's the same code, it's just the backend parameter that change (and path).
182 define module{
183        module_name      ToMerlindb_Sqlite
184        module_type      merlindb
185        backend          sqlite    ;like the mysql, but sqlite :)
186        database_path    /tmp/merlindb.sqlite  ;path of the sqlite file
190 #Here the couchdb export. Maybe use one day...
191 #I should do a mangodb too one day...
192 #and casandra...
193 #and voldemort...
194 #and all other NoSQL database in fact :)
195 define module{
196        module_name      ToCouchdb
197        module_type      couchdb
198        user             root
199        password         root
200        host             localhost
204 #Export services perfdata to flat file. For centreon or
205 #perfparse
206 define module{
207        module_name      Service-Perfdata
208        module_type      service_perfdata
209        path             /usr/local/shinken/var/service-perfdata
210 #      mode             a ; optionnal. a = append, w = overwrite, p =pipe
211 #      template         $LASTSERVICECHECK$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$\t$SERVICESTATE$\n
215 #For hosts this time
216 #like the previous, but for hosts...
217 define module{
218        module_name      Host-Perfdata
219        module_type      host_perfdata
220        path             /usr/local/shinken/var/host-perfdata
221 #      mode             a ; optionnal. a = append, w = overwrite, p =pipe
222 #      template         $LASTHOSTCHECK$\t$HOSTNAME$\t$HOSTOUTPUT$\t$HOSTSTATE$\t$HOSTPERFDATA$\n
227 #You know livestatus? Yes, there a Livestatus module for shinken too :)
228 define module{
229        module_name      Livestatus
230        module_type      livestatus
231        host             *       ; * = listen on all configured ip addresses
232        port             50000   ; port to listen
233        database_file    /usr/local/shinken/var/livestatus.db
237 #Send all logs to syslog
238 define module{
239        module_name      Syslog
240        module_type      syslog
244 #Use with the PNP interface
245 define module{
246  module_name  NPCD
247  module_type  npcdmod
248  config_file  /usr/local/pnp4nagios/etc/npcd.cfg
253 ############################# For the schedulers
254 #Now the good flat file for retention module
255 define module{
256        module_name      PickleRetention
257        module_type      pickle_retention_file
258        path             /tmp/retention.dat
262 ############################# For the schedulers
263 #Now the good flat file for retention module
264 define module{
265        module_name      NagiosRetention
266        module_type      nagios_retention_file
267        path             /tmp/retention-nagios.dat
271 #Now the memcache one
272 #Now the good flat file for retention module
273 define module{
274        module_name      MemcacheRetention
275        module_type      memcache_retention
276        server           127.0.0.1
277        port             11211
281 #And the redis one
282 #Now the good flat file for retention module
283 define module{
284        module_name      RedisRetention
285        module_type      redis_retention
286        server           127.0.0.1
291 #You know GLPI? You can load your hosts from this app (
292 #with the webservices plugins for GLPI, in xmlrpc mode)
293 #All hosts read from this will be added to the others of the
294 #standard flat file
295 #Warning : just load host_name, experimental.
296 define module{
297        module_name      GLPIImport
298        module_type      glpi_import
299        uri              http://localhost/glpi/plugins/webservices/xmlrpc.php
300        login_name       glpi
301        login_password   glpi
302 #       use_property       otherserial   ;optionnal. Will take use value from the otherserial
303 #                          field in GLPI (Inventory number:  in the web interface)
306 #You know NSCA? You can send check results to shinken
307 #using send_nsca command
308 define module{
309        module_name       NSCA
310        module_type       nsca_server
311        host              *
312        port              5667
313        encryption_method 0
314        password          helloworld
318 # You know VMWare? It's cool to VMotion VM, but after it's hard to
319 # follow host dependencies when it move. With this module, you can
320 # just lookup at the vcenter from times to times and update dependencies
321 define module{
322        module_name       VMWare_auto_linking
323        module_type       hot_dependencies
324        mapping_file      /tmp/vmware_mapping_file.json
325        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
326        mapping_command_interval 60   ; optionnal
327        mapping_command_timeout   300 ; optionnal
330 # Arbiter module to change on the fly a poller tag of a 
331 # command by another.
332 # Useful when you use a fixed configuration tool that do not allow you
333 # to configure poller_tag.
334 define module{
335        module_name      HackCommandsPollerTag
336        module_type      hack_commands_poller_tag
337        cmd_line_match   (.*)check_esx3(.*)
338        poller_tag       esx3
341 #The arbiter definition is optionnal
342 #WARNING : You must change host_name with the
343 #hostname of your machine !!!!
344 define arbiter{
345        arbiter_name     Arbiter-Master
346 #       host_name       node1       ;result of the hostname command under Unix
347        address          localhost                   ;IP or DNS adress
348        port             7770
349        spare            0
350 #uncomment the line below if you want to use the GLPI module and the NSCA one
351 #      modules          GLPIImport, NSCA, VMWare_auto_linking
353        }
358 #Very advanced feature for multisite managment.
359 #Consider to look at the doc before touching it :)
360 define realm{
361        realm_name  All
362        default          1
368 ###Now specific objects that allow easy change in the service/hots behavior
370 #A result modulation is use to module a check result, like CRITICAL->WARNING here
371 define resultmodulation{
372        resultmodulation_name     critical_is_warning           ;required
373        exit_codes_match          2                ;optionnal, list of code to change
374        exit_code_modulation      1                ;code that will be put if the code match
375        modulation_period         24×7    ;period when to apply the modulation