- NXCGetDCIData optimized for speed
[public/netxms.git] / sql / setup.in
CommitLineData
6c9e7d36
VK
1/*
2** Default configuration parameters
b51c8c91
AK
3**
4** ex: syntax=sql
6c9e7d36 5*/
c1142e46 6
333ece94
VK
7INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
8 VALUES ('DBFormatVersion',DB_FORMAT_VERSION,0,1);
70573ffe
VK
9INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
10 VALUES ('DBSyntax',DB_SYNTAX,0,1);
b4895bbe
VK
11INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
12 VALUES ('DBLockStatus','UNLOCKED',0,1);
13INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
14 VALUES ('DBLockInfo','',0,0);
48ad2f8d
VK
15INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
16 VALUES ('DBLockPID','0',0,0);
b1c6ea4a
VK
17INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
18 VALUES ('ServerID','',0,1);
9587eba3
VK
19INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
20 VALUES ('EnableZoning','0',1,1);
333ece94
VK
21INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
22 VALUES ('SyncInterval','60',1,1);
333ece94
VK
23INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
24 VALUES ('DiscoveryPollingInterval','900',1,1);
25INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
56d41577 26 VALUES ('StatusPollingInterval','60',1,1);
333ece94
VK
27INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
28 VALUES ('ConfigurationPollingInterval','3600',1,1);
66485623
VK
29INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
30 VALUES ('RoutingTableUpdateInterval','300',1,1);
a717e56a
VK
31INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
32 VALUES ('ConditionPollingInterval','60',1,1);
333ece94 33INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
9587eba3 34 VALUES ('ResolveNodeNames','1',1,0);
333ece94
VK
35INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
36 VALUES ('NumberOfEventProcessors','1',1,1);
37INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
38 VALUES ('ClientListenerPort','4701',1,1);
39INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
625ad507 40 VALUES ('NumberOfDataCollectors','25',1,1);
d39ca961
IK
41INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
42 VALUES ('NumberOfStatusPollers','10',1,1);
43INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
625ad507 44 VALUES ('NumberOfConfigurationPollers','5',1,1);
bb0a5754
VK
45INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
46 VALUES ('NumberOfDiscoveryPollers','1',1,1);
66485623
VK
47INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
48 VALUES ('NumberOfRoutingTablePollers','5',1,1);
a717e56a
VK
49INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
50 VALUES ('NumberOfConditionPollers','10',1,1);
333ece94 51INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
0212dc5a 52 VALUES ('IDataTableCreationCommand','CREATE TABLE idata_%d (item_id integer not null,idata_timestamp integer not null,idata_value varchar(255) not null)',0,1);
f2692e04 53INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
0212dc5a 54 VALUES ('IDataIndexCreationCommand_0','CREATE INDEX idx_idata_%d_item_id ON idata_%d(item_id)',0,1);
fbf07874 55#if defined(DB_MYSQL)
97686340
AK
56INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
57 VALUES ('IDataIndexCreationCommand_1','CREATE INDEX idx_idata_%d_id_timestamp ON idata_%d(item_id,idata_timestamp)',0,1);
fbf07874 58#elif defined(DB_POSTGRESQL)
25ac0136
AK
59INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
60 VALUES ('IDataIndexCreationCommand_1','CREATE INDEX idx_idata_%d_timestamp_id ON idata_%d(idata_timestamp,item_id)',0,1);
fbf07874 61#elif defined(DB_MSSQL)
52fe5aa2 62INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
1e54f9ab 63 VALUES ('IDataIndexCreationCommand_1','CREATE CLUSTERED INDEX idx_idata_%d_id_timestamp ON idata_%d(item_id,idata_timestamp)',0,1);
dfd24edd 64#endif
333ece94
VK
65INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
66 VALUES ('RunNetworkDiscovery','0',1,1);
67INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
68 VALUES ('EnableAdminInterface','1',1,1);
69INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
70 VALUES ('EnableAccessControl','1',1,0);
71INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
72 VALUES ('EnableEventsAccessControl','0',1,0);
73INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
b7be6692 74 VALUES ('EventLogRetentionTime','5184000',1,0); // Default retention time is 60 days == 5184000 seconds
333ece94
VK
75INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
76 VALUES ('HouseKeepingInterval','3600',1,1);
77INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
dfd24edd 78 VALUES ('DeleteEmptySubnets','0',1,1);
333ece94
VK
79INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
80 VALUES ('EnableSNMPTraps','1',1,1);
7cbe553e
VK
81INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
82 VALUES ('SMSDriver','<none>',1,1);
aa975b7e
VK
83INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
84 VALUES ('SMSDrvConfig','',1,1);
083abe62
VK
85INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
86 VALUES ('SMTPServer','localhost',1,0);
87INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
88 VALUES ('SMTPFromAddr','netxms@localhost',1,0);
751f4600
VK
89INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
90 VALUES ('AgentUpgradeWaitTime','600',1,0);
a9052846
VK
91INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
92 VALUES ('NumberOfUpgradeThreads','10',1,0);
dfd24edd
VK
93INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
94 VALUES ('KeepAliveInterval','60',1,1);
305800bf
VK
95INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
96 VALUES ('DefaultEncryptionPolicy','1',1,1);
97INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
98 VALUES ('AllowedCiphers','15',1,1);
dc17b82b
VK
99INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
100 VALUES ('EnableMultipleDBConnections','1',1,1);
101INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
102 VALUES ('NumberOfDatabaseWriters','1',1,1);
7e7357e8
VK
103INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
104 VALUES ('IcmpPingSize','46',1,1);
77edf0b5 105INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
de6e949b 106 VALUES ('EnableSyslogDaemon','0',1,1);
77edf0b5
VK
107INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
108 VALUES ('SyslogListenPort','514',1,1);
cb53cb15
VK
109INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
110 VALUES ('SyslogRetentionTime','5184000',1,0);
b6ce3970
VK
111INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
112 VALUES ('StatusCalculationAlgorithm','1',1,1);
113INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
114 VALUES ('StatusPropagationAlgorithm','1',1,1);
115INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
116 VALUES ('FixedStatusValue','0',1,1);
117INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
118 VALUES ('StatusShift','0',1,1);
119INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
120 VALUES ('StatusTranslation','01020304',1,1);
121INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
122 VALUES ('StatusSingleThreshold','75',1,1);
123INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
124 VALUES ('StatusThresholds','503C2814',1,1);
8d8cd3f8
VK
125INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
126 VALUES ('CapabilityExpirationTime','604800',1,0); // In seconds
269e3aca
VK
127INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
128 VALUES ('DefaultCommunityString','public',1,0);
129INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
130 VALUES ('DiscoveryFilter','none',1,0);
56b32598
VK
131INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
132 VALUES ('LogAllSNMPTraps','0',1,1);
5d8a7f11
VK
133INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
134 VALUES ('DisableVacuum','0',1,0);
7db87985
VK
135INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
136 VALUES ('LockTimeout','60000',1,1);
f3d12ff6
VK
137INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
138 VALUES ('RADIUSServer','localhost',1,0);
139INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
140 VALUES ('RADIUSSecret','netxms',1,0);
141INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
142 VALUES ('RADIUSPort','1645',1,0);
143INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
144 VALUES ('RADIUSNumRetries','5',1,0);
145INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
146 VALUES ('RADIUSTimeout','3',1,0);
36178cb9
AK
147INSERT INTO config (var_name,var_value,is_visible,need_server_restart)
148 VALUES ('MailEncoding','iso-8859-1',1,0);
9b057805
VK
149
150
6c9e7d36 151/*
383b42a1 152** Default admin user
6c9e7d36 153*/
9b057805 154
383b42a1
VK
155INSERT INTO users (id,name,password,system_access,flags,full_name,
156 description,grace_logins,auth_method,guid)
057f9dfb
VK
157 VALUES (0,'admin',
158 '3A445C0072CD69D9030CC6644020E5C4576051B1', // Default password: netxms
383b42a1
VK
159 65535,8,'','Built-in system administrator account',5,0,
160 '00000000-0000-0000-0000-000000000000'
057f9dfb
VK
161 );
162
163
164/*
165** Special "Everyone" user group
166*/
167
95b6a1b6 168INSERT INTO user_groups (id,name,system_access,flags,description,guid)
383b42a1
VK
169 VALUES (-2147483648, 'Everyone', 16, 0, 'Built-in everyone group',
170 '00000000-0000-0000-0000-000000000000'
171 );
b6a77d6d
VK
172
173
3c468b80
VK
174/*
175** Default event groups
176*/
177
c6576857
VK
178#define ID_GROUP_1 -2147483647
179#define ID_GROUP_2 -2147483646
3c468b80 180
9f2ad16c
VK
181INSERT INTO event_groups (id,name,description,range_start,range_end)
182 VALUES (ID_GROUP_1,'NodeStatus','All events reporting about node status change',0,0);
183INSERT INTO event_groups (id,name,description,range_start,range_end)
184 VALUES (ID_GROUP_2,'NewObjects','All events reporting about new objects creation',0,0);
3c468b80 185
c19b2871
VK
186INSERT INTO event_group_members (group_id,event_code) VALUES (ID_GROUP_1,EVENT_NODE_NORMAL);
187INSERT INTO event_group_members (group_id,event_code) VALUES (ID_GROUP_1,EVENT_NODE_MINOR);
188INSERT INTO event_group_members (group_id,event_code) VALUES (ID_GROUP_1,EVENT_NODE_WARNING);
189INSERT INTO event_group_members (group_id,event_code) VALUES (ID_GROUP_1,EVENT_NODE_MAJOR);
190INSERT INTO event_group_members (group_id,event_code) VALUES (ID_GROUP_1,EVENT_NODE_CRITICAL);
191INSERT INTO event_group_members (group_id,event_code) VALUES (ID_GROUP_1,EVENT_NODE_UNKNOWN);
192INSERT INTO event_group_members (group_id,event_code) VALUES (ID_GROUP_1,EVENT_NODE_UNMANAGED);
193
194INSERT INTO event_group_members (group_id,event_code) VALUES (ID_GROUP_2,EVENT_NODE_ADDED);
195INSERT INTO event_group_members (group_id,event_code) VALUES (ID_GROUP_2,EVENT_SUBNET_ADDED);
196INSERT INTO event_group_members (group_id,event_code) VALUES (ID_GROUP_2,EVENT_INTERFACE_ADDED);
ef44d5ea
VK
197
198
199/*
200** Default container categories
201*/
202
203INSERT INTO container_categories (category,name,image_id,description)
204 VALUES (1,'Group',0,'Generic object group');
205INSERT INTO container_categories (category,name,image_id,description)
206 VALUES (2,'Location',0,'Geografic location');
207INSERT INTO container_categories (category,name,image_id,description)
208 VALUES (3,'Service',0,'Logical service');
5e918a37
VK
209
210
211/*
212** SNMP OID to node type mappings
213*/
214
215INSERT INTO oid_to_type (pair_id,snmp_oid,node_type,node_flags)
216 VALUES (0,'.1.3.6.1.4.1.2272.*',NODE_TYPE_NORTEL_ACCELAR,0);
8cbff47b
VK
217INSERT INTO oid_to_type (pair_id,snmp_oid,node_type,node_flags)
218 VALUES (1,'.1.3.6.1.4.1.3224.1.*',NODE_TYPE_NETSCREEN,0);
7e3ae259
VK
219INSERT INTO oid_to_type (pair_id,snmp_oid,node_type,node_flags)
220 VALUES (2,'.1.3.6.1.4.1.45.3.26.*',NODE_TYPE_NORTEL_BAYSTACK,0);
221INSERT INTO oid_to_type (pair_id,snmp_oid,node_type,node_flags)
222 VALUES (3,'.1.3.6.1.4.1.45.3.30.*',NODE_TYPE_NORTEL_BAYSTACK,0);
223INSERT INTO oid_to_type (pair_id,snmp_oid,node_type,node_flags)
224 VALUES (4,'.1.3.6.1.4.1.45.3.31.*',NODE_TYPE_NORTEL_BAYSTACK,0);
225INSERT INTO oid_to_type (pair_id,snmp_oid,node_type,node_flags)
226 VALUES (5,'.1.3.6.1.4.1.45.3.32.*',NODE_TYPE_NORTEL_BAYSTACK,0);
227INSERT INTO oid_to_type (pair_id,snmp_oid,node_type,node_flags)
228 VALUES (6,'.1.3.6.1.4.1.45.3.33.*',NODE_TYPE_NORTEL_BAYSTACK,0);
229INSERT INTO oid_to_type (pair_id,snmp_oid,node_type,node_flags)
230 VALUES (7,'.1.3.6.1.4.1.45.3.34.*',NODE_TYPE_NORTEL_BAYSTACK,0);
231INSERT INTO oid_to_type (pair_id,snmp_oid,node_type,node_flags)
232 VALUES (8,'.1.3.6.1.4.1.45.3.35.*',NODE_TYPE_NORTEL_BAYSTACK,0);
233INSERT INTO oid_to_type (pair_id,snmp_oid,node_type,node_flags)
234 VALUES (9,'.1.3.6.1.4.1.45.3.36.*',NODE_TYPE_NORTEL_BAYSTACK,0);
235INSERT INTO oid_to_type (pair_id,snmp_oid,node_type,node_flags)
236 VALUES (10,'.1.3.6.1.4.1.45.3.40.*',NODE_TYPE_NORTEL_BAYSTACK,0);
237INSERT INTO oid_to_type (pair_id,snmp_oid,node_type,node_flags)
238 VALUES (11,'.1.3.6.1.4.1.45.3.61.*',NODE_TYPE_NORTEL_BAYSTACK,0);