1alter table acknowledges modify message nvarchar2(255) DEFAULT ''; 2CREATE INDEX actions_1 on actions (eventsource,status); 3 4alter table actions modify name nvarchar2(255) DEFAULT ''; 5alter table actions modify def_shortdata nvarchar2(255) DEFAULT ''; 6alter table actions modify def_longdata nvarchar2(2048) DEFAULT ''; 7alter table actions modify r_shortdata nvarchar2(255) DEFAULT ''; 8alter table actions modify r_longdata nvarchar2(2048) DEFAULT ''; 9 10alter table alerts modify sendto nvarchar2(100) DEFAULT ''; 11alter table alerts modify subject nvarchar2(255) DEFAULT ''; 12alter table alerts modify message nvarchar2(2048) DEFAULT ''; 13alter table alerts modify error nvarchar2(128) DEFAULT ''; 14alter table applications modify name nvarchar2(255) DEFAULT ''; 15CREATE TABLE auditlog_details ( 16 auditdetailid number(20) DEFAULT '0' NOT NULL, 17 auditid number(20) DEFAULT '0' NOT NULL, 18 table_name nvarchar2(64) DEFAULT '' , 19 field_name nvarchar2(64) DEFAULT '' , 20 oldvalue nvarchar2(2048) DEFAULT '' , 21 newvalue nvarchar2(2048) DEFAULT '' , 22 PRIMARY KEY (auditdetailid) 23); 24CREATE INDEX auditlog_details_1 on auditlog_details (auditid); 25alter table auditlog add ip nvarchar2(39) DEFAULT ''; 26alter table auditlog add resourceid number(20) DEFAULT '0' NOT NULL; 27alter table auditlog add resourcename nvarchar2(255) DEFAULT ''; 28 29alter table auditlog modify details nvarchar2(128) DEFAULT '0'; 30CREATE TABLE autoreg_host ( 31 autoreg_hostid number(20) DEFAULT '0' NOT NULL, 32 proxy_hostid number(20) DEFAULT '0' NOT NULL, 33 host nvarchar2(64) DEFAULT '' , 34 PRIMARY KEY (autoreg_hostid) 35); 36CREATE UNIQUE INDEX autoreg_host_1 on autoreg_host (proxy_hostid,host); 37alter table conditions modify value nvarchar2(255) DEFAULT ''; 38alter table config add dropdown_first_entry number(10) DEFAULT '1' NOT NULL; 39alter table config add dropdown_first_remember number(10) DEFAULT '1' NOT NULL; 40alter table config add discovery_groupid number(20) DEFAULT '0' NOT NULL; 41alter table config add max_in_table number(10) DEFAULT '50' NOT NULL; 42alter table config add search_limit number(10) DEFAULT '1000' NOT NULL; 43 44 45alter table config modify work_period nvarchar2(100) DEFAULT '1-5,00:00-24:00'; 46alter table config modify default_theme nvarchar2(128) DEFAULT 'default.css'; 47alter table config modify ldap_host nvarchar2(255) DEFAULT ''; 48alter table config modify ldap_base_dn nvarchar2(255) DEFAULT ''; 49alter table config modify ldap_bind_dn nvarchar2(255) DEFAULT ''; 50alter table config modify ldap_bind_password nvarchar2(128) DEFAULT ''; 51alter table config modify ldap_search_attribute nvarchar2(128) DEFAULT ''; 52alter table dchecks add snmpv3_securityname nvarchar2(64) DEFAULT ''; 53alter table dchecks add snmpv3_securitylevel number(10) DEFAULT '0' NOT NULL; 54alter table dchecks add snmpv3_authpassphrase nvarchar2(64) DEFAULT ''; 55alter table dchecks add snmpv3_privpassphrase nvarchar2(64) DEFAULT ''; 56 57CREATE INDEX dchecks_1 on dchecks (druleid); 58 59alter table dchecks modify key_ nvarchar2(255) DEFAULT '0'; 60alter table dchecks modify snmp_community nvarchar2(255) DEFAULT '0'; 61alter table dchecks modify ports nvarchar2(255) DEFAULT '0'; 62alter table dservices add dcheckid number(20) DEFAULT '0' NOT NULL; 63alter table dservices add ip nvarchar2(39) DEFAULT ''; 64 65update dservices set ip=(select dhosts.ip from dhosts where dservices.dhostid=dhosts.dhostid); 66 67alter table dhosts drop column ip; 68 69CREATE INDEX dhosts_1 on dhosts (druleid); 70 71alter table drules add unique_dcheckid number(20) DEFAULT '0' NOT NULL; 72 73alter table drules modify name nvarchar2(255) DEFAULT ''; 74alter table drules modify iprange nvarchar2(255) DEFAULT ''; 75-- See also dhosts.sql 76 77CREATE UNIQUE INDEX dservices_1 on dservices (dcheckid,type,key_,ip,port); 78CREATE INDEX dservices_2 on dservices (dhostid); 79 80alter table dservices modify key_ nvarchar2(255) DEFAULT '0'; 81alter table dservices modify value nvarchar2(255) DEFAULT '0'; 82alter table dservices modify ip nvarchar2(39) DEFAULT ''; 83 84CREATE INDEX escalations_2 on escalations (status,nextcheck); 85DROP INDEX events_2; 86CREATE INDEX events_2 on events (clock, objectid); 87CREATE TABLE expressions ( 88 expressionid number(20) DEFAULT '0' NOT NULL, 89 regexpid number(20) DEFAULT '0' NOT NULL, 90 expression nvarchar2(255) DEFAULT '' , 91 expression_type number(10) DEFAULT '0' NOT NULL, 92 exp_delimiter nvarchar2(1) DEFAULT '' , 93 case_sensitive number(10) DEFAULT '0' NOT NULL, 94 PRIMARY KEY (expressionid) 95); 96CREATE INDEX expressions_1 on expressions (regexpid); 97 98alter table functions modify lastvalue nvarchar2(255); 99alter table functions modify function nvarchar2(12); 100alter table functions modify parameter nvarchar2(255); 101 102CREATE TABLE globalmacro ( 103 globalmacroid number(20) DEFAULT '0' NOT NULL, 104 macro nvarchar2(64) DEFAULT '' , 105 value nvarchar2(255) DEFAULT '' , 106 PRIMARY KEY (globalmacroid) 107); 108CREATE INDEX globalmacro_1 on globalmacro (macro); 109alter table graphs_items modify color nvarchar2(6) DEFAULT '009600'; 110 111CREATE INDEX graphs_items_1 on graphs_items (itemid); 112CREATE INDEX graphs_items_2 on graphs_items (graphid); 113 114alter table graphs_items modify color nvarchar2(6) DEFAULT '009600'; 115alter table graphs add ymin_type number(10) DEFAULT '0' NOT NULL; 116alter table graphs add ymax_type number(10) DEFAULT '0' NOT NULL; 117alter table graphs add ymin_itemid number(20) DEFAULT '0' NOT NULL; 118alter table graphs add ymax_itemid number(20) DEFAULT '0' NOT NULL; 119 120update graphs set ymin_type=yaxistype; 121update graphs set ymax_type=yaxistype; 122 123alter table graphs drop column yaxistype; 124 125alter table graphs modify name nvarchar2(128) DEFAULT ''; 126CREATE TABLE graph_theme ( 127 graphthemeid number(20) DEFAULT '0' NOT NULL, 128 description nvarchar2(64) DEFAULT '' , 129 theme nvarchar2(64) DEFAULT '' , 130 backgroundcolor nvarchar2(6) DEFAULT 'F0F0F0' , 131 graphcolor nvarchar2(6) DEFAULT 'FFFFFF' , 132 graphbordercolor nvarchar2(6) DEFAULT '222222' , 133 gridcolor nvarchar2(6) DEFAULT 'CCCCCC' , 134 maingridcolor nvarchar2(6) DEFAULT 'AAAAAA' , 135 gridbordercolor nvarchar2(6) DEFAULT '000000' , 136 textcolor nvarchar2(6) DEFAULT '202020' , 137 highlightcolor nvarchar2(6) DEFAULT 'AA4444' , 138 leftpercentilecolor nvarchar2(6) DEFAULT '11CC11' , 139 rightpercentilecolor nvarchar2(6) DEFAULT 'CC1111' , 140 noneworktimecolor nvarchar2(6) DEFAULT 'E0E0E0' , 141 gridview number(10) DEFAULT 1 NOT NULL, 142 legendview number(10) DEFAULT 1 NOT NULL, 143 PRIMARY KEY (graphthemeid) 144); 145CREATE INDEX graph_theme_1 on graph_theme (description); 146CREATE INDEX graph_theme_2 on graph_theme (theme); 147 148INSERT INTO graph_theme VALUES (1,'Original Blue','css_ob.css','F0F0F0','FFFFFF','333333','CCCCCC','AAAAAA','000000','222222','AA4444','11CC11','CC1111','E0E0E0',1,1); 149INSERT INTO graph_theme VALUES (2,'Black & Blue','css_bb.css','333333','0A0A0A','888888','222222','4F4F4F','EFEFEF','0088FF','CC4444','1111FF','FF1111','1F1F1F',1,1); 150alter table groups add internal number(10) DEFAULT '0' NOT NULL; 151 152alter table groups modify name nvarchar2(64) DEFAULT ''; 153drop table help_items; 154 155CREATE TABLE help_items ( 156 itemtype number(10) DEFAULT '0' NOT NULL, 157 key_ nvarchar2(255) DEFAULT '' , 158 description nvarchar2(255) DEFAULT '' , 159 PRIMARY KEY (itemtype,key_) 160); 161 162insert into help_items values (3,'icmpping[<ip>,<count>,<interval>,<size>,<timeout>]','Checks if server is accessible by ICMP ping. 0 - ICMP ping fails. 1 - ICMP ping successful. One of zabbix_server processes performs ICMP pings once per PingerFrequency seconds.'); 163insert into help_items values (3,'icmppingloss[<ip>,<count>,<interval>,<size>,<timeout>]','Returns percentage of lost ICMP ping packets.'); 164insert into help_items values (3,'icmppingsec[<ip>,<count>,<interval>,<size>,<timeout>,<type>]','Returns ICMP ping response time in seconds. Example: 0.02'); 165insert into help_items values (3,'ftp<,port>','Checks if FTP server is running and accepting connections. 0 - FTP server is down. 1 - FTP server is running.'); 166insert into help_items values (3,'http<,port>','Checks if HTTP (web) server is running and accepting connections. 0 - HTTP server is down. 1 - HTTP server is running.'); 167insert into help_items values (3,'imap<,port>','Checks if IMAP server is running and accepting connections. 0 - IMAP server is down. 1 - IMAP server is running.'); 168insert into help_items values (3,'ldap<,port>','Checks if LDAP server is running and accepting connections. 0 - LDAP server is down. 1 - LDAP server is running.'); 169insert into help_items values (3,'nntp<,port>','Checks if NNTP server is running and accepting connections. 0 - NNTP server is down. 1 - NNTP server is running.'); 170insert into help_items values (3,'ntp<,port>','Checks if NTP server is running and accepting connections. 0 - NTP server is down. 1 - NTP server is running.'); 171insert into help_items values (3,'pop<,port>','Checks if POP server is running and accepting connections. 0 - POP server is down. 1 - POP server is running.'); 172insert into help_items values (3,'smtp<,port>','Checks if SMTP server is running and accepting connections. 0 - SMTP server is down. 1 - SMTP server is running.'); 173insert into help_items values (3,'ssh<,port>','Checks if SSH server is running and accepting connections. 0 - SSH server is down. 1 - SSH server is running.'); 174insert into help_items values (3,'tcp,port','Checks if TCP service is running and accepting connections on port. 0 - the service on the port is down. 1 - the service is running.'); 175insert into help_items values (3,'ftp_perf<,port>','Checks if FTP server is running and accepting connections. 0 - FTP server is down. Otherwise, number of seconds spent connecting to FTP server.'); 176insert into help_items values (3,'http_perf<,port>','Checks if HTTP (web) server is running and accepting connections. 0 - HTTP server is down. Otherwise, number of seconds spent connecting to HTTP server.'); 177insert into help_items values (3,'imap_perf<,port>','Checks if IMAP server is running and accepting connections. 0 - IMAP server is down. Otherwise, number of seconds spent connecting to IMAP server.'); 178insert into help_items values (3,'ldap_perf<,port>','Checks if LDAP server is running and accepting connections. 0 - LDAP server is down. Otherwise, number of seconds spent connecting to LDAP server.'); 179insert into help_items values (3,'nntp_perf<,port>','Checks if NNTP server is running and accepting connections. 0 - NNTP server is down. Otherwise, number of seconds spent connecting to NNTP server.'); 180insert into help_items values (3,'ntp_perf<,port>','Checks if NTP server is running and accepting connections. 0 - NTP server is down. Otherwise, number of seconds spent connecting to NTP server.'); 181insert into help_items values (3,'pop_perf<,port>','Checks if POP server is running and accepting connections. 0 - POP server is down. Otherwise, number of milliseconds spent connecting to POP server.'); 182insert into help_items values (3,'smtp_perf<,port>','Checks if SMTP server is running and accepting connections. 0 - SMTP server is down. Otherwise, number of seconds spent connecting to SMTP server.'); 183insert into help_items values (3,'ssh_perf<,port>','Checks if SSH server is running and accepting connections. 0 - SSH server is down. Otherwise, number of seconds spent connecting to SSH server.'); 184insert into help_items values (3,'tcp_perf,port','Checks if TCP service is running and accepting connections on port. 0 - the service on the port is down. Otherwise, number of seconds spent connecting to TCP service.'); 185 186insert into help_items values (5,'zabbix[boottime]','Startup time of Zabbix server, Unix timestamp.'); 187insert into help_items values (5,'zabbix[history]','Number of values stored in table HISTORY.'); 188insert into help_items values (5,'zabbix[history_log]','Number of values stored in table HISTORY_LOG.'); 189insert into help_items values (5,'zabbix[history_str]','Number of values stored in table HISTORY_STR.'); 190insert into help_items values (5,'zabbix[history_text]','Number of values stored in table HISTORY_TEXT.'); 191insert into help_items values (5,'zabbix[history_uint]','Number of values stored in table HISTORY_UINT.'); 192insert into help_items values (5,'zabbix[items]','Number of items in Zabbix database.'); 193insert into help_items values (5,'zabbix[items_unsupported]','Number of unsupported items in Zabbix database.'); 194insert into help_items values (5,'zabbix[log]','Stores warning and error messages generated by Zabbix server.'); 195insert into help_items values (5,'zabbix[proxy,<name>,<param>]','Time of proxy last access. Name - proxy name. Param - lastaccess. Unix timestamp.'); 196insert into help_items values (5,'zabbix[queue<,from><,to>]','Number of items in the queue which are delayed by from to to seconds, inclusive.'); 197insert into help_items values (5,'zabbix[rcache,<cache>,<mode>]','Configuration cache statistics. Cache - buffer (modes: pfree, total, used, free).'); 198insert into help_items values (5,'zabbix[trends]','Number of values stored in table TRENDS.'); 199insert into help_items values (5,'zabbix[trends_uint]','Number of values stored in table TRENDS_UINT.'); 200insert into help_items values (5,'zabbix[triggers]','Number of triggers in Zabbix database.'); 201insert into help_items values (5,'zabbix[uptime]','Uptime of Zabbix server process in seconds.'); 202insert into help_items values (5,'zabbix[wcache,<cache>,<mode>]','Data cache statistics. Cache - one of values (modes: all, float, uint, str, log, text), history (modes: pfree, total, used, free), trend (modes: pfree, total, used, free), text (modes: pfree, total, used, free).'); 203insert into help_items values (5,'zabbix[process,<type>,<num>,<state>]','Time a particular Zabbix process or a group of processes (identified by <type> and <num>) spent in <state> in percentage.'); 204 205insert into help_items values (8,'grpfunc[<Group>,<Key>,<func>,<param>]','Aggregate checks do not require any agent running on a host being monitored. Zabbix server collects aggregate information by doing direct database queries. See Zabbix Manual.'); 206 207insert into help_items values(0,'agent.ping','Check the agent usability. Always return 1. Can be used as a TCP ping.'); 208insert into help_items values(0,'agent.version','Version of zabbix_agent(d) running on monitored host. String value. Example of returned value: 1.1'); 209insert into help_items values(0,'kernel.maxfiles','Maximum number of opened files supported by OS.'); 210insert into help_items values(0,'kernel.maxproc','Maximum number of processes supported by OS.'); 211insert into help_items values(0,'net.if.collisions[if]','Out-of-window collision. Collisions count.'); 212insert into help_items values(0,'net.if.in[if <,mode>]','Network interface input statistic. Integer value. If mode is missing bytes is used.'); 213insert into help_items values(0,'net.if.out[if <,mode>]','Network interface output statistic. Integer value. If mode is missing bytes is used.'); 214insert into help_items values(0,'net.if.total[if <,mode>]','Sum of network interface incoming and outgoing statistics. Integer value. Mode - one of bytes (default), packets, errors or dropped'); 215insert into help_items values(0,'net.if.list','List of network interfaces. Text value.'); 216insert into help_items values(0,'net.tcp.dns[ip, zone]','Checks if DNS service is up. 0 - DNS is down, 1 - DNS is up.'); 217insert into help_items values(0,'net.tcp.dns.query[ip, zone, type]','Performs a query for the record type specified by the parameter type'); 218insert into help_items values(0,'net.tcp.listen[port]','Checks if this port is in LISTEN state. 0 - it is not, 1 - it is in LISTEN state.'); 219insert into help_items values(0,'net.tcp.port[<ip>, port]','Check, if it is possible to make TCP connection to the port number. 0 - cannot connect, 1 - can connect. IP address is optional. If ip is missing, 127.0.0.1 is used. Example: net.tcp.port[,80]'); 220insert into help_items values(0,'net.tcp.service[service <,ip> <,port>]','Check if service server is running and accepting connections. 0 - service is down, 1 - service is running. If ip is missing 127.0.0.1 is used. If port number is missing, default service port is used. Example: net.tcp.service[ftp,,45].'); 221insert into help_items values(0,'net.tcp.service.perf[service <,ip> <,port>]','Check performance of service "service". 0 - service is down, sec - number of seconds spent on connection to the service. If ip is missing 127.0.0.1 is used. If port number is missing, default service port is used.'); 222insert into help_items values(0,'proc.mem[<name> <,user> <,mode> <,cmdline>]','Memory used by process with name name running under user user. Memory used by processes. Process name, user and mode is optional. If name or user is missing all processes will be calculated. If mode is missing sum is used. Example: proc.mem[,root]'); 223insert into help_items values(0,'proc.num[<name> <,user> <,state> <,cmdline>]','Number of processes with name name running under user user having state state. Process name, user and state are optional. Examples: proc.num[,mysql]; proc.num[apache2,www-data]; proc.num[,oracle,sleep,oracleZABBIX]'); 224insert into help_items values(0,'system.cpu.intr','Device interrupts.'); 225insert into help_items values(0,'system.cpu.load[<cpu> <,mode>]','CPU(s) load. Processor load. The cpu and mode are optional. If cpu is missing all is used. If mode is missing avg1 is used. Note that this is not percentage.'); 226insert into help_items values(0,'system.cpu.switches','Context switches.'); 227insert into help_items values(0,'system.cpu.util[<cpu> <,type> <,mode>]','CPU(s) utilisation. Processor load in percents. The cpu, type and mode are optional. If cpu is missing all is used. If type is missing user is used. If mode is missing avg1 is used.'); 228insert into help_items values(0,'system.boottime','Timestamp of system boot.'); 229insert into help_items values(0,'system.cpu.num','Number of available proccessors.'); 230insert into help_items values(0,'system.hostname[<type>]','Returns hostname (or NetBIOS name (by default) on Windows). String value. Example of returned value: www.zabbix.com'); 231insert into help_items values(0,'system.localtime','System local time. Time in seconds.'); 232insert into help_items values(0,'system.run[command,<mode>]','Run specified command on the host.'); 233insert into help_items values(0,'system.swap.in[<swap> <,type>]','Swap in. If type is count - swapins is returned. If type is pages - pages swapped in is returned. If swap is missing all is used.'); 234insert into help_items values(0,'system.swap.out[<swap> <,type>]','Swap out. If type is count - swapouts is returned. If type is pages - pages swapped in is returned. If swap is missing all is used.'); 235insert into help_items values(0,'system.swap.size[<swap> <,mode>]','Swap space. Number of bytes. If swap is missing all is used. If mode is missing free is used.'); 236insert into help_items values(0,'system.uname','Returns detailed host information. String value'); 237insert into help_items values(0,'system.uptime','System uptime in seconds.'); 238insert into help_items values(0,'system.users.num','Number of users connected. Command who is used on agent side.'); 239insert into help_items values(0,'vfs.dev.read[device <,type> <,mode>]','Device read statistics.'); 240insert into help_items values(0,'vfs.dev.write[device <,type> <,mode>]','Device write statistics.'); 241insert into help_items values(0,'vfs.file.cksum[file]','Calculate check sum of a given file. Check sum of the file calculate by standard algorithm used by UNIX utility cksum. Example: vfs.file.cksum[/etc/passwd]'); 242insert into help_items values(0,'vfs.file.exists[file]','Check file existence. 0 - file does not exist, 1 - file exists'); 243insert into help_items values(0,'vfs.file.md5sum[file]','Calculate MD5 check sum of a given file. String MD5 hash of the file. Can be used for files less than 64MB, unsupported otherwise. Example: vfs.file.md5sum[/usr/local/etc/zabbix3/zabbix_agentd.conf]'); 244insert into help_items values(0,'vfs.file.regexp[file,regexp]','Find string in a file. Matched string'); 245insert into help_items values(0,'vfs.file.regmatch[file,regexp]','Find string in a file. 0 - expression not found, 1 - found'); 246insert into help_items values(0,'vfs.file.size[file]','Size of a given file. Size in bytes. File must have read permissions for user zabbix. Example: vfs.file.size[/var/log/syslog]'); 247insert into help_items values(0,'vfs.file.time[file <,mode>]','File time information. Number of seconds. The mode is optional. If mode is missing modify is used.'); 248insert into help_items values(0,'vfs.fs.inode[fs <,mode>]','Number of inodes for a given volume. If mode is missing total is used.'); 249insert into help_items values(0,'vfs.fs.size[fs <,mode>]','Calculate disk space for a given volume. Disk space in KB. If mode is missing total is used. In case of mounted volume, unused disk space for local file system is returned. Example: vfs.fs.size[/tmp,free].'); 250insert into help_items values(0,'vm.memory.size[<mode>]','Amount of memory size in bytes. If mode is missing total is used.'); 251insert into help_items values(0,'web.page.get[host,<path>,<port>]','Get content of web page. Default path is /'); 252insert into help_items values(0,'web.page.perf[host,<path>,<port>]','Get timing of loading full web page. Default path is /'); 253insert into help_items values(0,'web.page.regexp[host,<path>,<port>,<regexp>,<length>]','Get first occurrence of regexp in web page. Default path is /'); 254insert into help_items values(0,'perf_counter[counter, interval]','Value of any performance counter, where "counter" parameter is the counter path and "interval" parameter is a number of last seconds, for which the agent returns an average value.'); 255insert into help_items values(0,'service_state[service]','State of service. 0 - running, 1 - paused, 2 - start pending, 3 - pause pending, 4 - continue pending, 5 - stop pending, 6 - stopped, 7 - unknown, 255 - no such service'); 256insert into help_items values(0,'proc_info[<process>,<attribute>,<type>]','Different information about specific process(es)'); 257insert into help_items values(0,'system.stat[resource <,type>]','Virtual memory statistics.'); 258 259insert into help_items values(7,'agent.ping','Check the agent usability. Always return 1. Can be used as a TCP ping.'); 260insert into help_items values(7,'agent.version','Version of zabbix_agent(d) running on monitored host. String value. Example of returned value: 1.1'); 261insert into help_items values(7,'kernel.maxfiles','Maximum number of opened files supported by OS.'); 262insert into help_items values(7,'kernel.maxproc','Maximum number of processes supported by OS.'); 263insert into help_items values(7,'net.if.collisions[if]','Out-of-window collision. Collisions count.'); 264insert into help_items values(7,'net.if.in[if <,mode>]','Network interface input statistic. Integer value. If mode is missing bytes is used.'); 265insert into help_items values(7,'net.if.out[if <,mode>]','Network interface output statistic. Integer value. If mode is missing bytes is used.'); 266insert into help_items values(7,'net.if.total[if <,mode>]','Sum of network interface incoming and outgoing statistics. Integer value. Mode - one of bytes (default), packets, errors or dropped'); 267insert into help_items values(7,'net.if.list','List of network interfaces. Text value.'); 268insert into help_items values(7,'net.tcp.dns[ip, zone]','Checks if DNS service is up. 0 - DNS is down, 1 - DNS is up.'); 269insert into help_items values(7,'net.tcp.dns.query[ip, zone, type]','Performs a query for the record type specified by the parameter type'); 270insert into help_items values(7,'net.tcp.listen[port]','Checks if this port is in LISTEN state. 0 - it is not, 1 - it is in LISTEN state.'); 271insert into help_items values(7,'net.tcp.port[<ip>, port]','Check, if it is possible to make TCP connection to the port number. 0 - cannot connect, 1 - can connect. IP address is optional. If ip is missing, 127.0.0.1 is used. Example: net.tcp.port[,80]'); 272insert into help_items values(7,'net.tcp.service[service <,ip> <,port>]','Check if service server is running and accepting connections. 0 - service is down, 1 - service is running. If ip is missing 127.0.0.1 is used. If port number is missing, default service port is used. Example: net.tcp.service[ftp,,45].'); 273insert into help_items values(7,'net.tcp.service.perf[service <,ip> <,port>]','Check performance of service "service". 0 - service is down, sec - number of seconds spent on connection to the service. If ip is missing 127.0.0.1 is used. If port number is missing, default service port is used.'); 274insert into help_items values(7,'proc.mem[<name> <,user> <,mode> <,cmdline>]','Memory used by process with name name running under user user. Memory used by processes. Process name, user and mode is optional. If name or user is missing all processes will be calculated. If mode is missing sum is used. Example: proc.mem[,root]'); 275insert into help_items values(7,'proc.num[<name> <,user> <,state> <,cmdline>]','Number of processes with name name running under user user having state state. Process name, user and state are optional. Examples: proc.num[,mysql]; proc.num[apache2,www-data]; proc.num[,oracle,sleep,oracleZABBIX]'); 276insert into help_items values(7,'system.cpu.intr','Device interrupts.'); 277insert into help_items values(7,'system.cpu.load[<cpu> <,mode>]','CPU(s) load. Processor load. The cpu and mode are optional. If cpu is missing all is used. If mode is missing avg1 is used. Note that this is not percentage.'); 278insert into help_items values(7,'system.cpu.switches','Context switches.'); 279insert into help_items values(7,'system.cpu.util[<cpu> <,type> <,mode>]','CPU(s) utilisation. Processor load in percents. The cpu, type and mode are optional. If cpu is missing all is used. If type is missing user is used. If mode is missing avg1 is used.'); 280insert into help_items values(7,'system.boottime','Timestamp of system boot.'); 281insert into help_items values(7,'system.cpu.num','Number of available proccessors.'); 282insert into help_items values(7,'system.hostname[<type>]','Returns hostname (or NetBIOS name (by default) on Windows). String value. Example of returned value: www.zabbix.com'); 283insert into help_items values(7,'system.localtime','System local time. Time in seconds.'); 284insert into help_items values(7,'system.run[command,<mode>]','Run specified command on the host.'); 285insert into help_items values(7,'system.swap.in[<swap> <,type>]','Swap in. If type is count - swapins is returned. If type is pages - pages swapped in is returned. If swap is missing all is used.'); 286insert into help_items values(7,'system.swap.out[<swap> <,type>]','Swap out. If type is count - swapouts is returned. If type is pages - pages swapped in is returned. If swap is missing all is used.'); 287insert into help_items values(7,'system.swap.size[<swap> <,mode>]','Swap space. Number of bytes. If swap is missing all is used. If mode is missing free is used.'); 288insert into help_items values(7,'system.uname','Returns detailed host information. String value'); 289insert into help_items values(7,'system.uptime','System uptime in seconds.'); 290insert into help_items values(7,'system.users.num','Number of users connected. Command who is used on agent side.'); 291insert into help_items values(7,'vfs.dev.read[device <,type> <,mode>]','Device read statistics.'); 292insert into help_items values(7,'vfs.dev.write[device <,type> <,mode>]','Device write statistics.'); 293insert into help_items values(7,'vfs.file.cksum[file]','Calculate check sum of a given file. Check sum of the file calculate by standard algorithm used by UNIX utility cksum. Example: vfs.file.cksum[/etc/passwd]'); 294insert into help_items values(7,'vfs.file.exists[file]','Check file existence. 0 - file does not exist, 1 - file exists'); 295insert into help_items values(7,'vfs.file.md5sum[file]','Calculate MD5 check sum of a given file. String MD5 hash of the file. Can be used for files less than 64MB, unsupported otherwise. Example: vfs.file.md5sum[/usr/local/etc/zabbix3/zabbix_agentd.conf]'); 296insert into help_items values(7,'vfs.file.regexp[file,regexp]','Find string in a file. Matched string'); 297insert into help_items values(7,'vfs.file.regmatch[file,regexp]','Find string in a file. 0 - expression not found, 1 - found'); 298insert into help_items values(7,'vfs.file.size[file]','Size of a given file. Size in bytes. File must have read permissions for user zabbix. Example: vfs.file.size[/var/log/syslog]'); 299insert into help_items values(7,'vfs.file.time[file<, mode>]','File time information. Number of seconds. The mode is optional. If mode is missing modify is used.'); 300insert into help_items values(7,'vfs.fs.inode[fs <,mode>]','Number of inodes for a given volume. If mode is missing total is used.'); 301insert into help_items values(7,'vfs.fs.size[fs <,mode>]','Calculate disk space for a given volume. Disk space in KB. If mode is missing total is used. In case of mounted volume, unused disk space for local file system is returned. Example: vfs.fs.size[/tmp,free].'); 302insert into help_items values(7,'vm.memory.size[<mode>]','Amount of memory size in bytes. If mode is missing total is used.'); 303insert into help_items values(7,'web.page.get[host,<path>,<port>]','Get content of web page. Default path is /'); 304insert into help_items values(7,'web.page.perf[host,<path>,<port>]','Get timing of loading full web page. Default path is /'); 305insert into help_items values(7,'web.page.regexp[host,<path>,<port>,<regexp>,<length>]','Get first occurrence of regexp in web page. Default path is /'); 306insert into help_items values(7,'perf_counter[counter]','Value of any performance counter, where parameter is the counter path.'); 307insert into help_items values(7,'service_state[service]','State of service. 0 - running, 1 - paused, 2 - start pending, 3 - pause pending, 4 - continue pending, 5 - stop pending, 6 - stopped, 7 - unknown, 255 - no such service'); 308insert into help_items values(7,'proc_info[<process>,<attribute>,<type>]','Different information about specific process(es)'); 309insert into help_items values(7,'log[file,<pattern>,<encoding>,<maxlines>]','Monitoring of log file. pattern - regular expression'); 310insert into help_items values(7,'logrt[file_format,<pattern>,<encoding>,<maxlines>]', 'Monitoring of log file with rotation. fileformat - [path][regexp], pattern - regular expression'); 311insert into help_items values(7,'eventlog[logtype,<pattern>,<severity>,<source>,<eventid>,<maxlines>]','Monitoring of Windows event logs. pattern, severity, eventid - regular expressions'); 312insert into help_items values(7,'system.stat[resource <,type>]','Virtual memory statistics.'); 313alter table history_log add logeventid number(10) DEFAULT '0' NOT NULL; 314 315CREATE TABLE history_log_tmp ( 316 id number(20) DEFAULT '0' NOT NULL, 317 itemid number(20) DEFAULT '0' NOT NULL, 318 clock number(10) DEFAULT '0' NOT NULL, 319 timestamp number(10) DEFAULT '0' NOT NULL, 320 source nvarchar2(64) DEFAULT '' , 321 severity number(10) DEFAULT '0' NOT NULL, 322 value nclob DEFAULT '' , 323 logeventid number(10) DEFAULT '0' NOT NULL, 324 PRIMARY KEY (id) 325); 326 327 328insert into history_log_tmp select * from history_log; 329drop table history_log; 330 331alter table history_log_tmp rename to history_log; 332 333CREATE INDEX history_log_1 on history_log (itemid,clock); 334CREATE UNIQUE INDEX history_log_2 on history_log (itemid,id); 335 336alter table history_str modify value nvarchar2(255) DEFAULT ''; 337alter table history_str_sync modify value nvarchar2(255) DEFAULT ''; 338 339CREATE SEQUENCE history_str_sync_seq 340START WITH 1 341INCREMENT BY 1 342NOMAXVALUE 343/ 344 345CREATE TRIGGER history_str_sync_tr 346BEFORE INSERT ON history_str_sync 347FOR EACH ROW 348BEGIN 349SELECT proxy_history_seq.nextval INTO :new.id FROM dual; 350END; 351/ 352 353CREATE SEQUENCE history_sync_seq 354START WITH 1 355INCREMENT BY 1 356NOMAXVALUE 357/ 358 359CREATE TRIGGER history_sync_tr 360BEFORE INSERT ON history_sync 361FOR EACH ROW 362BEGIN 363SELECT proxy_history_seq.nextval INTO :new.id FROM dual; 364END; 365/ 366 367CREATE TABLE history_text_tmp ( 368 id number(20) DEFAULT '0' NOT NULL, 369 itemid number(20) DEFAULT '0' NOT NULL, 370 clock number(10) DEFAULT '0' NOT NULL, 371 value nclob DEFAULT '' , 372 PRIMARY KEY (id) 373); 374 375insert into history_text_tmp select * from history_text; 376drop table history_text; 377 378alter table history_text_tmp rename to history_text; 379 380CREATE INDEX history_text_1 on history_text (itemid,clock); 381CREATE UNIQUE INDEX history_text_2 on history_text (itemid,id); 382CREATE SEQUENCE history_uint_sync_seq 383START WITH 1 384INCREMENT BY 1 385NOMAXVALUE 386/ 387 388CREATE TRIGGER history_uint_sync_tr 389BEFORE INSERT ON history_uint_sync 390FOR EACH ROW 391BEGIN 392SELECT proxy_history_seq.nextval INTO :new.id FROM dual; 393END; 394/ 395 396CREATE TABLE hostmacro ( 397 hostmacroid number(20) DEFAULT '0' NOT NULL, 398 hostid number(20) DEFAULT '0' NOT NULL, 399 macro nvarchar2(64) DEFAULT '' , 400 value nvarchar2(255) DEFAULT '' , 401 PRIMARY KEY (hostmacroid) 402); 403CREATE INDEX hostmacro_1 on hostmacro (hostid,macro); 404 405drop index hosts_groups_groups_1; 406CREATE INDEX hosts_groups_1 on hosts_groups (hostid,groupid); 407CREATE INDEX hosts_groups_2 on hosts_groups (groupid); 408alter table hosts_profiles_ext modify device_alias nvarchar2(64) DEFAULT '' ; 409alter table hosts_profiles_ext modify device_type nvarchar2(64) DEFAULT '' ; 410alter table hosts_profiles_ext modify device_chassis nvarchar2(64) DEFAULT '' ; 411alter table hosts_profiles_ext modify device_os nvarchar2(64) DEFAULT '' ; 412alter table hosts_profiles_ext modify device_os_short nvarchar2(64) DEFAULT '' ; 413alter table hosts_profiles_ext modify device_hw_arch nvarchar2(32) DEFAULT '' ; 414alter table hosts_profiles_ext modify device_serial nvarchar2(64) DEFAULT '' ; 415alter table hosts_profiles_ext modify device_model nvarchar2(64) DEFAULT '' ; 416alter table hosts_profiles_ext modify device_tag nvarchar2(64) DEFAULT '' ; 417alter table hosts_profiles_ext modify device_vendor nvarchar2(64) DEFAULT '' ; 418alter table hosts_profiles_ext modify device_contract nvarchar2(64) DEFAULT '' ; 419alter table hosts_profiles_ext modify device_who nvarchar2(64) DEFAULT '' ; 420alter table hosts_profiles_ext modify device_status nvarchar2(64) DEFAULT '' ; 421alter table hosts_profiles_ext modify device_app_01 nvarchar2(64) DEFAULT '' ; 422alter table hosts_profiles_ext modify device_app_02 nvarchar2(64) DEFAULT '' ; 423alter table hosts_profiles_ext modify device_app_03 nvarchar2(64) DEFAULT '' ; 424alter table hosts_profiles_ext modify device_app_04 nvarchar2(64) DEFAULT '' ; 425alter table hosts_profiles_ext modify device_app_05 nvarchar2(64) DEFAULT '' ; 426alter table hosts_profiles_ext modify device_url_1 nvarchar2(255) DEFAULT '' ; 427alter table hosts_profiles_ext modify device_url_2 nvarchar2(255) DEFAULT '' ; 428alter table hosts_profiles_ext modify device_url_3 nvarchar2(255) DEFAULT '' ; 429alter table hosts_profiles_ext modify device_networks nvarchar2(2048) DEFAULT '' ; 430alter table hosts_profiles_ext modify device_notes nvarchar2(2048) DEFAULT '' ; 431alter table hosts_profiles_ext modify device_hardware nvarchar2(2048) DEFAULT '' ; 432alter table hosts_profiles_ext modify device_software nvarchar2(2048) DEFAULT '' ; 433alter table hosts_profiles_ext modify ip_subnet_mask nvarchar2(39) DEFAULT '' ; 434alter table hosts_profiles_ext modify ip_router nvarchar2(39) DEFAULT '' ; 435alter table hosts_profiles_ext modify ip_macaddress nvarchar2(64) DEFAULT '' ; 436alter table hosts_profiles_ext modify oob_ip nvarchar2(39) DEFAULT '' ; 437alter table hosts_profiles_ext modify oob_subnet_mask nvarchar2(39) DEFAULT '' ; 438alter table hosts_profiles_ext modify oob_router nvarchar2(39) DEFAULT '' ; 439alter table hosts_profiles_ext modify date_hw_buy nvarchar2(64) DEFAULT '' ; 440alter table hosts_profiles_ext modify date_hw_install nvarchar2(64) DEFAULT '' ; 441alter table hosts_profiles_ext modify date_hw_expiry nvarchar2(64) DEFAULT '' ; 442alter table hosts_profiles_ext modify date_hw_decomm nvarchar2(64) DEFAULT '' ; 443alter table hosts_profiles_ext modify site_street_1 nvarchar2(128) DEFAULT '' ; 444alter table hosts_profiles_ext modify site_street_2 nvarchar2(128) DEFAULT '' ; 445alter table hosts_profiles_ext modify site_street_3 nvarchar2(128) DEFAULT '' ; 446alter table hosts_profiles_ext modify site_city nvarchar2(128) DEFAULT '' ; 447alter table hosts_profiles_ext modify site_state nvarchar2(64) DEFAULT '' ; 448alter table hosts_profiles_ext modify site_country nvarchar2(64) DEFAULT '' ; 449alter table hosts_profiles_ext modify site_zip nvarchar2(64) DEFAULT '' ; 450alter table hosts_profiles_ext modify site_rack nvarchar2(128) DEFAULT '' ; 451alter table hosts_profiles_ext modify site_notes nvarchar2(2048) DEFAULT '' ; 452alter table hosts_profiles_ext modify poc_1_name nvarchar2(128) DEFAULT '' ; 453alter table hosts_profiles_ext modify poc_1_email nvarchar2(128) DEFAULT '' ; 454alter table hosts_profiles_ext modify poc_1_phone_1 nvarchar2(64) DEFAULT '' ; 455alter table hosts_profiles_ext modify poc_1_phone_2 nvarchar2(64) DEFAULT '' ; 456alter table hosts_profiles_ext modify poc_1_cell nvarchar2(64) DEFAULT '' ; 457alter table hosts_profiles_ext modify poc_1_screen nvarchar2(64) DEFAULT '' ; 458alter table hosts_profiles_ext modify poc_1_notes nvarchar2(2048) DEFAULT '' ; 459alter table hosts_profiles_ext modify poc_2_name nvarchar2(128) DEFAULT '' ; 460alter table hosts_profiles_ext modify poc_2_email nvarchar2(128) DEFAULT '' ; 461alter table hosts_profiles_ext modify poc_2_phone_1 nvarchar2(64) DEFAULT '' ; 462alter table hosts_profiles_ext modify poc_2_phone_2 nvarchar2(64) DEFAULT '' ; 463alter table hosts_profiles_ext modify poc_2_cell nvarchar2(64) DEFAULT '' ; 464alter table hosts_profiles_ext modify poc_2_screen nvarchar2(64) DEFAULT '' ; 465alter table hosts_profiles_ext modify poc_2_notes nvarchar2(2048) DEFAULT '' ; 466 467alter table hosts_profiles modify devicetype nvarchar2(64) DEFAULT ''; 468alter table hosts_profiles modify name nvarchar2(64) DEFAULT ''; 469alter table hosts_profiles modify os nvarchar2(64) DEFAULT ''; 470alter table hosts_profiles modify serialno nvarchar2(64) DEFAULT ''; 471alter table hosts_profiles modify tag nvarchar2(64) DEFAULT ''; 472alter table hosts_profiles modify macaddress nvarchar2(64) DEFAULT ''; 473alter table hosts_profiles modify hardware nvarchar2(2048) DEFAULT ''; 474alter table hosts_profiles modify software nvarchar2(2048) DEFAULT ''; 475alter table hosts_profiles modify contact nvarchar2(2048) DEFAULT ''; 476alter table hosts_profiles modify location nvarchar2(2048) DEFAULT ''; 477alter table hosts_profiles modify notes nvarchar2(2048) DEFAULT ''; 478alter table hosts add maintenanceid number(20) DEFAULT '0' NOT NULL; 479alter table hosts add maintenance_status number(10) DEFAULT '0' NOT NULL; 480alter table hosts add maintenance_type number(10) DEFAULT '0' NOT NULL; 481alter table hosts add maintenance_from number(10) DEFAULT '0' NOT NULL; 482alter table hosts add ipmi_ip nvarchar2(64) DEFAULT '127.0.0.1'; 483alter table hosts add ipmi_errors_from number(10) DEFAULT '0' NOT NULL; 484alter table hosts add snmp_errors_from number(10) DEFAULT '0' NOT NULL; 485alter table hosts add ipmi_error nvarchar2(128) DEFAULT ''; 486alter table hosts add snmp_error nvarchar2(128) DEFAULT ''; 487 488alter table hosts modify host nvarchar2(64) DEFAULT ''; 489alter table hosts modify dns nvarchar2(64) DEFAULT ''; 490alter table hosts modify ip nvarchar2(39) DEFAULT '127.0.0.1'; 491alter table hosts modify error nvarchar2(128) DEFAULT ''; 492alter table hosts modify ipmi_username nvarchar2(16) DEFAULT ''; 493alter table hosts modify ipmi_password nvarchar2(20) DEFAULT ''; 494alter table hosts modify ipmi_ip nvarchar2(64) DEFAULT '127.0.0.1'; 495 496CREATE INDEX hosts_templates_2 on hosts_templates (templateid); 497alter table housekeeper modify tablename nvarchar2(64) DEFAULT ''; 498alter table housekeeper modify field nvarchar2(64) DEFAULT ''; 499alter table httpstep modify name nvarchar2(64) DEFAULT ''; 500alter table httpstep modify url nvarchar2(255) DEFAULT ''; 501alter table httpstep modify posts nvarchar2(2048) DEFAULT ''; 502alter table httpstep modify required nvarchar2(255) DEFAULT ''; 503alter table httpstep modify status_codes nvarchar2(255) DEFAULT ''; 504alter table httptest add authentication number(10) DEFAULT '0' NOT NULL; 505alter table httptest add http_user nvarchar2(64) DEFAULT ''; 506alter table httptest add http_password nvarchar2(64) DEFAULT ''; 507 508CREATE INDEX httptest_2 on httptest (name); 509CREATE INDEX httptest_3 on httptest (status); 510 511alter table httptest modify name nvarchar2(64) DEFAULT ''; 512alter table httptest modify macros nvarchar2(2048) DEFAULT ''; 513alter table httptest modify agent nvarchar2(255) DEFAULT ''; 514alter table httptest modify error nvarchar2(255) DEFAULT ''; 515alter table ids modify table_name nvarchar2(64) DEFAULT ''; 516alter table ids modify field_name nvarchar2(64) DEFAULT ''; 517 518alter table images modify name nvarchar2(64) DEFAULT '0'; 519 520alter table items drop column nextcheck; 521alter table items add data_type number(10) DEFAULT '0' NOT NULL; 522alter table items add authtype number(10) DEFAULT '0' NOT NULL; 523alter table items add username nvarchar2(64) DEFAULT ''; 524alter table items add password nvarchar2(64) DEFAULT ''; 525alter table items add publickey nvarchar2(64) DEFAULT ''; 526alter table items add privatekey nvarchar2(64) DEFAULT ''; 527alter table items add mtime number(10) DEFAULT '0' NOT NULL; 528 529alter table items modify snmp_community nvarchar2(64) DEFAULT ''; 530alter table items modify snmp_oid nvarchar2(255) DEFAULT ''; 531alter table items modify description nvarchar2(255) DEFAULT ''; 532alter table items modify key_ nvarchar2(255) DEFAULT ''; 533alter table items modify lastvalue nvarchar2(255); 534alter table items modify prevvalue nvarchar2(255); 535alter table items modify trapper_hosts nvarchar2(255); 536alter table items modify units nvarchar2(10); 537alter table items modify prevorgvalue nvarchar2(255); 538alter table items modify snmpv3_securityname nvarchar2(64); 539alter table items modify snmpv3_authpassphrase nvarchar2(64); 540alter table items modify snmpv3_privpassphrase nvarchar2(64); 541alter table items modify formula nvarchar2(255) DEFAULT '1'; 542alter table items modify error nvarchar2(128) DEFAULT ''; 543alter table items modify logtimefmt nvarchar2(64) DEFAULT ''; 544alter table items modify delay_flex nvarchar2(255) DEFAULT ''; 545alter table items modify params nvarchar2(2048) DEFAULT ''; 546alter table items modify ipmi_sensor nvarchar2(128) DEFAULT ''; 547 548UPDATE items SET units='Bps' WHERE type=9 AND units='bps'; 549CREATE TABLE maintenances_groups ( 550 maintenance_groupid number(20) DEFAULT '0' NOT NULL, 551 maintenanceid number(20) DEFAULT '0' NOT NULL, 552 groupid number(20) DEFAULT '0' NOT NULL, 553 PRIMARY KEY (maintenance_groupid) 554); 555CREATE INDEX maintenances_groups_1 on maintenances_groups (maintenanceid,groupid); 556 557CREATE TABLE maintenances_hosts ( 558 maintenance_hostid number(20) DEFAULT '0' NOT NULL, 559 maintenanceid number(20) DEFAULT '0' NOT NULL, 560 hostid number(20) DEFAULT '0' NOT NULL, 561 PRIMARY KEY (maintenance_hostid) 562); 563CREATE INDEX maintenances_hosts_1 on maintenances_hosts (maintenanceid,hostid); 564 565CREATE TABLE maintenances ( 566 maintenanceid number(20) DEFAULT '0' NOT NULL, 567 name nvarchar2(128) DEFAULT '' , 568 maintenance_type number(10) DEFAULT '0' NOT NULL, 569 description nvarchar2(2048) DEFAULT '' , 570 active_since number(10) DEFAULT '0' NOT NULL, 571 active_till number(10) DEFAULT '0' NOT NULL, 572 PRIMARY KEY (maintenanceid) 573); 574CREATE INDEX maintenances_1 on maintenances (active_since,active_till); 575 576CREATE TABLE maintenances_windows ( 577 maintenance_timeperiodid number(20) DEFAULT '0' NOT NULL, 578 maintenanceid number(20) DEFAULT '0' NOT NULL, 579 timeperiodid number(20) DEFAULT '0' NOT NULL, 580 PRIMARY KEY (maintenance_timeperiodid) 581); 582CREATE INDEX maintenances_windows_1 on maintenances_windows (maintenanceid,timeperiodid); 583 584alter table mappings modify value nvarchar2(64) DEFAULT ''; 585alter table mappings modify newvalue nvarchar2(64) DEFAULT ''; 586 587alter table media modify sendto nvarchar2(100) DEFAULT ''; 588alter table media modify period nvarchar2(100) DEFAULT '1-7,00:00-23:59'; 589 590alter table media_type modify description nvarchar2(100) DEFAULT ''; 591alter table media_type modify smtp_server nvarchar2(255) DEFAULT ''; 592alter table media_type modify smtp_helo nvarchar2(255) DEFAULT ''; 593alter table media_type modify smtp_email nvarchar2(255) DEFAULT ''; 594alter table media_type modify exec_path nvarchar2(255) DEFAULT ''; 595alter table media_type modify gsm_modem nvarchar2(255) DEFAULT ''; 596alter table media_type modify username nvarchar2(255) DEFAULT ''; 597alter table media_type modify passwd nvarchar2(255) DEFAULT ''; 598 599DROP TABLE node_cksum; 600CREATE TABLE node_cksum ( 601 nodeid number(10) DEFAULT '0' NOT NULL, 602 tablename nvarchar2(64) DEFAULT '' , 603 recordid number(20) DEFAULT '0' NOT NULL, 604 cksumtype number(10) DEFAULT '0' NOT NULL, 605 cksum nclob DEFAULT '' , 606 sync nvarchar2(128) DEFAULT '' 607); 608CREATE INDEX node_cksum_1 on node_cksum (nodeid,cksumtype,tablename,recordid); 609alter table nodes modify name nvarchar2(64) DEFAULT '0'; 610alter table nodes modify ip nvarchar2(39) DEFAULT ''; 611alter table opconditions modify value nvarchar2(255) DEFAULT ''; 612alter table operations modify shortdata nvarchar2(255) DEFAULT ''; 613alter table operations modify longdata nvarchar2(2048) DEFAULT ''; 614 615CREATE TABLE opmediatypes ( 616 opmediatypeid number(20) DEFAULT '0' NOT NULL, 617 operationid number(20) DEFAULT '0' NOT NULL, 618 mediatypeid number(20) DEFAULT '0' NOT NULL, 619 PRIMARY KEY (opmediatypeid) 620); 621CREATE UNIQUE INDEX opmediatypes_1 on opmediatypes (operationid); 622 623CREATE INDEX profiles_2 on profiles (userid,profileid); 624 625alter table profiles modify idx nvarchar2(96) DEFAULT ''; 626alter table profiles modify value_str nvarchar2(255) DEFAULT ''; 627alter table profiles modify source nvarchar2(96) DEFAULT ''; 628 629CREATE TABLE proxy_autoreg_host ( 630 id number(20) NOT NULL, 631 clock number(10) DEFAULT '0' NOT NULL, 632 host nvarchar2(64) DEFAULT '', 633 PRIMARY KEY (id) 634) 635/ 636 637CREATE INDEX proxy_autoreg_host_1 on proxy_autoreg_host (clock) 638/ 639 640CREATE SEQUENCE proxy_autoreg_host_seq 641START WITH 1 642INCREMENT BY 1 643NOMAXVALUE 644/ 645 646CREATE TRIGGER proxy_autoreg_host_tr 647BEFORE INSERT ON proxy_autoreg_host 648FOR EACH ROW 649BEGIN 650SELECT proxy_history_seq.nextval INTO :new.id FROM dual; 651END; 652/ 653DROP TABLE proxy_dhistory 654/ 655 656CREATE TABLE proxy_dhistory ( 657 id number(20) NOT NULL, 658 clock number(10) DEFAULT '0' NOT NULL, 659 druleid number(20) DEFAULT '0' NOT NULL, 660 type number(10) DEFAULT '0' NOT NULL, 661 ip nvarchar2(39) DEFAULT '', 662 port number(10) DEFAULT '0' NOT NULL, 663 key_ nvarchar2(255) DEFAULT '', 664 value nvarchar2(255) DEFAULT '', 665 status number(10) DEFAULT '0' NOT NULL, 666 dcheckid number(20) DEFAULT '0' NOT NULL, 667 PRIMARY KEY (id) 668) 669/ 670 671CREATE INDEX proxy_dhistory_1 on proxy_dhistory (clock) 672/ 673 674CREATE SEQUENCE proxy_dhistory_seq 675START WITH 1 676INCREMENT BY 1 677NOMAXVALUE 678/ 679 680CREATE TRIGGER proxy_dhistory_tr 681BEFORE INSERT ON proxy_dhistory 682FOR EACH ROW 683BEGIN 684SELECT proxy_history_seq.nextval INTO :new.id FROM dual; 685END; 686/ 687 688DROP TABLE proxy_history 689/ 690 691CREATE TABLE proxy_history ( 692 id number(20) NOT NULL, 693 itemid number(20) DEFAULT '0' NOT NULL, 694 clock number(10) DEFAULT '0' NOT NULL, 695 timestamp number(10) DEFAULT '0' NOT NULL, 696 source nvarchar2(64) DEFAULT '', 697 severity number(10) DEFAULT '0' NOT NULL, 698 value nclob DEFAULT '', 699 logeventid number(10) DEFAULT '0' NOT NULL, 700 PRIMARY KEY (id) 701) 702/ 703 704CREATE INDEX proxy_history_1 on proxy_history (clock) 705/ 706 707CREATE SEQUENCE proxy_history_seq 708START WITH 1 709INCREMENT BY 1 710NOMAXVALUE 711/ 712 713CREATE TRIGGER proxy_history_tr 714BEFORE INSERT ON proxy_history 715FOR EACH ROW 716BEGIN 717SELECT proxy_history_seq.nextval INTO :new.id FROM dual; 718END; 719/ 720 721CREATE TABLE regexps ( 722 regexpid number(20) DEFAULT '0' NOT NULL, 723 name nvarchar2(128) DEFAULT '' , 724 test_string nvarchar2(2048) DEFAULT '' , 725 PRIMARY KEY (regexpid) 726); 727CREATE INDEX regexps_1 on regexps (name); 728 729CREATE INDEX rights_2 on rights (id); 730alter table screens_items modify url nvarchar2(255) DEFAULT ''; 731 732alter table screens modify name nvarchar2(255) DEFAULT 'Screen'; 733 734alter table scripts modify name nvarchar2(255) DEFAULT ''; 735alter table scripts modify command nvarchar2(255) DEFAULT ''; 736 737CREATE INDEX services_1 on services (triggerid); 738 739alter table services modify name nvarchar2(128) DEFAULT ''; 740 741alter table services_times modify note nvarchar2(255) DEFAULT ''; 742CREATE INDEX sessions_1 on sessions (userid, status); 743 744alter table sessions modify sessionid nvarchar2(32) DEFAULT ''; 745alter table slideshows modify name nvarchar2(255) DEFAULT ''; 746alter table sysmaps_elements modify label nvarchar2(255) DEFAULT ''; 747ALTER TABLE sysmaps_elements ADD iconid_maintenance number(20) DEFAULT '0' NOT NULL; 748 749alter table sysmaps_elements modify url nvarchar2(255) DEFAULT ''; 750alter table sysmaps_links add label nvarchar2(255) DEFAULT ''; 751alter table sysmaps_links modify color nvarchar2(6) DEFAULT '000000'; 752alter table sysmaps_link_triggers modify color nvarchar2(6) DEFAULT '000000'; 753ALTER TABLE sysmaps ADD highlight number(10) DEFAULT '1' NOT NULL; 754 755alter table sysmaps modify name nvarchar2(128) DEFAULT ''; 756CREATE TABLE timeperiods ( 757 timeperiodid number(20) DEFAULT '0' NOT NULL, 758 timeperiod_type number(10) DEFAULT '0' NOT NULL, 759 every number(10) DEFAULT '0' NOT NULL, 760 month number(10) DEFAULT '0' NOT NULL, 761 dayofweek number(10) DEFAULT '0' NOT NULL, 762 day number(10) DEFAULT '0' NOT NULL, 763 start_time number(10) DEFAULT '0' NOT NULL, 764 period number(10) DEFAULT '0' NOT NULL, 765 start_date number(10) DEFAULT '0' NOT NULL, 766 PRIMARY KEY (timeperiodid) 767); 768alter table triggers modify expression nvarchar2(255) DEFAULT ''; 769alter table triggers modify description nvarchar2(255) DEFAULT ''; 770alter table triggers modify url nvarchar2(255) DEFAULT ''; 771alter table triggers modify comments nvarchar2(2048) DEFAULT ''; 772alter table triggers modify error nvarchar2(128) DEFAULT ''; 773CREATE TABLE user_history ( 774 userhistoryid number(20) DEFAULT '0' NOT NULL, 775 userid number(20) DEFAULT '0' NOT NULL, 776 title1 nvarchar2(255) DEFAULT '' , 777 url1 nvarchar2(255) DEFAULT '' , 778 title2 nvarchar2(255) DEFAULT '' , 779 url2 nvarchar2(255) DEFAULT '' , 780 title3 nvarchar2(255) DEFAULT '' , 781 url3 nvarchar2(255) DEFAULT '' , 782 title4 nvarchar2(255) DEFAULT '' , 783 url4 nvarchar2(255) DEFAULT '' , 784 title5 nvarchar2(255) DEFAULT '' , 785 url5 nvarchar2(255) DEFAULT '' , 786 PRIMARY KEY (userhistoryid) 787); 788CREATE UNIQUE INDEX user_history_1 on user_history (userid); 789 790alter table users add rows_per_page number(10) DEFAULT 50 NOT NULL; 791 792alter table users modify alias nvarchar2(100) DEFAULT ''; 793alter table users modify name nvarchar2(100) DEFAULT ''; 794alter table users modify surname nvarchar2(100) DEFAULT ''; 795alter table users modify passwd nvarchar2(32) DEFAULT ''; 796alter table users modify url nvarchar2(255) DEFAULT ''; 797alter table users modify lang nvarchar2(5) DEFAULT 'en_gb'; 798alter table users modify theme nvarchar2(128) DEFAULT 'default.css'; 799alter table users modify attempt_ip nvarchar2(39) DEFAULT ''; 800alter table usrgrp add api_access number(10) DEFAULT '0' NOT NULL; 801alter table usrgrp add debug_mode number(10) DEFAULT '0' NOT NULL; 802 803alter table usrgrp modify name nvarchar2(64) DEFAULT ''; 804alter table valuemaps modify name nvarchar2(64) DEFAULT ''; 805 806