diff options
author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-12-04 11:10:23 +0000 |
---|---|---|
committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-12-04 11:10:23 +0000 |
commit | b8677042875ced11a84258e57642fa75e85a022c (patch) | |
tree | 120f7b0f197cac72079aae1f5a6b8db674ec3047 | |
parent | 560c32cc84776bc518a625dbc92acd08920e3fc1 (diff) | |
download | zabbix-b8677042875ced11a84258e57642fa75e85a022c.tar.gz zabbix-b8677042875ced11a84258e57642fa75e85a022c.tar.xz zabbix-b8677042875ced11a84258e57642fa75e85a022c.zip |
- automatic recovery of unsupported items (Alexei)
- added config.refresh_unsupported (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@2386 97f52cf1-0a1b-0410-bd0e-c28be96e8082
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | create/data/data.sql | 2 | ||||
-rw-r--r-- | create/mysql/schema.sql | 3 | ||||
-rw-r--r-- | create/postgresql/schema.sql | 3 | ||||
-rw-r--r-- | frontends/php/config.php | 29 | ||||
-rw-r--r-- | frontends/php/include/config.inc.php | 4 | ||||
-rw-r--r-- | frontends/php/include/locales/en_gb.inc.php | 3 | ||||
-rw-r--r-- | include/common.h | 1 | ||||
-rw-r--r-- | src/libs/zbxcommon/misc.c | 28 | ||||
-rw-r--r-- | src/zabbix_server/functions.c | 38 | ||||
-rw-r--r-- | src/zabbix_server/poller/poller.c | 53 | ||||
-rw-r--r-- | src/zabbix_server/poller/poller.h | 1 | ||||
-rw-r--r-- | src/zabbix_server/server.c | 19 | ||||
-rw-r--r-- | upgrades/dbpatches/1.1beta2_to_1.1beta3/mysql/patch.sql | 1 | ||||
-rw-r--r-- | upgrades/dbpatches/1.1beta2_to_1.1beta3/postgresql/patch.sql | 1 |
15 files changed, 139 insertions, 51 deletions
@@ -1,6 +1,8 @@ Changes for 1.1beta3: - - addeed housekeeping for history_uint (Alexei) + - automatic recovery of unsupported items (Alexei) + - added config.refresh_unsupported (Alexei) + - added housekeeping for history_uint (Alexei) - double sided graphs (Alexei) - added "SET_<TYPE>_RESULT" macross (Eugene) - new W32 un/install floppy. (Eugene) diff --git a/create/data/data.sql b/create/data/data.sql index b1ff5a5b..9a1afd59 100644 --- a/create/data/data.sql +++ b/create/data/data.sql @@ -21,7 +21,7 @@ -- Dumping data for table `config` -- -INSERT INTO config VALUES (365,365); +INSERT INTO config VALUES (365,365,600); -- -- Dumping data for table `media_type` diff --git a/create/mysql/schema.sql b/create/mysql/schema.sql index ea5fbcd8..5eacc3a6 100644 --- a/create/mysql/schema.sql +++ b/create/mysql/schema.sql @@ -140,7 +140,8 @@ CREATE TABLE config ( -- smtp_email varchar(255) DEFAULT '' NOT NULL, -- password_required int(1) DEFAULT '0' NOT NULL, alert_history int(4) DEFAULT '0' NOT NULL, - alarm_history int(4) DEFAULT '0' NOT NULL + alarm_history int(4) DEFAULT '0' NOT NULL, + refresh_unsupported int(4) DEFAULT '0' NOT NULL ) type=InnoDB; -- diff --git a/create/postgresql/schema.sql b/create/postgresql/schema.sql index 358f8b43..98d08d05 100644 --- a/create/postgresql/schema.sql +++ b/create/postgresql/schema.sql @@ -96,7 +96,8 @@ CREATE TABLE config ( -- smtp_email varchar(255) DEFAULT '' NOT NULL, -- password_required int4 DEFAULT '0' NOT NULL, alert_history int4 DEFAULT '0' NOT NULL, - alarm_history int4 DEFAULT '0' NOT NULL + alarm_history int4 DEFAULT '0' NOT NULL, + refresh_unsupported int4 DEFAULT '0' NOT NULL ); -- diff --git a/frontends/php/config.php b/frontends/php/config.php index c8cffd5e..3d886b62 100644 --- a/frontends/php/config.php +++ b/frontends/php/config.php @@ -87,7 +87,7 @@ { if($_REQUEST["register"]=="update") { - $result=update_config($_REQUEST["alarm_history"],$_REQUEST["alert_history"]); + $result=update_config($_REQUEST["alarm_history"],$_REQUEST["alert_history"],$_REQUEST["refresh_unsupported"]); show_messages($result, S_CONFIGURATION_UPDATED, S_CONFIGURATION_WAS_NOT_UPDATED); if($result) { @@ -223,6 +223,7 @@ $h2=$h2.form_select("config",2,S_ESCALATION_RULES); $h2=$h2.form_select("config",3,S_IMAGES); $h2=$h2.form_select("config",4,S_AUTOREGISTRATION); + $h2=$h2.form_select("config",5,S_OTHER); $h2=$h2."</select>"; show_header2($h1, $h2, "<form name=\"selection\" method=\"get\" action=\"config.php\">", "</form>"); @@ -241,6 +242,7 @@ show_table2_v_delimiter($col++); echo "<form method=\"get\" action=\"config.php\">"; + echo "<input type=\"hidden\" name=\"refresh_unsupported\" value=\"".$config["refresh_unsupported"]."\">"; echo nbsp(S_DO_NOT_KEEP_ACTIONS_OLDER_THAN); show_table2_h_delimiter(); echo "<input class=\"biginput\" name=\"alert_history\" value=\"".$config["alert_history"]."\" size=8>"; @@ -258,6 +260,31 @@ ?> <?php + if($_REQUEST["config"]==5) + { + $config=select_config(); + + $col=0; + show_form_begin("config.other"); + echo S_OTHER_PARAMETERS; + + show_table2_v_delimiter($col++); + echo "<form method=\"get\" action=\"config.php\">"; + echo "<input class=\"biginput\" name=\"config\" type=\"hidden\" value=\"5\" size=8>"; + echo "<input type=\"hidden\" name=\"alert_history\" value=\"".$config["alert_history"]."\">"; + echo "<input type=\"hidden\" name=\"alarm_history\" value=\"".$config["alarm_history"]."\">"; + echo nbsp(S_REFRESH_UNSUPPORTED_ITEMS); + show_table2_h_delimiter(); + echo "<input class=\"biginput\" name=\"refresh_unsupported\" value=\"".$config["refresh_unsupported"]."\" size=8>"; + + show_table2_v_delimiter2(); + echo "<input class=\"button\" type=\"submit\" name=\"register\" value=\"update\">"; + + show_table2_header_end(); + } +?> + +<?php if($_REQUEST["config"]==3) { echo "<br>"; diff --git a/frontends/php/include/config.inc.php b/frontends/php/include/config.inc.php index d3acc719..2a62a268 100644 --- a/frontends/php/include/config.inc.php +++ b/frontends/php/include/config.inc.php @@ -1915,7 +1915,7 @@ echo "</head>"; # Update configuration // function update_config($smtp_server,$smtp_helo,$smtp_email,$alarm_history,$alert_history) - function update_config($alarm_history,$alert_history) + function update_config($alarm_history,$alert_history,$refresh_unsupported) { if(!check_right("Configuration of Zabbix","U",0)) { @@ -1925,7 +1925,7 @@ echo "</head>"; // $sql="update config set smtp_server='$smtp_server',smtp_helo='$smtp_helo',smtp_email='$smtp_email',alarm_history=$alarm_history,alert_history=$alert_history"; - $sql="update config set alarm_history=$alarm_history,alert_history=$alert_history"; + $sql="update config set alarm_history=$alarm_history,alert_history=$alert_history,refresh_unsupported=$refresh_unsupported"; return DBexecute($sql); } diff --git a/frontends/php/include/locales/en_gb.inc.php b/frontends/php/include/locales/en_gb.inc.php index 1112b6b0..ee2b4c0e 100644 --- a/frontends/php/include/locales/en_gb.inc.php +++ b/frontends/php/include/locales/en_gb.inc.php @@ -226,6 +226,9 @@ "S_AUTOREGISTRATION_WAS_NOT_UPDATED"=> "Autoregistration was not updated", "S_AUTOREGISTRATION_DELETED"=> "Autoregistration deleted", "S_AUTOREGISTRATION_WAS_NOT_DELETED"=> "Autoregistration was not deleted", + "S_OTHER"=> "Other", + "S_OTHER_PARAMETERS"=> "Other parameters", + "S_REFRESH_UNSUPPORTED_ITEMS"=> "Refresh unsupported items (in sec)", // Latest values "S_LATEST_VALUES"=> "Latest values", diff --git a/include/common.h b/include/common.h index abcae139..6b8a1c1d 100644 --- a/include/common.h +++ b/include/common.h @@ -335,6 +335,7 @@ int is_uint(char *c); void delete_reol(char *c); int get_param(const char *param, int num, char *buf, int maxlen); int num_param(const char *param); +int calculate_item_nextcheck(int delay, int now); void set_result_type(AGENT_RESULT *result, char *c); diff --git a/src/libs/zbxcommon/misc.c b/src/libs/zbxcommon/misc.c index 3ec62b47..f73de3a2 100644 --- a/src/libs/zbxcommon/misc.c +++ b/src/libs/zbxcommon/misc.c @@ -4,6 +4,34 @@ /****************************************************************************** * * + * Function: calculate_item_nextcheck * + * * + * Purpose: calculate nextcheck timespamp for item * + * * + * Parameters: delay - item's refresh rate in sec * + * now - current timestamp * + * * + * Return value: nextcheck value * + * * + * Author: Alexei Vladishev * + * * + * Comments: Old algorithm: now+delay * + * New one: preserve period, if delay==5, nextcheck = 0,5,10,15,... * + * * + ******************************************************************************/ +int calculate_item_nextcheck(int delay, int now) +{ + int i; + + i=delay*(int)(now/delay); + + while(i<=now) i+=delay; + + return i; +} + +/****************************************************************************** + * * * Function: cmp_double * * * * Purpose: compares two float values * diff --git a/src/zabbix_server/functions.c b/src/zabbix_server/functions.c index feb83ccc..776e0380 100644 --- a/src/zabbix_server/functions.c +++ b/src/zabbix_server/functions.c @@ -54,34 +54,6 @@ extern int autoregister(char *server); /****************************************************************************** * * - * Function: calculate_item_nextcheck * - * * - * Purpose: calculate nextcheck timespamp for item * - * * - * Parameters: delay - item's refresh rate in sec * - * now - current timestamp * - * * - * Return value: nextcheck value * - * * - * Author: Alexei Vladishev * - * * - * Comments: Old algorithm: now+delay * - * New one: preserve period, if delay==5, nextcheck = 0,5,10,15,... * - * * - ******************************************************************************/ -int calculate_item_nextcheck(int delay, int now) -{ - int i; - - i=delay*(int)(now/delay); - - while(i<=now) i+=delay; - - return i; -} - -/****************************************************************************** - * * * Function: update_functions * * * * Purpose: re-calculate and updates values of functions related to the item * @@ -761,6 +733,16 @@ static int update_item(DB_ITEM *item, AGENT_RESULT *value, int now) } DBexecute(sql); +/* Update item status if required */ + if(item->status == ITEM_STATUS_NOTSUPPORTED) + { + zabbix_log( LOG_LEVEL_WARNING, "Parameter [%s] became supported by agent on host [%s]", item->key, item->host ); + zabbix_syslog("Parameter [%s] became supported by agent on host [%s]", item->key, item->host ); + item->status = ITEM_STATUS_ACTIVE; + snprintf(sql,sizeof(sql)-1,"update items set status=%d where itemid=%d", ITEM_STATUS_ACTIVE, item->itemid); + DBexecute(sql); + } + return ret; } diff --git a/src/zabbix_server/poller/poller.c b/src/zabbix_server/poller/poller.c index 08a85a51..4ff51fe6 100644 --- a/src/zabbix_server/poller/poller.c +++ b/src/zabbix_server/poller/poller.c @@ -110,8 +110,16 @@ static int get_minnextcheck(int now) /* Host status 0 == MONITORED 1 == NOT MONITORED - 2 == UNREACHABLE */ - snprintf(sql,sizeof(sql)-1,"select count(*),min(nextcheck) from items i,hosts h where ((h.status=%d and h.available!=%d) or (h.status=%d and h.available=%d and h.disable_until<%d)) and h.hostid=i.hostid and i.status=%d and i.type not in (%d,%d) and i.itemid%%%d=%d and i.key_ not in ('%s','%s','%s','%s')", HOST_STATUS_MONITORED, HOST_AVAILABLE_FALSE,HOST_STATUS_MONITORED, HOST_AVAILABLE_FALSE, now, ITEM_STATUS_ACTIVE, ITEM_TYPE_TRAPPER, ITEM_TYPE_ZABBIX_ACTIVE, CONFIG_SUCKERD_FORKS-5,server_num-5,SERVER_STATUS_KEY, SERVER_ICMPPING_KEY, SERVER_ICMPPINGSEC_KEY,SERVER_ZABBIXLOG_KEY); + 2 == UNREACHABLE */ + if(CONFIG_REFRESH_UNSUPPORTED != 0) + { + snprintf(sql,sizeof(sql)-1,"select count(*),min(nextcheck) from items i,hosts h where ((h.status=%d and h.available!=%d) or (h.status=%d and h.available=%d and h.disable_until<%d)) and h.hostid=i.hostid and i.status in (%d,%d) and i.type not in (%d,%d) and i.itemid%%%d=%d and i.key_ not in ('%s','%s','%s','%s')", HOST_STATUS_MONITORED, HOST_AVAILABLE_FALSE,HOST_STATUS_MONITORED, HOST_AVAILABLE_FALSE, now, ITEM_STATUS_ACTIVE, ITEM_STATUS_NOTSUPPORTED, ITEM_TYPE_TRAPPER, ITEM_TYPE_ZABBIX_ACTIVE, CONFIG_SUCKERD_FORKS-5,server_num-5,SERVER_STATUS_KEY, SERVER_ICMPPING_KEY, SERVER_ICMPPINGSEC_KEY,SERVER_ZABBIXLOG_KEY); + } + else + { + snprintf(sql,sizeof(sql)-1,"select count(*),min(nextcheck) from items i,hosts h where ((h.status=%d and h.available!=%d) or (h.status=%d and h.available=%d and h.disable_until<%d)) and h.hostid=i.hostid and i.status in (%d) and i.type not in (%d,%d) and i.itemid%%%d=%d and i.key_ not in ('%s','%s','%s','%s')", HOST_STATUS_MONITORED, HOST_AVAILABLE_FALSE,HOST_STATUS_MONITORED, HOST_AVAILABLE_FALSE, now, ITEM_STATUS_ACTIVE, ITEM_TYPE_TRAPPER, ITEM_TYPE_ZABBIX_ACTIVE, CONFIG_SUCKERD_FORKS-5,server_num-5,SERVER_STATUS_KEY, SERVER_ICMPPING_KEY, SERVER_ICMPPINGSEC_KEY,SERVER_ZABBIXLOG_KEY); + } + result = DBselect(sql); if( DBnum_rows(result) == 0) @@ -202,7 +210,14 @@ int get_values(void) now = time(NULL); - snprintf(sql,sizeof(sql)-1,"select i.itemid,i.key_,h.host,h.port,i.delay,i.description,i.nextcheck,i.type,i.snmp_community,i.snmp_oid,h.useip,h.ip,i.history,i.lastvalue,i.prevvalue,i.hostid,h.status,i.value_type,h.network_errors,i.snmp_port,i.delta,i.prevorgvalue,i.lastclock,i.units,i.multiplier,i.snmpv3_securityname,i.snmpv3_securitylevel,i.snmpv3_authpassphrase,i.snmpv3_privpassphrase,i.formula,h.available from items i,hosts h where i.nextcheck<=%d and i.status=%d and i.type not in (%d,%d) and ((h.status=%d and h.available!=%d) or (h.status=%d and h.available=%d and h.disable_until<=%d)) and h.hostid=i.hostid and i.itemid%%%d=%d and i.key_ not in ('%s','%s','%s','%s') order by i.nextcheck", now, ITEM_STATUS_ACTIVE, ITEM_TYPE_TRAPPER, ITEM_TYPE_ZABBIX_ACTIVE, HOST_STATUS_MONITORED, HOST_AVAILABLE_FALSE, HOST_STATUS_MONITORED, HOST_AVAILABLE_FALSE, now, CONFIG_SUCKERD_FORKS-5,server_num-5,SERVER_STATUS_KEY, SERVER_ICMPPING_KEY, SERVER_ICMPPINGSEC_KEY,SERVER_ZABBIXLOG_KEY); + if(CONFIG_REFRESH_UNSUPPORTED != 0) + { + snprintf(sql,sizeof(sql)-1,"select i.itemid,i.key_,h.host,h.port,i.delay,i.description,i.nextcheck,i.type,i.snmp_community,i.snmp_oid,h.useip,h.ip,i.history,i.lastvalue,i.prevvalue,i.hostid,h.status,i.value_type,h.network_errors,i.snmp_port,i.delta,i.prevorgvalue,i.lastclock,i.units,i.multiplier,i.snmpv3_securityname,i.snmpv3_securitylevel,i.snmpv3_authpassphrase,i.snmpv3_privpassphrase,i.formula,h.available from items i,hosts h where i.nextcheck<=%d and i.status in (%d,%d) and i.type not in (%d,%d) and ((h.status=%d and h.available!=%d) or (h.status=%d and h.available=%d and h.disable_until<=%d)) and h.hostid=i.hostid and i.itemid%%%d=%d and i.key_ not in ('%s','%s','%s','%s') order by i.nextcheck", now, ITEM_STATUS_ACTIVE, ITEM_STATUS_NOTSUPPORTED, ITEM_TYPE_TRAPPER, ITEM_TYPE_ZABBIX_ACTIVE, HOST_STATUS_MONITORED, HOST_AVAILABLE_FALSE, HOST_STATUS_MONITORED, HOST_AVAILABLE_FALSE, now, CONFIG_SUCKERD_FORKS-5,server_num-5,SERVER_STATUS_KEY, SERVER_ICMPPING_KEY, SERVER_ICMPPINGSEC_KEY,SERVER_ZABBIXLOG_KEY); + } + else + { + snprintf(sql,sizeof(sql)-1,"select i.itemid,i.key_,h.host,h.port,i.delay,i.description,i.nextcheck,i.type,i.snmp_community,i.snmp_oid,h.useip,h.ip,i.history,i.lastvalue,i.prevvalue,i.hostid,h.status,i.value_type,h.network_errors,i.snmp_port,i.delta,i.prevorgvalue,i.lastclock,i.units,i.multiplier,i.snmpv3_securityname,i.snmpv3_securitylevel,i.snmpv3_authpassphrase,i.snmpv3_privpassphrase,i.formula,h.available from items i,hosts h where i.nextcheck<=%d and i.status in (%d) and i.type not in (%d,%d) and ((h.status=%d and h.available!=%d) or (h.status=%d and h.available=%d and h.disable_until<=%d)) and h.hostid=i.hostid and i.itemid%%%d=%d and i.key_ not in ('%s','%s','%s','%s') order by i.nextcheck", now, ITEM_STATUS_ACTIVE, ITEM_TYPE_TRAPPER, ITEM_TYPE_ZABBIX_ACTIVE, HOST_STATUS_MONITORED, HOST_AVAILABLE_FALSE, HOST_STATUS_MONITORED, HOST_AVAILABLE_FALSE, now, CONFIG_SUCKERD_FORKS-5,server_num-5,SERVER_STATUS_KEY, SERVER_ICMPPING_KEY, SERVER_ICMPPINGSEC_KEY,SERVER_ZABBIXLOG_KEY); + } result = DBselect(sql); for(stop=i=0;i<DBnum_rows(result)&&stop==0;i++) @@ -239,19 +254,27 @@ int get_values(void) } else if(res == NOTSUPPORTED) { - zabbix_log( LOG_LEVEL_WARNING, "Parameter [%s] is not supported by agent on host [%s]", item.key, item.host ); - zabbix_syslog("Parameter [%s] is not supported by agent on host [%s]", item.key, item.host ); - DBupdate_item_status_to_notsupported(item.itemid, agent.str); -/* if(HOST_STATUS_UNREACHABLE == item.host_status)*/ - if(HOST_AVAILABLE_TRUE != item.host_available) + if(item.status == ITEM_STATUS_NOTSUPPORTED) { - item.host_available=HOST_AVAILABLE_TRUE; - zabbix_log( LOG_LEVEL_WARNING, "Enabling host [%s]", item.host ); - zabbix_syslog("Enabling host [%s]", item.host ); - DBupdate_host_availability(item.hostid,HOST_AVAILABLE_TRUE,now,agent.msg); - update_key_status(item.hostid,HOST_STATUS_MONITORED); - - stop=1; + snprintf(sql,sizeof(sql)-1,"update items set nextcheck=%d, lastclock=%d where itemid=%d",calculate_item_nextcheck(CONFIG_REFRESH_UNSUPPORTED,now), now, item.itemid); + DBexecute(sql); + } + else + { + zabbix_log( LOG_LEVEL_WARNING, "Parameter [%s] is not supported by agent on host [%s]", item.key, item.host ); + zabbix_syslog("Parameter [%s] is not supported by agent on host [%s]", item.key, item.host ); + DBupdate_item_status_to_notsupported(item.itemid, agent.str); + /* if(HOST_STATUS_UNREACHABLE == item.host_status)*/ + if(HOST_AVAILABLE_TRUE != item.host_available) + { + item.host_available=HOST_AVAILABLE_TRUE; + zabbix_log( LOG_LEVEL_WARNING, "Enabling host [%s]", item.host ); + zabbix_syslog("Enabling host [%s]", item.host ); + DBupdate_host_availability(item.hostid,HOST_AVAILABLE_TRUE,now,agent.msg); + update_key_status(item.hostid,HOST_STATUS_MONITORED); + + stop=1; + } } } else if(res == NETWORK_ERROR) diff --git a/src/zabbix_server/poller/poller.h b/src/zabbix_server/poller/poller.h index 5b39602a..9c828bb6 100644 --- a/src/zabbix_server/poller/poller.h +++ b/src/zabbix_server/poller/poller.h @@ -25,6 +25,7 @@ extern int server_num; extern int CONFIG_TIMEOUT; extern int CONFIG_SUCKERD_FORKS; +extern int CONFIG_REFRESH_UNSUPPORTED; void main_poller_loop(); diff --git a/src/zabbix_server/server.c b/src/zabbix_server/server.c index 1885effb..41128924 100644 --- a/src/zabbix_server/server.c +++ b/src/zabbix_server/server.c @@ -92,6 +92,9 @@ char *CONFIG_DBPASSWORD = NULL; char *CONFIG_DBSOCKET = NULL; int CONFIG_DBPORT = 3306; +/* From table config */ +int CONFIG_REFRESH_UNSUPPORTED = 0; + /****************************************************************************** * * * Function: uninit * @@ -329,6 +332,9 @@ void init_config(void) {0} }; + char sql[MAX_STRING_LEN]; + DB_RESULT *result; + if(CONFIG_FILE == NULL) { CONFIG_FILE=strdup("/etc/zabbix/zabbix_server.conf"); @@ -353,6 +359,16 @@ void init_config(void) { CONFIG_FPING_LOCATION=strdup("/usr/sbin/fping"); } + + DBconnect(); + + snprintf(sql,sizeof(sql)-1,"select refresh_usupported from config"); + result = DBselect(sql); + + if(DBnum_rows(result)==1) + { + CONFIG_REFRESH_UNSUPPORTED = atoi(DBget_field(result,0,0)); + } } void trend(void) @@ -498,7 +514,8 @@ int main(int argc, char **argv) zabbix_log( LOG_LEVEL_WARNING, "Starting zabbix_server. ZABBIX %s.", ZABBIX_VERSION); /* Need to set trigger status to UNKNOWN since last run */ - DBconnect(); +/* DBconnect() already made in init_config() */ +/* DBconnect();*/ DBupdate_triggers_status_after_restart(); /*#define CALC_TREND*/ diff --git a/upgrades/dbpatches/1.1beta2_to_1.1beta3/mysql/patch.sql b/upgrades/dbpatches/1.1beta2_to_1.1beta3/mysql/patch.sql index 518f280c..8f77d229 100644 --- a/upgrades/dbpatches/1.1beta2_to_1.1beta3/mysql/patch.sql +++ b/upgrades/dbpatches/1.1beta2_to_1.1beta3/mysql/patch.sql @@ -13,3 +13,4 @@ CREATE TABLE history_uint ( ) type=InnoDB; alter table graphs_items add yaxisside int(1) DEFAULT '1' NOT NULL; +alter table config add refresh_unsupported int(4) DEFAULT '600' NOT NULL; diff --git a/upgrades/dbpatches/1.1beta2_to_1.1beta3/postgresql/patch.sql b/upgrades/dbpatches/1.1beta2_to_1.1beta3/postgresql/patch.sql index 8869fc83..35fcc631 100644 --- a/upgrades/dbpatches/1.1beta2_to_1.1beta3/postgresql/patch.sql +++ b/upgrades/dbpatches/1.1beta2_to_1.1beta3/postgresql/patch.sql @@ -15,3 +15,4 @@ CREATE TABLE history_uint ( CREATE INDEX history_uint_i_c on history_uint (itemid, clock); alter table graphs_items add yaxisside int2 DEFAULT '1' NOT NULL; +alter table config add refresh_unsupported int4 DEFAULT '0' NOT NULL; |