Subversion Repositories configs

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4 - 1
################################################################################
2
#
3
# OCS Inventory NG Communication Server Perl Module Setup
4
#
5
# Copyleft 2006 Pascal DANEK
6
# Web: http://www.ocsinventory-ng.org
7
#
8
# This code is open source and may be copied and modified as long as the source
9
# code is always made freely available.
10
# Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt
11
################################################################################
12
 
13
  # Which version of mod_perl we are using
14
  # For mod_perl <= 1.999_21, replace 2 by 1
15
  # For mod_perl > 1.999_21, replace 2 by 2
16
  PerlSetEnv OCS_MODPERL_VERSION 2
17
 
18
  # Master Database settings
19
  # Replace localhost by hostname or ip of MySQL server for WRITE
20
  PerlSetEnv OCS_DB_HOST localhost
21
  # Replace 3306 by port where running MySQL server, generally 3306
22
  PerlSetEnv OCS_DB_PORT 3306
23
  # Name of database
24
  PerlSetEnv OCS_DB_NAME ocsweb
25
  PerlSetEnv OCS_DB_LOCAL ocsweb
26
  # User allowed to connect to database
27
  PerlSetEnv OCS_DB_USER ocs
28
  # Password for user
29
  PerlSetVar OCS_DB_PWD ocs
30
 
31
  # Slave Database settings
32
  # Replace localhost by hostname or ip of MySQL server for READ
33
  # Useful if you handle mysql slave databases
34
  # PerlSetEnv OCS_DB_SL_HOST localhost
35
  # Replace 3306 by port where running MySQL server, generally 3306
36
  # PerlSetEnv OCS_DB_SL_PORT_SLAVE 3306
37
  # User allowed to connect to database
38
  # PerlSetEnv OCS_DB_SL_USER ocs
39
  # Name of the database
40
  # PerlSetEnv OCS_DB_SL_NAME ocsweb
41
  # Password for user
42
  # PerlSetVar OCS_DB_SL_PWD ocs
43
 
44
  # Path to log directory (must be writeable)
45
  PerlSetEnv OCS_OPT_LOGPATH "/var/log/ocsinventory-server"
46
 
47
  # If you need to specify a mysql socket that the client's built-in
179 - 48
  #PerlSetEnv OCS_OPT_DBI_MYSQL_SOCKET "path/to/mysql/unix/socket"
4 - 49
  # DBI verbosity
50
  PerlSetEnv OCS_OPT_DBI_PRINT_ERROR 0
51
 
52
  # Unicode support
53
  PerlSetEnv OCS_OPT_UNICODE_SUPPORT 1
54
 
55
  # If you are using a multi server architecture,
56
  # Put the ip addresses of the slaves on the master
57
  # (This is read as perl regular expressions)
58
  PerlAddVar OCS_OPT_TRUSTED_IP 127.0.0.1
59
  #PerlAddVar OCS_OPT_TRUSTED_IP XXX.XXX.XXX.XXX
60
 
61
# ===== WEB SERVICE (SOAP) SETTINGS =====
62
 
63
  PerlSetEnv OCS_OPT_WEB_SERVICE_ENABLED 0
64
  PerlSetEnv OCS_OPT_WEB_SERVICE_RESULTS_LIMIT 100
65
  # PerlSetEnv OCS_OPT_WEB_SERVICE_PRIV_MODS_CONF "WEBSERV_PRIV_MOD_CONF_FILE"
66
 
67
# Be careful: you must restart apache to make settings taking effects
68
 
69
  # Configure engine to use the settings from this file
70
  PerlSetEnv OCS_OPT_OPTIONS_NOT_OVERLOADED 0
71
 
72
  # Try to use other compress algorythm than raw zlib
73
  # GUNZIP and clear XML are supported
74
  PerlSetEnv OCS_OPT_COMPRESS_TRY_OTHERS 1
75
 
76
##############################################################
77
# ===== OPTIONS BELOW ARE OVERLOADED IF YOU USE OCS GUI =====#
78
##############################################################
79
 
80
# NOTE: IF YOU WANT TO USE THIS CONFIG FILE INSTEAD, set OCS_OPT_OPTIONS_NOT_OVERLOADED to '1'
81
 
82
# ===== MAIN SETTINGS =====
83
 
84
  # Enable engine logs (see LOGPATH setting)
85
  PerlSetEnv OCS_OPT_LOGLEVEL 0
86
  # Specify agent's prolog frequency
87
  PerlSetEnv OCS_OPT_PROLOG_FREQ 12
88
  # Configure the duplicates detection system
89
  PerlSetEnv OCS_OPT_AUTO_DUPLICATE_LVL 15
90
  # Futur security improvements
91
  PerlSetEnv OCS_OPT_SECURITY_LEVEL 0
92
  # Validity of a computer's lock
93
  PerlSetEnv OCS_OPT_LOCK_REUSE_TIME 600
94
  # Enable the history tracking system (useful for external data synchronisation
95
  PerlSetEnv OCS_OPT_TRACE_DELETED 0
96
 
97
# ===== INVENTORY SETTINGS =====
98
 
99
  # Specify the validity of inventory data
100
  PerlSetEnv OCS_OPT_FREQUENCY 0
101
  # Configure engine to update inventory regarding to CHECKSUM agent value (lower DB backend load)
102
  PerlSetEnv OCS_OPT_INVENTORY_DIFF 1
103
  # Make engine consider an inventory as a transaction (lower concurency, better disk usage)
104
  PerlSetEnv OCS_OPT_INVENTORY_TRANSACTION 1
105
  # Configure engine to make a differential update of inventory sections (row level). Lower DB backend load, higher frontend load
106
  PerlSetEnv OCS_OPT_INVENTORY_WRITE_DIFF 1
107
  # Enable some stuff to improve DB queries, especially for GUI multicriteria searching system
108
  PerlSetEnv OCS_OPT_INVENTORY_CACHE_ENABLED 1
109
  # Specify when the engine will clean the inventory cache structures
110
  PerlSetEnv OCS_OPT_INVENTORY_CACHE_REVALIDATE 7
111
  # Enable you to keep trace of every elements encountered in db life
112
  PerlSetEnv OCS_OPT_INVENTORY_CACHE_KEEP 1
113
 
114
# ===== SOFTWARES DEPLOYMENT SETTINGS =====
115
 
116
  # Enable this feature
117
  PerlSetEnv OCS_OPT_DOWNLOAD 0
118
  # Package wich have a priority superior than this value will not be downloaded
119
  PerlSetEnv OCS_OPT_DOWNLOAD_PERIOD_LENGTH 10
120
  # Time between two download cycles (bandwidth control)
121
  PerlSetEnv OCS_OPT_DOWNLOAD_CYCLE_LATENCY 60
122
  # Time between two fragment downloads (bandwidth control)
123
  PerlSetEnv OCS_OPT_DOWNLOAD_FRAG_LATENCY 60
124
  # Specify if you want to track packages affected to a group on computer's level
125
  PerlSetEnv OCS_OPT_DOWNLOAD_GROUPS_TRACE_EVENTS 1
126
  # Time between two download periods (bandwidth control)
127
  PerlSetEnv OCS_OPT_DOWNLOAD_PERIOD_LATENCY 60
128
  # Agents will send ERR_TIMEOUT event and clean the package it is older than this setting
129
  PerlSetEnv OCS_OPT_DOWNLOAD_TIMEOUT 7
179 - 130
  # Agents will send an error event and clean the package if package command does not respond during this setting
131
  PerlSetEnv OCS_OPT_DOWNLOAD_EXECUTION_TIMEOUT 120
4 - 132
 
133
  # Enable ocs engine to deliver agent's files (deprecated)
134
  PerlSetEnv OCS_OPT_DEPLOY 0
135
  # Enable the softwares deployment capacity (bandwidth control)
136
 
137
# ===== GROUPS SETTINGS =====
138
 
139
  # Enable the computer\s groups feature
140
  PerlSetEnv OCS_OPT_ENABLE_GROUPS 1
141
  # Random number computed in the defined range. Designed to avoid computing many groups in the same process
179 - 142
  PerlSetEnv OCS_OPT_GROUPS_CACHE_OFFSET 43200
143
  # Specify the validity of computer's groups (default: compute it once a day - see offset)
144
  PerlSetEnv OCS_OPT_GROUPS_CACHE_REVALIDATE 43200
4 - 145
 
146
# ===== IPDISCOVER SETTINGS =====
147
 
148
  # Specify how much agent per LAN will discovered connected peripherals (0 to disable)
149
  PerlSetEnv OCS_OPT_IPDISCOVER 2
150
  # Specify the minimal difference to replace an ipdiscover agent
151
  PerlSetEnv OCS_OPT_IPDISCOVER_BETTER_THRESHOLD 1
152
  # Time between 2 arp requests (mini: 10 ms)
153
  PerlSetEnv OCS_OPT_IPDISCOVER_LATENCY 100
154
  # Specify when to remove a computer when it has not come until this period
155
  PerlSetEnv OCS_OPT_IPDISCOVER_MAX_ALIVE 14
156
  # Disable the time before a first election (not recommended)
157
  PerlSetEnv OCS_OPT_IPDISCOVER_NO_POSTPONE 0
158
  # Enable groups for ipdiscover (for example, you might want to prevent some groups to be ipdiscover agents)
159
  PerlSetEnv OCS_OPT_IPDISCOVER_USE_GROUPS 1
160
 
161
# ===== INVENTORY FILES MAPPING SETTINGS =====
162
 
163
  # Use with ocsinventory-injector, enable the multi entities feature
164
  PerlSetEnv OCS_OPT_GENERATE_OCS_FILES 0
165
  # Generate either compressed file or clear XML text
166
  PerlSetEnv OCS_OPT_OCS_FILES_FORMAT OCS
167
  # Specify if you want to keep trace of all inventory between to synchronisation with the higher level server
168
  PerlSetEnv OCS_OPT_OCS_FILES_OVERWRITE 0
169
  # Path to ocs files directory (must be writeable)
170
  PerlSetEnv OCS_OPT_OCS_FILES_PATH /tmp
171
 
172
# ===== FILTER SETTINGS =====
173
 
174
  # Enable prolog filter stack
175
  PerlSetEnv OCS_OPT_PROLOG_FILTER_ON 0
176
  # Enable core filter system to modify some things "on the fly"
177
  PerlSetEnv OCS_OPT_INVENTORY_FILTER_ENABLED 0
178
  # Enable inventory flooding filter. A dedicated ipaddress ia allowed to send a new computer only once in this period
179
  PerlSetEnv OCS_OPT_INVENTORY_FILTER_FLOOD_IP 0
180
  # Period definition for INVENTORY_FILTER_FLOOD_IP
181
  PerlSetEnv OCS_OPT_INVENTORY_FILTER_FLOOD_IP_CACHE_TIME 300
182
  # Enable inventory filter stack
183
  PerlSetEnv OCS_OPT_INVENTORY_FILTER_ON 0
179 - 184
 
185
# ===== DATA FILTER =====
186
 
187
  #Enable the dat filtering capacity
188
  PerlSetEnv OCS_OPT_DATA_FILTER 0
189
 
190
  # Set the table names and the field associated you want to filter
191
  #PerlAddVar OCS_OPT_DATA_TO_FILTER HARDWARE
192
  #PerlAddVar OCS_OPT_DATA_TO_FILTER USERID
193
 
4 - 194
 
195
# ===== REGISTRY SETTINGS =====
196
 
197
  # Enable the registry capacity
198
  PerlSetEnv OCS_OPT_REGISTRY 1
179 - 199
 
200
# ===== SNMP SETTINGS =====
201
 
202
  # Enable the SNMP capacity
203
  PerlSetEnv OCS_OPT_SNMP 0
204
 
205
  # Configure engine to update snmp inventory regarding to snmp_laststate table (lower DB backend load)
206
  PerlSetEnv OCS_OPT_SNMP_INVENTORY_DIFF 1
4 - 207
 
208
# ===== SESSION SETTINGS =====
209
# Not yet in GUI
210
 
211
  # Validity of a session (prolog=>postinventory)
212
  PerlSetEnv OCS_OPT_SESSION_VALIDITY_TIME 600
213
  # Consider a session obsolete if it is older thant this value
214
  PerlSetEnv OCS_OPT_SESSION_CLEAN_TIME 86400
215
  # Accept an inventory only if required by server
216
  #( Refuse "forced" inventory)
217
  PerlSetEnv OCS_OPT_INVENTORY_SESSION_ONLY 0
218
 
219
# ===== TAG =====
220
 
221
  # The default behavior of the server is to ignore TAG changes from the
222
  # agent.
223
  PerlSetEnv OCS_OPT_ACCEPT_TAG_UPDATE_FROM_CLIENT 0
224
 
179 - 225
# ===== EXTERNAL USERAGENTS =====
4 - 226
 
179 - 227
  #Path for external useragents reference file
228
  #!! WARNING !! : external agents may not be supported by OCS NG Community !
229
  #PerlSetEnv OCS_OPT_EXT_USERAGENTS_FILE_PATH /tmp/yourfile.txt
230
 
231
# ===== PLUGINS =====
232
 
233
  PerlSetEnv OCS_PLUGINS_PERL_DIR "/etc/ocsinventory/ocsinventory-server/perl"
234
  PerlSetEnv OCS_PLUGINS_CONF_DIR "/etc/ocsinventory/ocsinventory-server/plugins"
235
 
4 - 236
# ===== DEPRECATED =====
237
 
238
  # Set the proxy cache validity in http headers when sending a file
239
  PerlSetEnv OCS_OPT_PROXY_REVALIDATE_DELAY 3600
240
  # Deprecated
241
  PerlSetEnv OCS_OPT_UPDATE 0
242
 
243
############ DO NOT MODIFY BELOW ! #######################
244
 
245
  # External modules
246
  PerlModule Apache::DBI
247
  PerlModule Compress::Zlib
248
  PerlModule XML::Simple
179 - 249
 
250
  # Ocs plugins
251
  PerlModule Apache::Ocsinventory::Plugins
4 - 252
 
253
  # Ocs
254
  PerlModule Apache::Ocsinventory
255
  PerlModule Apache::Ocsinventory::Server::Constants
256
  PerlModule Apache::Ocsinventory::Server::System
257
  PerlModule Apache::Ocsinventory::Server::Communication
258
  PerlModule Apache::Ocsinventory::Server::Inventory
259
  PerlModule Apache::Ocsinventory::Server::Duplicate
260
 
261
  # Capacities
262
  PerlModule Apache::Ocsinventory::Server::Capacities::Registry
263
  PerlModule Apache::Ocsinventory::Server::Capacities::Update
264
  PerlModule Apache::Ocsinventory::Server::Capacities::Ipdiscover
265
  PerlModule Apache::Ocsinventory::Server::Capacities::Download
266
  PerlModule Apache::Ocsinventory::Server::Capacities::Notify
179 - 267
  PerlModule Apache::Ocsinventory::Server::Capacities::Snmp
4 - 268
  # This module guides you through the module creation
269
  # PerlModule Apache::Ocsinventory::Server::Capacities::Example
270
  # This module adds some rules to filter some request sent to ocs server in the prolog and inventory stages
271
  # PerlModule Apache::Ocsinventory::Server::Capacities::Filter
179 - 272
  # This module add availibity to filter data from HARDWARE section (data filtered won't be stored in database)
273
  # PerlModule Apache::Ocsinventory::Server::Capacities::Datafilter
4 - 274
 
275
  # PerlTaintCheck On
276
 
277
  # SSL apache settings
278
  #SSLEngine "SSL_ENABLE"
279
  #SSLCertificateFile "SSL_CERTIFICATE_FILE"
280
  #SSLCertificateKeyFile "SSL_CERTIFICATE_KEY_FILE"
281
  #SSLCACertificateFile "SSL_CERTIFICATE_FILE"
282
  #SSLCACertificatePath "SSL_CERTIFICATE_PATH"
283
  #SSLVerifyClient "SSL_VALIDATE_CLIENT"
284
 
285
  # Engine apache settings
286
  # "Virtual" directory for handling OCS Inventory NG agents communications
287
  # Be careful, do not create such directory into your web server root document !
288
  <Location /ocsinventory>
289
	# If you protect this area you have to deal with http_auth_* agent's parameters
290
	# AuthType Basic
291
	# AuthName "OCS Inventory agent area"
179 - 292
	# AuthUserFile "/etc/ocsinventory/ocsinventory-server/htpasswd"
293
 
294
	<IfModule mod_authz_core.c>
295
		<RequireAll>
296
			Require all granted
297
			# Require valid-user
298
		</RequireAll>
299
	</IfModule>
300
	<IfModule !mod_authz_core.c>
301
		Order deny,allow
302
		Allow from all
303
		# Require valid-user
304
	</IfModule>
305
 
306
 
4 - 307
        SetHandler perl-script
308
        PerlHandler Apache::Ocsinventory
309
  </Location>
310
 
311
  # Web service apache settings
312
  PerlModule Apache::Ocsinventory::SOAP
313
 
314
  <location /ocsinterface>
315
        SetHandler perl-script
316
        PerlHandler "Apache::Ocsinventory::SOAP"
317
 
318
       	AuthType Basic
319
	AuthName "OCS Inventory SOAP Area"
320
	# Use htpasswd to create/update soap-user (or another granted user)
179 - 321
	AuthUserFile "/etc/ocsinventory/ocsinventory-server/htpasswd"
322
 
323
        # By default, you can query web service from everywhere with a valid user
324
	<IfModule mod_authz_core.c>
325
		<RequireAll>
326
			Require all granted
327
			Require valid-user
328
		</RequireAll>
329
	</IfModule>
330
	<IfModule !mod_authz_core.c>
331
		Order deny,allow
332
		Allow from all
333
		Require valid-user
334
	</IfModule>
4 - 335
  </location>
336