summaryrefslogtreecommitdiffstats
path: root/Monitoring/nagios/shinken/shinken-specific-load-balanced-only.cfg
blob: e7f756d5d9ee950ad795031c5257ef8aac9d5bcd (plain)
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
#This config file defined Shinken specific objects like
#satellites or Realms
#
#This file is for defined a pure load balanced environnement
#That mean that if a satellite die, it will not be replaced
#There is only one Realm with every components into it
#All you need to to is to replace "node1" and "node2" by the DNS
#names of your Shinken servers


#The scheduler is a "Host manager". It gets the hosts and theirs
#services and it schedules the checks for the pollers.
define scheduler{
       scheduler_name	scheduler-1
       address	node1
       port	7768
       spare	0	;is not a spare
       realm	All
       weight		1       ;optionnal : 1
       }


#The second scheduler
define scheduler{
       scheduler_name	scheduler-2
       address	node2
       port	7768
       spare	0
       realm	All
       weight		1       ;optionnal : 1
       }


#There is only one reactionner, because it does not need
#load balancing load
define reactionner{
       reactionner_name	reactionner
       address	node1
       port	7769
       spare	0
       realm 	All
       manage_sub_realms 0	;optionnal : 1
       min_workers	 1	;optionnal : 1
       max_workers	 15	;optionnal : 30
       polling_interval		1       ;optionnal : 1
       }

#Pollers are here to launch checks
define poller{
       poller_name     poller-All
       address  node1
       port     7771
       realm	All
       manage_sub_realms 0	;optionnal : 0
       min_workers	 4	;optionnal : 1
       max_workers	 4	;optionnal : 30
       processes_by_worker	256	   ;optionnal : 256
       polling_interval		1       ;optionnal : 1
}


#Pollers are here to launch checks
define poller{
       poller_name     poller-2
       address  node2
       port     7771
       realm	All
       manage_sub_realms 0	;optionnal : 0
       min_workers	 4	;optionnal : 1
       max_workers	 4	;optionnal : 30
       processes_by_worker	256	   ;optionnal : 256
       polling_interval		1       ;optionnal : 1
}


#The arbiter definition is optionnal
#Like reactionner and broker, it does not need load balanced
define arbiter{
       arbiter_name	Arbiter
       host_name	node1       ;result of the get_hostname.py command (or hostname under Unix)
       address	node1
       port	7770
       spare	0
       #modules		 No module for now
       }


#The broker manage data export (in flat file or in database)
#Here just log files and status.dat file
define broker{
       broker_name	broker
       address	node1
       port	7772
       spare	0
       realm 	All
       manage_sub_realms 1
       manage_arbiters	 1
       modules		 Status-Dat, Simple-log
       }


##Now the modules for broker

#Here the NDO/MySQL module
#So you can use with NagVis or Centreon
define module{
       module_name	ToNdodb_Mysql
       module_type	ndodb_mysql
       database		ndo      ; database name
       user		root     ; user of the database
       password		root     ; must be changed
       host		localhost ; host to connect
       character_set	utf8     ;optionnal, UTF8 is the default
}

#Here a NDO/Oracle module. For Icinga web connection
#Or for database admin that do not like MySQL
define module{
       module_name	ToNdodb_Oracle
       module_type	ndodb_oracle
       database		XE              ;database name (listener in fact)
       user		system
       password		password        ;Yes I know I have to change my default password...
       oracle_home      /usr/lib/oracle/xe/app/oracle/product/10.2.0/server     ;optional
}


#Here for Merlin/MySQL. for Ninja connection
define module{
       module_name      ToMerlindb_Mysql
       module_type      merlindb
       backend          mysql    ;backend to use, here mysql databse
       database         merlin   ;database name
       user             root
       password         root
       host		localhost
       character_set    utf8     ;optionnal, UTF8 is the default
}


#Here the Merlin/Sqlite. No one uses it for now :)
define module{
       module_name      ToMerlindb_Sqlite
       module_type      merlindb
       backend		sqlite 	  ;like the mysql, but sqlite :)
       database_path    /tmp/mabase.sqlite  ;path of the sqlite file
}


#Here the couchdb export. Maybe use one day...
define module{
       module_name      ToCouchdb
       module_type      couchdb
       user             root
       password         root
       host		localhost
}


#Export services perfdata to file
define module{
       module_name      Service-Perfdata
       module_type      service_perfdata
       path		service-perfdata
}


#For hosts this time
define module{
       module_name      Host-Perfdata
       module_type      host_perfdata
       path		host-perfdata
}


#The log managment
define module{
       module_name      Simple-log
       module_type      simple_log
       path		/var/log/shinken/nagios.log
}


#Status.dat and objects.cache export. For the old Nagios
#interface
define module{
       module_name      Status-Dat
       module_type      status_dat
       status_file	status.dat
       object_cache_file	objects.cache
       status_update_interval   15
}


#A global Realm
define realm{
       realm_name  All
       default		1
}




##Now addon about standard configuration :
#resultmodulation : change "on te fly" a check result, without negate or something like it
#escalation : like service_escalation, but a generic that host/service can call

#A result modulation is use to module a check result, like CRITICAL->WARNING here
define resultmodulation{
       resultmodulation_name     critical_is_warning           ;required
       exit_codes_match          2                ;optionnal, list of code to change
       output_match              //               ;optionnal, regexp for activation of exit_code if output match
       exit_code_modulation      1                ;code that will be put if the code match
       output_modulation         s///        ;optionnal regexp to change output
       longoutput_modulation     s///      ;optionnal regexp to change long_output
       modulation_period         24×7    ;period when to apply the modulation
}