diff options
author | alex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-11-04 09:10:34 +0000 |
---|---|---|
committer | alex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-11-04 09:10:34 +0000 |
commit | c9736a3f6137e59971e921634a0883bc8833b6c0 (patch) | |
tree | ae83ef3ab8c7807c68317f5966fb57bed64cd24f | |
parent | 1614faa5b67288db2ab5995a5daea6e3cdf0e0bd (diff) | |
download | zabbix-c9736a3f6137e59971e921634a0883bc8833b6c0.tar.gz zabbix-c9736a3f6137e59971e921634a0883bc8833b6c0.tar.xz zabbix-c9736a3f6137e59971e921634a0883bc8833b6c0.zip |
New SQL schema generator.
git-svn-id: svn://svn.zabbix.com/trunk@3427 97f52cf1-0a1b-0410-bd0e-c28be96e8082
-rwxr-xr-x | create/schema/gen.pl | 150 | ||||
-rwxr-xr-x | create/schema/generate_schemas.sh | 16 | ||||
-rw-r--r-- | create/schema/mysql.fmt | 11 | ||||
-rw-r--r-- | create/schema/oracle.fmt | 7 | ||||
-rw-r--r-- | create/schema/postgresql.fmt | 10 | ||||
-rw-r--r-- | create/schema/schema_new.sql | 556 | ||||
-rw-r--r-- | include/dbsync.h | 13 | ||||
-rw-r--r-- | misc/conf/zabbix_server.conf | 5 | ||||
-rw-r--r-- | src/zabbix_server/nodewatcher/.deps/nodewatcher.Po | 129 | ||||
-rw-r--r-- | src/zabbix_server/nodewatcher/nodewatcher.c | 2 |
10 files changed, 781 insertions, 118 deletions
diff --git a/create/schema/gen.pl b/create/schema/gen.pl new file mode 100755 index 00000000..2d57eea9 --- /dev/null +++ b/create/schema/gen.pl @@ -0,0 +1,150 @@ +#!/usr/bin/perl +# +# ZABBIX +# Copyright (C) 2000-2005 SIA Zabbix +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +use Switch; + +$file = 'schema_new.sql'; # Name the file +open(INFO, $file); # Open the file +@lines = <INFO>; # Read it into an array +close(INFO); # Close the file + +%mysql=("t_bigint" => "bigint unsigned", + "t_id" => "bigint unsigned", + "t_integer" => "integer", + "t_serial" => "serial", + "t_double" => "double", + "t_varchar" => "varchar", + "t_char" => "char", + "t_image" => "longblob", + "t_history_log" => "text", + "t_history_text"=> "text", + "t_blob" => "blob" +); + +%oracle=("t_bigint" => "bigint", + "t_id" => "bigint", + "t_integer" => "integer", + "t_serial" => "serial", + "t_double" => "double", + "t_varchar" => "varchar", + "t_char" => "char", + "t_image" => "longblob", + "t_history_log" => "text", + "t_history_text"=> "text", + "t_blob" => "blob" +); + +%postgresql=("t_bigint" => "bigint", + "t_id" => "bigint", + "t_integer" => "integer", + "t_serial" => "serial", + "t_double" => "double", + "t_varchar" => "varchar", + "t_char" => "char", + "t_image" => "longblob", + "t_history_log" => "text", + "t_history_text"=> "text", + "t_blob" => "blob" +); + +%sqlite=("t_bigint" => "bigint", + "t_id" => "bigint", + "t_integer" => "integer", + "t_serial" => "serial", + "t_double" => "double", + "t_varchar" => "varchar", + "t_char" => "char", + "t_image" => "longblob", + "t_history_log" => "text", + "t_history_text"=> "text", + "t_blob" => "blob" +); + +sub newstate +{ + local $new=$_[0]; + + switch ($state) + { + case "field" { + if($new eq "index") { print $pkey; } + if($new eq "table") { print $pkey; } + if($new eq "field") { print ",\n" } + } + case "index" { + if($new eq "table") { print "\n" } + } + case "table" { print ""; } + } + $state=$new; +} + +sub process_table +{ + local $line=$_[0]; + + newstate("table"); + ($table_name,$pkey,$flags)=split(/\|/, $line,4); + if($pkey ne "") { $pkey=",\n\tPRIMARY KEY ($pkey)\n);\n" } + else { $pkey="\n);\n"; } + print "CREATE TABLE $table_name (\n"; +} + +sub process_field +{ + local $line=$_[0]; + + newstate("field"); + ($name,$type,$default,$null,$flags)=split(/\|/, $line,5); + ($type_short)=split(/\(/, $type,2); + $a=$mysql{$type_short}; + $_=$type; + s/$type_short/$a/g; + $type_2=$_; + if($default ne "") { $default="DEFAULT $default"; } + print "\t$name\t\t$type_2\t\t$default\t$null"; +} + +sub process_index +{ + local $line=$_[0]; + + newstate("index"); + ($name,$fields)=split(/\|/, $line,2); + print "CREATE INDEX ${table_name}_$name\ on $table_name ($fields);\n"; +} + +foreach $line (@lines) +{ + $_ = $line; + $line = tr/\t//d; + $line=$_; + + chop($line); + + ($type,$line)=split(/\|/, $line,2); + + switch ($type) { + case "TABLE" { process_table($line); } + case "INDEX" { process_index($line); } + case "FIELD" { process_field($line); } + } +} + +newstate("table"); diff --git a/create/schema/generate_schemas.sh b/create/schema/generate_schemas.sh deleted file mode 100755 index 5f753068..00000000 --- a/create/schema/generate_schemas.sh +++ /dev/null @@ -1,16 +0,0 @@ -for db in mysql postgresql oracle; do - echo Generating $db schema - fmt=`cat $db.fmt` - cp schema.sql schema.tmp - - for i in $fmt; do - macro=`echo "$i"|cut -f1 -d"="` - replace=`echo "$i"|cut -f2 -d">"` - - sed "s/$macro/$replace/g" schema.tmp >schema.tmp2 - mv schema.tmp2 schema.tmp - done - - mv schema.tmp $db.sql -done -echo Done diff --git a/create/schema/mysql.fmt b/create/schema/mysql.fmt deleted file mode 100644 index 17114b2e..00000000 --- a/create/schema/mysql.fmt +++ /dev/null @@ -1,11 +0,0 @@ -{bigint}=>bigint unsigned -{integer}=>integer -{serial}=>serial -{double}=>double -{varchar}=>varchar -{char}=>char -{image_type}=>longblob -{history_log_type}=>text -{history_text_type}=>text -{blob}=>blob -{create_table_opt}=>type=InnoDB diff --git a/create/schema/oracle.fmt b/create/schema/oracle.fmt deleted file mode 100644 index 9f6b7001..00000000 --- a/create/schema/oracle.fmt +++ /dev/null @@ -1,7 +0,0 @@ -{bigint}=>bigint -{integer}=>integer -{double}=>double -{varchar}=>varchar -{image_type}=>blob -{blob}=>varchar(2048) -{create_table_opt}=>type=InnoDB diff --git a/create/schema/postgresql.fmt b/create/schema/postgresql.fmt deleted file mode 100644 index 470919e9..00000000 --- a/create/schema/postgresql.fmt +++ /dev/null @@ -1,10 +0,0 @@ -{bigint}=>bigint -{integer}=>integer -{double}=>numeric -{varchar}=>varchar -{char}=>char -{image_type}=>bytea -{blob}=>text -{create_table_opt}=> -{history_log_type}=>text -{history_text_type}=>text diff --git a/create/schema/schema_new.sql b/create/schema/schema_new.sql new file mode 100644 index 00000000..a389797d --- /dev/null +++ b/create/schema/schema_new.sql @@ -0,0 +1,556 @@ +-- +-- ZABBIX +-- Copyright (C) 2000-2005 SIA Zabbix +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 2 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +-- + +-- +-- Do not use spaces +-- + +TABLE|nodes|nodeid|no_sync +FIELD |nodeid |t_id |'0' |NOT NULL |NO_SYNC +FIELD |name |t_varchar(64) |'0' |NOT NULL |NO_SYNC +FIELD |timezone |t_integer |'0' |NOT NULL | +FIELD |ip |t_varchar(15) |'' |NOT NULL | +FIELD |port |t_integer |'0' |NOT NULL | +FIELD |slave_history |t_integer |'0' |NOT NULL | +FIELD |slave_trends |t_integer |'0' |NOT NULL | +FIELD |event_lastid |t_id |'0' |NOT NULL | +FIELD |history_lastid |t_bigint |'0' |NOT NULL | +FIELD |nodetype |t_integer |'0' |NOT NULL | +FIELD |masterid |t_id |'0' |NOT NULL | + +TABLE|node_cksum|cksumid| +FIELD |cksumid |t_id |'0' |NOT NULL | +FIELD |nodeid |t_id |'0' |NOT NULL | +FIELD |tablename |t_varchar(64) |'' |NOT NULL | +FIELD |fieldname |t_varchar(64) |'' |NOT NULL | +FIELD |recordid |t_id |'0' |NOT NULL | +FIELD |cksumtype |t_integer |'0' |NOT NULL | +FIELD |cksum |t_char(32) |'' |NOT NULL | +INDEX |cksum_1 |nodeid,tablename,fieldname,recordid,cksumtype + +TABLE|node_configlog|nodeid,conflogid|DB_NOSYNC +FIELD |conflogid |t_id |'0' |NOT NULL | +FIELD |nodeid |t_id |'0' |NOT NULL | +FIELD |tablename |t_varchar(64) |'' |NOT NULL | +FIELD |recordid |t_id |'0' |NOT NULL | +FIELD |operation |t_integer |'0' |NOT NULL | +FIELD |sync_master |t_integer |'0' |NOT NULL | +FIELD |sync_slave |t_integer |'0' |NOT NULL | +INDEX |configlog_1 |conflogid +INDEX |configlog_2 |nodeid,tablename + +TABLE|services|serviceid| +FIELD |serviceid |t_id |'0' |NOT NULL | +FIELD |name |t_varchar(128) |'' |NOT NULL | +FIELD |status |t_integer |'0' |NOT NULL | +FIELD |algorithm |t_integer |'0' |NOT NULL | +FIELD |triggerid |t_id | | | +FIELD |showsla |t_integer |'0' |NOT NULL | +FIELD |goodsla |t_double(5,2) |'99.9' |NOT NULL | +FIELD |sortorder |t_integer |'0' |NOT NULL | + +TABLE|services_times|timeid| +FIELD |timeid |t_id |'0' |NOT NULL | +FIELD |serviceid |t_id |'0' |NOT NULL | +FIELD |type |t_integer |'0' |NOT NULL | +FIELD |ts_from |t_integer |'0' |NOT NULL | +FIELD |ts_to |t_integer |'0' |NOT NULL | +FIELD |note |t_varchar(255) |'' |NOT NULL | +INDEX |times_1 |serviceid,type,ts_from,ts_to + +TABLE|services_links|linkid| +FIELD |linkid |t_id |'0' |NOT NULL | +FIELD |serviceupid |t_id |'0' |NOT NULL | +FIELD |servicedownid |t_id |'0' |NOT NULL | +FIELD |soft |t_integer |'0' |NOT NULL | +INDEX |links_1 |servicedownid +INDEX |links_2 |serviceupid,servicedownid + +TABLE|graphs_items|gitemid| +FIELD |gitemid |t_id |'0' |NOT NULL | +FIELD |graphid |t_id |'0' |NOT NULL | +FIELD |itemid |t_id |'0' |NOT NULL | +FIELD |drawtype |t_integer |'0' |NOT NULL | +FIELD |sortorder |t_integer |'0' |NOT NULL | +FIELD |color |t_varchar(32) |'Dark Green' |NOT NULL | +FIELD |yaxisside |t_integer |'1' |NOT NULL | +FIELD |calc_fnc |t_integer |'2' |NOT NULL | +FIELD |type |t_integer |'0' |NOT NULL | +FIELD |periods_cnt |t_integer |'5' |NOT NULL | + +TABLE|graphs|graphid| +FIELD |graphid |t_id |'0' |NOT NULL | +FIELD |name |t_varchar(128) |'' |NOT NULL | +FIELD |width |t_integer |'0' |NOT NULL | +FIELD |height |t_integer |'0' |NOT NULL | +FIELD |yaxistype |t_integer |'0' |NOT NULL | +FIELD |yaxismin |t_double(16,4) |'0' |NOT NULL | +FIELD |yaxismax |t_double(16,4) |'0' |NOT NULL | +FIELD |templateid |t_id |'0' |NOT NULL | +FIELD |show_work_period|t_integer |'1' |NOT NULL | +FIELD |show_triggers |t_integer |'1' |NOT NULL | +FIELD |graphtype |t_integer |'0' |NOT NULL | +INDEX |graphs_1 |name + +TABLE|sysmaps_links|linkid| +FIELD |linkid |t_id |'0' |NOT NULL | +FIELD |sysmapid |t_id |'0' |NOT NULL | +FIELD |selementid1 |t_id |'0' |NOT NULL | +FIELD |selementid2 |t_id |'0' |NOT NULL | +FIELD |triggerid |t_id | | | +FIELD |drawtype_off |t_integer |'0' |NOT NULL | +FIELD |color_off |t_varchar(32) |'Black'|NOT NULL | +FIELD |drawtype_on |t_integer |'0' |NOT NULL | +FIELD |color_on |t_varchar(32) |'Red' |NOT NULL | + +TABLE|sysmaps_elements|selementid| +FIELD |selementid |t_id |'0' |NOT NULL | +FIELD |sysmapid |t_id |'0' |NOT NULL | +FIELD |elementid |t_id |'0' |NOT NULL | +FIELD |elementtype |t_integer |'0' |NOT NULL | +FIELD |iconid_off |t_bigint |'0' |NOT NULL | +FIELD |iconid_on |t_bigint |'0' |NOT NULL | +FIELD |label |t_varchar(128) |'' |NOT NULL | +FIELD |label_location |t_integer | |NULL | +FIELD |x |t_integer |'0' |NOT NULL | +FIELD |y |t_integer |'0' |NOT NULL | +FIELD |url |t_varchar(255) |'' |NOT NULL | + +TABLE|sysmaps|sysmapid| +FIELD |sysmapid |t_id |'0' |NOT NULL | +FIELD |name |t_varchar(128) |'' |NOT NULL | +FIELD |width |t_integer |'0' |NOT NULL | +FIELD |height |t_integer |'0' |NOT NULL | +FIELD |backgroundid |t_bigint |'0' |NOT NULL | +FIELD |label_type |t_integer |'0' |NOT NULL | +FIELD |label_location |t_integer |'0' |NOT NULL | +INDEX |1 |name + +TABLE|config|configid| +FIELD |configid |t_id |'0' |NOT NULL | +FIELD |alert_history |t_integer |'0' |NOT NULL | +FIELD |event_history |t_integer |'0' |NOT NULL | +FIELD |refresh_unsupported|t_integer |'0' |NOT NULL | +FIELD |work_period |t_varchar(100) |'1-5,00:00-24:00' |NOT NULL | + +TABLE|groups|groupid| +FIELD |groupid |t_id |'0' |NOT NULL | +FIELD |name |t_varchar(64) |'' |NOT NULL | +INDEX |1 |name + +TABLE|hosts_groups|hostgroupid| +FIELD |hostgroupid |t_id |'0' |NOT NULL | +FIELD |hostid |t_id |'0' |NOT NULL | +FIELD |groupid |t_id |'0' |NOT NULL | +INDEX |groups_1 |hostid,groupid + +TABLE|alerts|alertid| +FIELD |alertid |t_id |'0' |NOT NULL | +FIELD |actionid |t_id |'0' |NOT NULL | +FIELD |triggerid |t_id |'0' |NOT NULL | +FIELD |userid |t_id |'0' |NOT NULL | +FIELD |clock |t_integer |'0' |NOT NULL | +FIELD |mediatypeid |t_id |'0' |NOT NULL | +FIELD |sendto |t_varchar(100) |'' |NOT NULL | +FIELD |subject |t_varchar(255) |'' |NOT NULL | +FIELD |message |t_blob |'' |NOT NULL | +FIELD |status |t_integer |'0' |NOT NULL | +FIELD |retries |t_integer |'0' |NOT NULL | +FIELD |error |t_varchar(128) |'' |NOT NULL | +FIELD |repeats |t_integer |'0' |NOT NULL | +FIELD |maxrepeats |t_integer |'0' |NOT NULL | +FIELD |nextcheck |t_integer |'0' |NOT NULL | +FIELD |delay |t_integer |'0' |NOT NULL | +INDEX |1 |actionid +INDEX |2 |clock +INDEX |3 |triggerid +INDEX |4 |status,retries +INDEX |5 |mediatypeid +INDEX |6 |userid + +TABLE|actions|actionid| +FIELD |actionid |t_id |'0' |NOT NULL | +FIELD |userid |t_id |'0' |NOT NULL | +FIELD |subject |t_varchar(255) |'' |NOT NULL | +FIELD |message |t_blob |'' |NOT NULL | +FIELD |recipient |t_integer |'0' |NOT NULL | +FIELD |maxrepeats |t_integer |'0' |NOT NULL | +FIELD |repeatdelay |t_integer |'600' |NOT NULL | +FIELD |source |t_integer |'0' |NOT NULL | +FIELD |actiontype |t_integer |'0' |NOT NULL | +FIELD |status |t_integer |'0' |NOT NULL | +FIELD |scripts |t_blob |'' |NOT NULL | + +TABLE|conditions|conditionid| +FIELD |conditionid |t_id |'0' |NOT NULL | +FIELD |actionid |t_id |'0' |NOT NULL | +FIELD |conditiontype |t_integer |'0' |NOT NULL | +FIELD |operator |t_integer |'0' |NOT NULL | +FIELD |value |t_varchar(255) |'' |NOT NULL | +INDEX |1 |actionid + +TABLE|events|eventid| +FIELD |eventid |t_id |'0' |NOT NULL | +FIELD |triggerid |t_id |'0' |NOT NULL | +FIELD |clock |t_integer |'0' |NOT NULL | +FIELD |value |t_integer |'0' |NOT NULL | +FIELD |acknowledged |t_integer |'0' |NOT NULL | +INDEX |1 |triggerid,clock +INDEX |2 |clock + +TABLE|functions|functionid| +FIELD |functionid |t_id |'0' |NOT NULL | +FIELD |itemid |t_id |'0' |NOT NULL | +FIELD |triggerid |t_id |'0' |NOT NULL | +FIELD |lastvalue |t_varchar(255) | | | +FIELD |function |t_varchar(12) |'' |NOT NULL | +FIELD |parameter |t_varchar(255) |'0' |NOT NULL | +INDEX |1 |triggerid +INDEX |2 |itemid,function,parameter + +TABLE|history||NO_SYNC +FIELD |itemid |t_id |'0' |NOT NULL | +FIELD |clock |t_integer |'0' |NOT NULL | +FIELD |value |t_double(16,4) |'0.0000' |NOT NULL | +INDEX |1 |itemid,clock + +TABLE|history_sync|id|NO_SYNC +FIELD |id |t_serial | | | +FIELD |nodeid |t_id |'0' |NOT NULL | +FIELD |itemid |t_id |'0' |NOT NULL | +FIELD |clock |t_integer |'0' |NOT NULL | +FIELD |value |t_double(16,4) |'0.0000' |NOT NULL | +INDEX |1 |nodeid,id + +TABLE|history_uint||NO_SYNC +FIELD |itemid |t_id |'0' |NOT NULL | +FIELD |clock |t_integer |'0' |NOT NULL | +FIELD |value |t_bigint |'0' |NOT NULL | +INDEX |1 |itemid,clock + +TABLE|history_uint_sync|id|NO_SYNC +FIELD |id |t_serial | | | +FIELD |nodeid |t_id |'0' |NOT NULL | +FIELD |itemid |t_id |'0' |NOT NULL | +FIELD |clock |t_integer |'0' |NOT NULL | +FIELD |value |t_bigint |'0' |NOT NULL | +INDEX |1 |nodeid,id + +TABLE|history_str||NO_SYNC +FIELD |itemid |t_id |'0' |NOT NULL | +FIELD |clock |t_integer |'0' |NOT NULL | +FIELD |value |t_varchar(255) |'' |NOT NULL | +INDEX |1 |itemid,clock + +TABLE|history_str_sync|id|NO_SYNC +FIELD |id |t_serial | | | +FIELD |nodeid |t_id |'0' |NOT NULL | +FIELD |itemid |t_id |'0' |NOT NULL | +FIELD |clock |t_integer |'0' |NOT NULL | +FIELD |value |t_varchar(255) |'' |NOT NULL | +INDEX |1 |nodeid,id + +TABLE|hosts|hostid +FIELD |hostid |t_id |'0' |NOT NULL | +FIELD |host |t_varchar(64) |'' |NOT NULL | +FIELD |useip |t_integer |'1' |NOT NULL | +FIELD |ip |t_varchar(15) |'127.0.0.1'|NOT NULL | +FIELD |port |t_integer |'0' |NOT NULL | +FIELD |status |t_integer |'0' |NOT NULL | +FIELD |disable_until |t_integer |'0' |NOT NULL | +FIELD |error |t_varchar(128) |'' |NOT NULL | +FIELD |available |t_integer |'0' |NOT NULL | +FIELD |errors_from |t_integer |'0' |NOT NULL | +INDEX |1 |host +INDEX |2 |status + +TABLE|items|itemid +FIELD |itemid |t_id |'0' |NOT NULL | +FIELD |type |t_integer |'0' |NOT NULL | +FIELD |snmp_community |t_varchar(64) |'' |NOT NULL | +FIELD |snmp_oid |t_varchar(255) |'' |NOT NULL | +FIELD |snmp_port |t_integer |'161' |NOT NULL | +FIELD |hostid |t_bigint |'0' |NOT NULL | +FIELD |description |t_varchar(255) |'' |NOT NULL | +FIELD |key_ |t_varchar(64) |'' |NOT NULL | +FIELD |delay |t_integer |'0' |NOT NULL | +FIELD |history |t_integer |'90' |NOT NULL | +FIELD |trends |t_integer |'365' |NOT NULL | +FIELD |nextcheck |t_integer |'0' |NOT NULL | +FIELD |lastvalue |t_varchar(255) | |NULL | +FIELD |lastclock |t_integer | |NULL | +FIELD |prevvalue |t_varchar(255) | |NULL | +FIELD |status |t_integer |'0' |NOT NULL | +FIELD |value_type |t_integer |'0' |NOT NULL | +FIELD |trapper_hosts |t_varchar(255) |'' |NOT NULL | +FIELD |units |t_varchar(10) |'' |NOT NULL | +FIELD |multiplier |t_integer |'0' |NOT NULL | +FIELD |delta |t_integer |'0' |NOT NULL | +FIELD |prevorgvalue |t_double(16,4) | |NULL | +FIELD |snmpv3_securityname|t_varchar(64)|'' |NOT NULL | +FIELD |snmpv3_securitylevel|t_integer |'0' |NOT NULL | +FIELD |snmpv3_authpassphrase|t_varchar(64)|'' |NOT NULL | +FIELD |snmpv3_privpassphrase|t_varchar(64)|'' |NOT NULL | + +FIELD |formula |t_varchar(255) |'0' |NOT NULL | +FIELD |error |t_varchar(128) |'' |NOT NULL | + +FIELD |lastlogsize |t_integer |'0' |NOT NULL | +FIELD |logtimefmt |t_varchar(64) |'' |NOT NULL | +FIELD |templateid |t_bigint |'0' |NOT NULL | +FIELD |valuemapid |t_bigint |'0' |NOT NULL | +FIELD |delay_flex |t_varchar(255) |'' |NOT NULL | +INDEX |1 |hostid,key_ +INDEX |2 |nextcheck +INDEX |3 |status + +TABLE|media|mediaid +FIELD |mediaid |t_id |'0' |NOT NULL | +FIELD |userid |t_id |'0' |NOT NULL | +FIELD |mediatypeid |t_id |'0' |NOT NULL | +FIELD |sendto |t_varchar(100) |'' |NOT NULL | +FIELD |active |t_integer |'0' |NOT NULL | +FIELD |severity |t_integer |'63' |NOT NULL | +FIELD |period |t_varchar(100) |'1-7,00:00-23:59'|NOT NULL | +INDEX |1 |userid +INDEX |2 |mediatypeid + +TABLE|media_type|mediatypeid +FIELD |mediatypeid |t_id |'0' |NOT NULL | +FIELD |type |t_integer |'0' |NOT NULL | +FIELD |description |t_varchar(100) |'' |NOT NULL | +FIELD |smtp_server |t_varchar(255) |'' |NOT NULL | +FIELD |smtp_helo |t_varchar(255) |'' |NOT NULL | +FIELD |smtp_email |t_varchar(255) |'' |NOT NULL | +FIELD |exec_path |t_varchar(255) |'' |NOT NULL | +FIELD |gsm_modem |t_varchar(255) |'' |NOT NULL | + +TABLE|triggers|triggerid| +FIELD |triggerid |t_id |'0' |NOT NULL | +FIELD |expression |t_varchar(255) |'' |NOT NULL | +FIELD |description |t_varchar(255) |'' |NOT NULL | +FIELD |url |t_varchar(255) |'' |NOT NULL | +FIELD |status |t_integer |'0' |NOT NULL | +FIELD |value |t_integer |'0' |NOT NULL | +FIELD |priority |t_integer |'0' |NOT NULL | +FIELD |lastchange |t_integer |'0' |NOT NULL | +FIELD |dep_level |t_integer |'0' |NOT NULL | +FIELD |comments |t_blob | | | +FIELD |error |t_varchar(128) |'' |NOT NULL | +FIELD |templateid |t_id |'0' |NOT NULL | +INDEX |1 |status +INDEX |2 |value + +TABLE|trigger_depends|triggerdepid| +FIELD |triggerdepid |t_id |'0' |NOT NULL | +FIELD |triggerid_down |t_id |'0' |NOT NULL | +FIELD |triggerid_up |t_id |'0' |NOT NULL | +INDEX |1 |triggerid_down,triggerid_up +INDEX |2 |triggerid_up + +TABLE|users|userid| +FIELD |userid |t_id |'0' |NOT NULL | +FIELD |alias |t_varchar(100) |'' |NOT NULL | +FIELD |name |t_varchar(100) |'' |NOT NULL | +FIELD |surname |t_varchar(100) |'' |NOT NULL | +FIELD |passwd |t_char(32) |'' |NOT NULL | +FIELD |url |t_varchar(255) |'' |NOT NULL | +FIELD |autologout |t_integer |'900' |NOT NULL | +FIELD |lang |t_varchar(5) |'en_gb'|NOT NULL | +FIELD |refresh |t_integer |'30' |NOT NULL | +FIELD |type |t_integer |'0' |NOT NULL | +INDEX |1 |alias + +TABLE|auditlog|auditid| +FIELD |auditid |t_id |'0' |NOT NULL | +FIELD |userid |t_id |'0' |NOT NULL | +FIELD |clock |t_integer |'0' |NOT NULL | +FIELD |action |t_integer |'0' |NOT NULL | +FIELD |resourcetype |t_integer |'0' |NOT NULL | +FIELD |details |t_varchar(128) |'0' |NOT NULL | +INDEX |1 |userid,clock +INDEX |2 |clock + +TABLE|sessions|sessionid| +FIELD |sessionid |t_varchar(32) |'' |NOT NULL | +FIELD |userid |t_id |'0' |NOT NULL | +FIELD |lastaccess |t_integer |'0' |NOT NULL | + +TABLE|rights|rightid| +FIELD |rightid |t_id |'0' |NOT NULL | +FIELD |groupid |t_id |'0' |NOT NULL | +FIELD |type |t_integer |'0' |NOT NULL | +FIELD |permission |t_integer |'0' |NOT NULL | +FIELD |id |t_id | | | +INDEX |1 |groupid + +TABLE|service_alarms|servicealarmid| +FIELD |servicealarmid |t_id |'0' |NOT NULL | +FIELD |serviceid |t_id |'0' |NOT NULL | +FIELD |clock |t_integer |'0' |NOT NULL | +FIELD |value |t_integer |'0' |NOT NULL | +INDEX |1 |serviceid,clock +INDEX |2 |clock + +TABLE|profiles|profileid| +FIELD |profileid |t_id |'0' |NOT NULL | +FIELD |userid |t_id |'0' |NOT NULL | +FIELD |idx |t_varchar(64) |'' |NOT NULL | +FIELD |value |t_varchar(255) |'' |NOT NULL | +FIELD |valuetype |t_integer |0 |NOT NULL | +INDEX |1 |userid,idx + +TABLE|screens|screenid| +FIELD |screenid |t_id |'0' |NOT NULL | +FIELD |name |t_varchar(255) |'Screen'|NOT NULL | +FIELD |hsize |t_integer |'1' |NOT NULL | +FIELD |vsize |t_integer |'1' |NOT NULL | + +TABLE|screens_items|screenitemid| +FIELD |screenitemid |t_id |'0' |NOT NULL | +FIELD |screenid |t_id |'0' |NOT NULL | +FIELD |resourcetype |t_integer |'0' |NOT NULL | +FIELD |resourceid |t_id |'0' |NOT NULL | +FIELD |width |t_integer |'320' |NOT NULL | +FIELD |height |t_integer |'200' |NOT NULL | +FIELD |x |t_integer |'0' |NOT NULL | +FIELD |y |t_integer |'0' |NOT NULL | +FIELD |colspan |t_integer |'0' |NOT NULL | +FIELD |rowspan |t_integer |'0' |NOT NULL | +FIELD |elements |t_integer |'25' |NOT NULL | +FIELD |valign |t_integer |'0' |NOT NULL | +FIELD |halign |t_integer |'0' |NOT NULL | +FIELD |style |t_integer |'0' |NOT NULL | +FIELD |url |t_varchar(255) |'' |NOT NULL | + +TABLE|usrgrp|usrgrpid| +FIELD |usrgrpid |t_id |'0' |NOT NULL | +FIELD |name |t_varchar(64) |'' |NOT NULL | +INDEX |1 |name + +TABLE|users_groups|id| +FIELD |id |t_id |'0' |NOT NULL | +FIELD |usrgrpid |t_id |'0' |NOT NULL | +FIELD |userid |t_id |'0' |NOT NULL | +INDEX |1 |usrgrpid,userid + +TABLE|trends|itemid,clock|DB_NOSYNC +FIELD |itemid |t_id |'0' |NOT NULL | +FIELD |clock |t_integer |'0' |NOT NULL | +FIELD |num |t_integer |'0' |NOT NULL | +FIELD |value_min |t_double(16,4) |'0.0000'|NOT NULL | +FIELD |value_avg |t_double(16,4) |'0.0000'|NOT NULL | +FIELD |value_max |t_double(16,4) |'0.0000'|NOT NULL | + +TABLE|images|imageid| +FIELD |imageid |t_id |'0' |NOT NULL | +FIELD |imagetype |t_integer |'0' |NOT NULL | +FIELD |name |t_varchar(64) |'0' |NOT NULL | +FIELD |image |t_image |'' |NOT NULL | +INDEX |1 |imagetype,name + +TABLE|hosts_templates|hosttemplateid| +FIELD |hosttemplateid |t_id |'0' |NOT NULL | +FIELD |hostid |t_id |'0' |NOT NULL | +FIELD |templateid |t_id |'0' |NOT NULL | +INDEX |1 |hostid,templateid + +TABLE|history_log|id| +FIELD |id |t_id |'0' |NOT NULL | +FIELD |itemid |t_id |'0' |NOT NULL | +FIELD |clock |t_integer |'0' |NOT NULL | +FIELD |timestamp |t_integer |'0' |NOT NULL | +FIELD |source |t_varchar(64) |'' |NOT NULL | +FIELD |severity |t_integer |'0' |NOT NULL | +FIELD |value |t_history_log |'' |NOT NULL | +INDEX |1 |itemid,clock + +TABLE|history_text|id| +FIELD |id |t_id |'0' |NOT NULL | +FIELD |itemid |t_id |'0' |NOT NULL | +FIELD |clock |t_integer |'0' |NOT NULL | +FIELD |value |t_history_text |'' |NOT NULL | +INDEX |1 |itemid,clock + +TABLE|hosts_profiles|hostid| +FIELD |hostid |t_id |'0' |NOT NULL | +FIELD |devicetype |t_varchar(64) |'' |NOT NULL | +FIELD |name |t_varchar(64) |'' |NOT NULL | +FIELD |os |t_varchar(64) |'' |NOT NULL | +FIELD |t_serialno |t_varchar(64) |'' |NOT NULL | +FIELD |tag |t_varchar(64) |'' |NOT NULL | +FIELD |macaddress |t_varchar(64) |'' |NOT NULL | +FIELD |hardware |t_blob |'' |NOT NULL | +FIELD |software |t_blob |'' |NOT NULL | +FIELD |contact |t_blob |'' |NOT NULL | +FIELD |location |t_blob |'' |NOT NULL | +FIELD |notes |t_blob |'' |NOT NULL | + +TABLE|autoreg|id| +FIELD |id |t_id |'0' |NOT NULL | +FIELD |priority |t_integer |'0' |NOT NULL | +FIELD |pattern |t_varchar(255) |'' |NOT NULL | +FIELD |hostid |t_id |'0' |NOT NULL | + +TABLE|valuemaps|valuemapid| +FIELD |valuemapid |t_id |'0' |NOT NULL | +FIELD |name |t_varchar(64) |'' |NOT NULL | +INDEX |1 |name + +TABLE|mappings|mappingid| +FIELD |mappingid |t_id |'0' |NOT NULL | +FIELD |valuemapid |t_id |'0' |NOT NULL | +FIELD |value |t_varchar(64) |'' |NOT NULL | +FIELD |newvalue |t_varchar(64) |'' |NOT NULL | +INDEX |1 |valuemapid + +TABLE|housekeeper|housekeeperid| +FIELD |housekeeperid |t_id |'0' |NOT NULL | +FIELD |tablename |t_varchar(64) |'' |NOT NULL | +FIELD |field |t_varchar(64) |'' |NOT NULL | +FIELD |value |t_integer |'0' |NOT NULL | + +TABLE|acknowledges|acknowledgeid| +FIELD |acknowledgeid |t_id |'0' |NOT NULL | +FIELD |userid |t_id |'0' |NOT NULL | +FIELD |eventid |t_id |'0' |NOT NULL | +FIELD |clock |t_integer |'0' |NOT NULL | +FIELD |message |t_varchar(255) |'' |NOT NULL | +INDEX |1 |userid +INDEX |2 |eventid +INDEX |3 |clock + +TABLE|applications|applicationid| +FIELD |applicationid |t_id |'0' |NOT NULL | +FIELD |hostid |t_id |'0' |NOT NULL | +FIELD |name |t_varchar(255) |'' |NOT NULL | +FIELD |templateid |t_id |'0' |NOT NULL | +INDEX |1 |templateid +INDEX |2 |hostid,name + +TABLE|items_applications|itemappid| +FIELD |itemappid |t_id |'0' |NOT NULL | +FIELD |applicationid |t_id |'0' |NOT NULL | +FIELD |itemid |t_id |'0' |NOT NULL | +INDEX |1 |applicationid,itemid + +TABLE|help_items|itemtype,key_|DB_NOSYNC +FIELD |itemtype |t_integer |'0' |NOT NULL | +FIELD |key_ |t_varchar(64) |'' |NOT NULL | +FIELD |description |t_varchar(255) |'' |NOT NULL | diff --git a/include/dbsync.h b/include/dbsync.h index fe186946..121bfb24 100644 --- a/include/dbsync.h +++ b/include/dbsync.h @@ -125,8 +125,8 @@ static ZBX_TABLE tables[]={ {"sysmapid", ZBX_TYPE_INT, ZBX_SYNC}, {"elementid", ZBX_TYPE_INT, ZBX_SYNC}, {"elementtype", ZBX_TYPE_INT, ZBX_SYNC}, - {"icon", ZBX_TYPE_CHAR, ZBX_SYNC}, - {"icon_on", ZBX_TYPE_CHAR, ZBX_SYNC}, + {"iconid_off", ZBX_TYPE_INT, ZBX_SYNC}, + {"iconid_on", ZBX_TYPE_INT, ZBX_SYNC}, {"label", ZBX_TYPE_CHAR, ZBX_SYNC}, {"label_location",ZBX_TYPE_INT, ZBX_SYNC}, {"x", ZBX_TYPE_INT, ZBX_SYNC}, @@ -141,7 +141,7 @@ static ZBX_TABLE tables[]={ {"name", ZBX_TYPE_CHAR, ZBX_SYNC}, {"width", ZBX_TYPE_INT, ZBX_SYNC}, {"height", ZBX_TYPE_INT, ZBX_SYNC}, - {"background", ZBX_TYPE_CHAR, ZBX_SYNC}, + {"backgroundid",ZBX_TYPE_INT, ZBX_SYNC}, {"label_type", ZBX_TYPE_INT, ZBX_SYNC}, {"label_location",ZBX_TYPE_INT, ZBX_SYNC}, {0} @@ -276,7 +276,6 @@ static ZBX_TABLE tables[]={ {"error", ZBX_TYPE_CHAR, ZBX_SYNC}, {"available", ZBX_TYPE_INT, ZBX_SYNC}, {"errors_from", ZBX_TYPE_INT, ZBX_NOSYNC}, - {"templateid", ZBX_TYPE_INT, ZBX_SYNC}, {0} } }, @@ -404,9 +403,9 @@ static ZBX_TABLE tables[]={ {"rights", "rightid", ZBX_SYNC, { {"rightid", ZBX_TYPE_INT, ZBX_SYNC}, - {"userid", ZBX_TYPE_INT, ZBX_SYNC}, - {"name", ZBX_TYPE_CHAR, ZBX_SYNC}, - {"permission", ZBX_TYPE_CHAR, ZBX_SYNC}, + {"groupid", ZBX_TYPE_INT, ZBX_SYNC}, + {"type", ZBX_TYPE_INT, ZBX_SYNC}, + {"permission", ZBX_TYPE_INT, ZBX_SYNC}, {"id", ZBX_TYPE_INT, ZBX_SYNC}, {0} } diff --git a/misc/conf/zabbix_server.conf b/misc/conf/zabbix_server.conf index 7158f5f3..25794754 100644 --- a/misc/conf/zabbix_server.conf +++ b/misc/conf/zabbix_server.conf @@ -9,6 +9,11 @@ # This parameter must be between 1 and 255 Server=1 +# This defines unique NodeID in distributed setup, +# Default value 0 (standalone server) +# This parameter must be between 0 and 999 +#NodeID=0 + # Number of pre-forked instances of pollers # Default value is 6 # This parameter must be between 5 and 255 diff --git a/src/zabbix_server/nodewatcher/.deps/nodewatcher.Po b/src/zabbix_server/nodewatcher/.deps/nodewatcher.Po index 26446355..dcc70e06 100644 --- a/src/zabbix_server/nodewatcher/.deps/nodewatcher.Po +++ b/src/zabbix_server/nodewatcher/.deps/nodewatcher.Po @@ -1,81 +1,80 @@ nodewatcher.o nodewatcher.o: nodewatcher.c ../../../include/config.h \ /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \ /usr/include/gnu/stubs.h \ - /usr/lib/gcc-lib/x86_64-linux-gnu/3.3.6/include/stddef.h \ + /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h \ /usr/include/bits/types.h /usr/include/bits/wordsize.h \ /usr/include/bits/typesizes.h /usr/include/libio.h \ /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ - /usr/include/gconv.h \ - /usr/lib/gcc-lib/x86_64-linux-gnu/3.3.6/include/stdarg.h \ + /usr/include/gconv.h /usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h \ /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \ /usr/include/endian.h /usr/include/bits/endian.h \ /usr/include/sys/select.h /usr/include/bits/select.h \ /usr/include/bits/sigset.h /usr/include/bits/time.h \ /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ - /usr/include/alloca.h /usr/include/unistd.h \ + /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/unistd.h \ /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \ /usr/include/getopt.h /usr/include/sys/stat.h /usr/include/bits/stat.h \ /usr/include/sys/socket.h /usr/include/sys/uio.h \ /usr/include/bits/uio.h /usr/include/bits/socket.h \ - /usr/lib/gcc-lib/x86_64-linux-gnu/3.3.6/include/limits.h \ - /usr/lib/gcc-lib/x86_64-linux-gnu/3.3.6/include/syslimits.h \ + /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h \ + /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h \ /usr/include/limits.h /usr/include/bits/posix1_lim.h \ /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \ - /usr/include/asm/socket.h /usr/include/asm-x86_64/socket.h \ - /usr/include/asm/sockios.h /usr/include/asm-x86_64/sockios.h \ + /usr/include/asm/socket.h /usr/include/asm-i386/socket.h \ + /usr/include/asm/sockios.h /usr/include/asm-i386/sockios.h \ /usr/include/netinet/in.h /usr/include/stdint.h /usr/include/bits/in.h \ /usr/include/bits/byteswap.h /usr/include/sys/wait.h \ /usr/include/signal.h /usr/include/bits/signum.h \ /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ - /usr/include/bits/sigcontext.h /usr/include/bits/sigstack.h \ + /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \ + /usr/include/asm-i386/sigcontext.h /usr/include/bits/sigstack.h \ /usr/include/bits/sigthread.h /usr/include/sys/resource.h \ /usr/include/bits/resource.h /usr/include/bits/waitflags.h \ /usr/include/bits/waitstatus.h /usr/include/string.h \ /usr/include/netdb.h /usr/include/rpc/netdb.h /usr/include/bits/netdb.h \ /usr/include/pwd.h /usr/include/errno.h /usr/include/bits/errno.h \ /usr/include/linux/errno.h /usr/include/asm/errno.h \ - /usr/include/asm-x86_64/errno.h ../../../include/common.h \ - ../../../include/sysinc.h /usr/include/assert.h /usr/include/ctype.h \ - /usr/include/strings.h /usr/include/sys/time.h \ - /usr/include/linux/kernel.h /usr/include/arpa/nameser.h \ - /usr/include/sys/param.h /usr/include/linux/param.h \ - /usr/include/asm/param.h /usr/include/asm-x86_64/param.h \ - /usr/include/sys/bitypes.h /usr/include/arpa/nameser_compat.h \ - /usr/include/dirent.h /usr/include/bits/dirent.h /usr/include/fcntl.h \ - /usr/include/bits/fcntl.h /usr/include/ldap.h /usr/include/lber.h \ - /usr/include/lber_types.h /usr/include/ldap_cdefs.h \ - /usr/include/ldap_features.h /usr/include/sys/procfs.h \ + /usr/include/asm-i386/errno.h ../../../include/common.h \ + ../../../include/sysinc.h ../../../include/config.h \ + /usr/include/assert.h /usr/include/ctype.h /usr/include/strings.h \ + /usr/include/sys/time.h /usr/include/linux/kernel.h \ + /usr/include/arpa/nameser.h /usr/include/sys/param.h \ + /usr/include/linux/param.h /usr/include/asm/param.h \ + /usr/include/asm-i386/param.h /usr/include/sys/bitypes.h \ + /usr/include/arpa/nameser_compat.h /usr/include/dirent.h \ + /usr/include/bits/dirent.h /usr/include/fcntl.h \ + /usr/include/bits/fcntl.h /usr/include/sys/procfs.h \ /usr/include/sys/user.h /usr/include/pthread.h /usr/include/sched.h \ - /usr/include/bits/sched.h /usr/include/bits/setjmp.h \ - /usr/include/resolv.h /usr/include/sys/statvfs.h \ - /usr/include/bits/statvfs.h /usr/include/sys/swap.h \ - /usr/include/sys/syscall.h /usr/include/asm/unistd.h \ - /usr/include/asm-x86_64/unistd.h /usr/include/bits/syscall.h \ - /usr/include/sys/sysctl.h /usr/include/linux/sysctl.h \ - /usr/include/linux/types.h /usr/include/sys/sysinfo.h \ - /usr/include/sys/vfs.h /usr/include/sys/statfs.h \ - /usr/include/bits/statfs.h /usr/include/net/if.h /usr/include/syslog.h \ - /usr/include/sys/syslog.h /usr/include/sys/ipc.h \ - /usr/include/bits/ipctypes.h /usr/include/bits/ipc.h \ - /usr/include/sys/sem.h /usr/include/bits/sem.h /usr/include/sys/shm.h \ - /usr/include/bits/shm.h /usr/include/math.h \ + /usr/include/bits/initspin.h /usr/include/resolv.h \ + /usr/include/sys/statvfs.h /usr/include/bits/statvfs.h \ + /usr/include/sys/swap.h /usr/include/sys/syscall.h \ + /usr/include/asm/unistd.h /usr/include/asm-i386/unistd.h \ + /usr/include/bits/syscall.h /usr/include/sys/sysctl.h \ + /usr/include/linux/sysctl.h /usr/include/linux/types.h \ + /usr/include/sys/sysinfo.h /usr/include/sys/vfs.h \ + /usr/include/sys/statfs.h /usr/include/bits/statfs.h \ + /usr/include/net/if.h /usr/include/syslog.h /usr/include/sys/syslog.h \ + /usr/include/sys/ipc.h /usr/include/bits/ipctypes.h \ + /usr/include/bits/ipc.h /usr/include/sys/sem.h /usr/include/bits/sem.h \ + /usr/include/sys/shm.h /usr/include/bits/shm.h /usr/include/math.h \ /usr/include/bits/huge_val.h /usr/include/bits/mathdef.h \ /usr/include/bits/mathcalls.h /usr/include/regex.h \ /usr/include/arpa/inet.h /usr/include/sys/mount.h \ /usr/include/sys/ioctl.h /usr/include/bits/ioctls.h \ - /usr/include/asm/ioctls.h /usr/include/asm-x86_64/ioctls.h \ - /usr/include/asm/ioctl.h /usr/include/asm-x86_64/ioctl.h \ + /usr/include/asm/ioctls.h /usr/include/asm-i386/ioctls.h \ + /usr/include/asm/ioctl.h /usr/include/asm-i386/ioctl.h \ /usr/include/bits/ioctl-types.h /usr/include/sys/ttydefaults.h \ /usr/include/sys/timeb.h ../../../include/zbxtypes.h \ - ../../../include/cfg.h ../../../include/db.h /usr/include/mysql/mysql.h \ - /usr/include/mysql/mysql_com.h /usr/include/mysql/mysql_time.h \ - /usr/include/mysql/mysql_version.h /usr/include/mysql/typelib.h \ - /usr/include/mysql/my_list.h /usr/include/mysql/my_alloc.h \ - /usr/include/mysql/errmsg.h /usr/include/mysql/mysqld_error.h \ - ../../../include/log.h ../../../include/zlog.h \ - ../../../include/dbsync.h events.h history.h nodewatcher.h nodesender.h + ../../../include/cfg.h ../../../include/db.h ../../../include/common.h \ + /usr/include/mysql/mysql.h /usr/include/mysql/mysql_com.h \ + /usr/include/mysql/mysql_time.h /usr/include/mysql/mysql_version.h \ + /usr/include/mysql/typelib.h /usr/include/mysql/my_list.h \ + /usr/include/mysql/my_alloc.h /usr/include/mysql/errmsg.h \ + /usr/include/mysql/mysqld_error.h ../../../include/log.h \ + ../../../include/zlog.h ../../../include/dbsync.h events.h history.h \ + nodewatcher.h nodesender.h ../../../include/config.h: @@ -87,7 +86,7 @@ nodewatcher.o nodewatcher.o: nodewatcher.c ../../../include/config.h \ /usr/include/gnu/stubs.h: -/usr/lib/gcc-lib/x86_64-linux-gnu/3.3.6/include/stddef.h: +/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stddef.h: /usr/include/bits/types.h: @@ -105,7 +104,7 @@ nodewatcher.o nodewatcher.o: nodewatcher.c ../../../include/config.h \ /usr/include/gconv.h: -/usr/lib/gcc-lib/x86_64-linux-gnu/3.3.6/include/stdarg.h: +/usr/lib/gcc/i486-linux-gnu/4.0.3/include/stdarg.h: /usr/include/bits/stdio_lim.h: @@ -133,6 +132,8 @@ nodewatcher.o nodewatcher.o: nodewatcher.c ../../../include/config.h \ /usr/include/bits/pthreadtypes.h: +/usr/include/bits/sched.h: + /usr/include/alloca.h: /usr/include/unistd.h: @@ -155,9 +156,9 @@ nodewatcher.o nodewatcher.o: nodewatcher.c ../../../include/config.h \ /usr/include/bits/socket.h: -/usr/lib/gcc-lib/x86_64-linux-gnu/3.3.6/include/limits.h: +/usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h: -/usr/lib/gcc-lib/x86_64-linux-gnu/3.3.6/include/syslimits.h: +/usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h: /usr/include/limits.h: @@ -173,11 +174,11 @@ nodewatcher.o nodewatcher.o: nodewatcher.c ../../../include/config.h \ /usr/include/asm/socket.h: -/usr/include/asm-x86_64/socket.h: +/usr/include/asm-i386/socket.h: /usr/include/asm/sockios.h: -/usr/include/asm-x86_64/sockios.h: +/usr/include/asm-i386/sockios.h: /usr/include/netinet/in.h: @@ -199,6 +200,10 @@ nodewatcher.o nodewatcher.o: nodewatcher.c ../../../include/config.h \ /usr/include/bits/sigcontext.h: +/usr/include/asm/sigcontext.h: + +/usr/include/asm-i386/sigcontext.h: + /usr/include/bits/sigstack.h: /usr/include/bits/sigthread.h: @@ -229,12 +234,14 @@ nodewatcher.o nodewatcher.o: nodewatcher.c ../../../include/config.h \ /usr/include/asm/errno.h: -/usr/include/asm-x86_64/errno.h: +/usr/include/asm-i386/errno.h: ../../../include/common.h: ../../../include/sysinc.h: +../../../include/config.h: + /usr/include/assert.h: /usr/include/ctype.h: @@ -253,7 +260,7 @@ nodewatcher.o nodewatcher.o: nodewatcher.c ../../../include/config.h \ /usr/include/asm/param.h: -/usr/include/asm-x86_64/param.h: +/usr/include/asm-i386/param.h: /usr/include/sys/bitypes.h: @@ -267,16 +274,6 @@ nodewatcher.o nodewatcher.o: nodewatcher.c ../../../include/config.h \ /usr/include/bits/fcntl.h: -/usr/include/ldap.h: - -/usr/include/lber.h: - -/usr/include/lber_types.h: - -/usr/include/ldap_cdefs.h: - -/usr/include/ldap_features.h: - /usr/include/sys/procfs.h: /usr/include/sys/user.h: @@ -285,9 +282,7 @@ nodewatcher.o nodewatcher.o: nodewatcher.c ../../../include/config.h \ /usr/include/sched.h: -/usr/include/bits/sched.h: - -/usr/include/bits/setjmp.h: +/usr/include/bits/initspin.h: /usr/include/resolv.h: @@ -301,7 +296,7 @@ nodewatcher.o nodewatcher.o: nodewatcher.c ../../../include/config.h \ /usr/include/asm/unistd.h: -/usr/include/asm-x86_64/unistd.h: +/usr/include/asm-i386/unistd.h: /usr/include/bits/syscall.h: @@ -359,11 +354,11 @@ nodewatcher.o nodewatcher.o: nodewatcher.c ../../../include/config.h \ /usr/include/asm/ioctls.h: -/usr/include/asm-x86_64/ioctls.h: +/usr/include/asm-i386/ioctls.h: /usr/include/asm/ioctl.h: -/usr/include/asm-x86_64/ioctl.h: +/usr/include/asm-i386/ioctl.h: /usr/include/bits/ioctl-types.h: @@ -377,6 +372,8 @@ nodewatcher.o nodewatcher.o: nodewatcher.c ../../../include/config.h \ ../../../include/db.h: +../../../include/common.h: + /usr/include/mysql/mysql.h: /usr/include/mysql/mysql_com.h: diff --git a/src/zabbix_server/nodewatcher/nodewatcher.c b/src/zabbix_server/nodewatcher/nodewatcher.c index 5af392cd..3c7af44c 100644 --- a/src/zabbix_server/nodewatcher/nodewatcher.c +++ b/src/zabbix_server/nodewatcher/nodewatcher.c @@ -130,7 +130,7 @@ static int calculate_checksums() zbx_snprintf(tmp,sizeof(tmp),"union all select '%s','%s',%s,md5(concat(%s)) from %s where %s>=" ZBX_FS_UI64 " and %s<=" ZBX_FS_UI64 "\n", tables[i].table, tables[i].recid, tables[i].recid, fields, tables[i].table, tables[i].recid, (zbx_uint64_t)__UINT64_C(100000000000000)*(zbx_uint64_t)nodeid, - tables[i].recid, (zbx_uint64_t)__UINT64_C(100000000000000)*(zbx_uint64_t)nodeid+99999999999999); + tables[i].recid, (zbx_uint64_t)__UINT64_C(100000000000000)*(zbx_uint64_t)nodeid+__UINT64_C(99999999999999)); // zabbix_log( LOG_LEVEL_WARNING, "TMP [%s]", tmp); zbx_strlcat(sql,tmp,sizeof(sql)); } |