--- ../ZBXNEXT-3006-2/include/zbxserialize.h 2017-08-02 08:40:03.371348366 +0300 +++ include/zbxserialize.h 2017-08-02 08:38:41.078416333 +0300 @@ -39,7 +39,7 @@ #define zbx_serialize_char(buffer, value) (*buffer = (char)value, sizeof(char)) -#define zbx_serialize_str_null(buffer) \ +#define zbx_serialize_str_null(buffer) \ ( \ memset(buffer, 0, sizeof(zbx_uint32_t)), \ sizeof(zbx_uint32_t) \ @@ -85,7 +85,7 @@ value_len + sizeof(zbx_uint32_t) \ ) -#define zbx_deserialize_str_s(buffer, value, value_len) \ +#define zbx_deserialize_str_s(buffer, value, value_len) \ ( \ memcpy(&value_len, buffer, sizeof(zbx_uint32_t)), \ memcpy(value, buffer + sizeof(zbx_uint32_t), value_len), \ --- ../ZBXNEXT-3006-2/src/zabbix_server/server.c 2017-08-02 08:40:03.507343482 +0300 +++ src/zabbix_server/server.c 2017-08-02 08:44:37.490382450 +0300 @@ -128,6 +128,8 @@ {NULL} }; + + /* short options */ static char shortopts[] = "c:hVR:f"; --- ../ZBXNEXT-3006-2/src/libs/zbxnix/ipcservice.c 2017-08-02 08:40:03.607339891 +0300 +++ src/libs/zbxnix/ipcservice.c 2017-08-02 08:50:53.899428200 +0300 @@ -3,7 +3,6 @@ #include "zbxalgo.h" #include "log.h" -#include #include "zbxipcservice.h" #define ZBX_IPC_PATH_MAX sizeof(((struct sockaddr_un *)0)->sun_path) --- ../ZBXNEXT-3006-2/src/libs/zbxdbupgrade/dbupgrade_3030.c 2017-08-02 08:40:03.599340178 +0300 +++ src/libs/zbxdbupgrade/dbupgrade_3030.c 2017-08-02 08:55:08.680287191 +0300 @@ -1730,17 +1730,48 @@ static int DBpatch_3030143(void) { + const ZBX_FIELD field = {"maxsessions", "1", NULL, NULL, 0, ZBX_TYPE_INT, ZBX_NOTNULL, 0}; + + return DBadd_field("media_type", &field); +} + +static int DBpatch_3030144(void) +{ + const ZBX_FIELD field = {"maxattempts", "3", NULL, NULL, 0, ZBX_TYPE_INT, ZBX_NOTNULL, 0}; + + return DBadd_field("media_type", &field); +} + +static int DBpatch_3030145(void) +{ + const ZBX_FIELD field = {"attempt_interval", "10s", NULL, NULL, 32, ZBX_TYPE_CHAR, ZBX_NOTNULL, 0}; + + return DBadd_field("media_type", &field); +} + +static int DBpatch_3030146(void) +{ + return DBdrop_index("alerts", "alerts_4"); +} + +static int DBpatch_3030147(void) +{ + return DBcreate_index("alerts", "alerts_4", "status", 0); +} + +static int DBpatch_3030148(void) +{ const ZBX_FIELD field = {"master_itemid", NULL, NULL, NULL, 0, ZBX_TYPE_ID, 0, 0}; return DBadd_field("items", &field); } -static int DBpatch_3030144(void) +static int DBpatch_3030149(void) { return DBcreate_index("items", "items_7", "master_itemid", 0); } -static int DBpatch_3030145(void) +static int DBpatch_3030150(void) { const ZBX_FIELD field = {"master_itemid", NULL, "items", "itemid", 0, 0, 0, ZBX_FK_CASCADE_DELETE}; @@ -1898,5 +1929,10 @@ DBPATCH_ADD(3030143, 0, 1) DBPATCH_ADD(3030144, 0, 1) DBPATCH_ADD(3030145, 0, 1) +DBPATCH_ADD(3030146, 0, 1) +DBPATCH_ADD(3030147, 0, 1) +DBPATCH_ADD(3030148, 0, 1) +DBPATCH_ADD(3030149, 0, 1) +DBPATCH_ADD(3030150, 0, 1) DBPATCH_END() --- ../ZBXNEXT-3006-2/src/libs/zbxdbhigh/template_item.c 2017-08-02 09:42:39.823032148 +0300 +++ src/libs/zbxdbhigh/template_item.c 2017-08-02 09:54:38.992026054 +0300 @@ -500,10 +500,9 @@ if (NULL == item->key) /* existing item */ { - char *name_esc, *delay_esc, *history_esc, *trends_esc, *trapper_hosts_esc, - *units_esc, *formula_esc, *logtimefmt_esc, *params_esc, *ipmi_sensor_esc, - *snmp_community_esc, *snmp_oid_esc, *snmpv3_securityname_esc, - *snmpv3_authpassphrase_esc, *snmpv3_privpassphrase_esc, *username_esc, + char *name_esc, *delay_esc, *history_esc, *trends_esc, *trapper_hosts_esc, *units_esc, *formula_esc, + *logtimefmt_esc, *params_esc, *ipmi_sensor_esc, *snmp_community_esc, *snmp_oid_esc, + *snmpv3_securityname_esc, *snmpv3_authpassphrase_esc, *snmpv3_privpassphrase_esc, *username_esc, *password_esc, *publickey_esc, *privatekey_esc, *description_esc, *lifetime_esc, *snmpv3_contextname_esc, *port_esc, *jmx_endpoint_esc; @@ -573,21 +572,17 @@ "jmx_endpoint='%s'," "master_itemid=%s" " where itemid=" ZBX_FS_UI64 ";\n", - name_esc, (int)item->type, (int)item->value_type, - delay_esc, - history_esc, trends_esc, (int)item->status, trapper_hosts_esc, - units_esc, formula_esc, - logtimefmt_esc, DBsql_id_ins(item->valuemapid), params_esc, - ipmi_sensor_esc, snmp_community_esc, snmp_oid_esc, - snmpv3_securityname_esc, (int)item->snmpv3_securitylevel, - (int)item->snmpv3_authprotocol, snmpv3_authpassphrase_esc, - (int)item->snmpv3_privprotocol, snmpv3_privpassphrase_esc, - snmpv3_contextname_esc, (int)item->authtype, username_esc, - password_esc, publickey_esc, privatekey_esc, - item->templateid, (int)item->flags, description_esc, - (int)item->inventory_link, DBsql_id_ins(item->interfaceid), - lifetime_esc, (int)item->evaltype, port_esc, jmx_endpoint_esc, - DBsql_id_ins(item->master_itemid), item->itemid); + name_esc, (int)item->type, (int)item->value_type, delay_esc, + history_esc, trends_esc, (int)item->status, trapper_hosts_esc, units_esc, + formula_esc, logtimefmt_esc, DBsql_id_ins(item->valuemapid), params_esc, + ipmi_sensor_esc, snmp_community_esc, snmp_oid_esc, snmpv3_securityname_esc, + (int)item->snmpv3_securitylevel, (int)item->snmpv3_authprotocol, + snmpv3_authpassphrase_esc, (int)item->snmpv3_privprotocol, snmpv3_privpassphrase_esc, + snmpv3_contextname_esc, (int)item->authtype, username_esc, password_esc, publickey_esc, + privatekey_esc, item->templateid, (int)item->flags, description_esc, + (int)item->inventory_link, DBsql_id_ins(item->interfaceid), lifetime_esc, + (int)item->evaltype, port_esc, jmx_endpoint_esc, DBsql_id_ins(item->master_itemid), + item->itemid); zbx_free(jmx_endpoint_esc); zbx_free(port_esc); @@ -680,10 +675,10 @@ "delay", "history", "trends", "status", "trapper_hosts", "units", "formula", "logtimefmt", "valuemapid", "params", "ipmi_sensor", "snmp_community", "snmp_oid", "snmpv3_securityname", "snmpv3_securitylevel", - "snmpv3_authprotocol", "snmpv3_authpassphrase", "snmpv3_privprotocol", - "snmpv3_privpassphrase", "authtype", "username", "password", "publickey", "privatekey", - "templateid", "flags", "description", "inventory_link", "interfaceid", "lifetime", - "snmpv3_contextname", "evaltype", "port", "jmx_endpoint", "master_itemid", NULL); + "snmpv3_authprotocol", "snmpv3_authpassphrase", "snmpv3_privprotocol", "snmpv3_privpassphrase", + "authtype", "username", "password", "publickey", "privatekey", "templateid", "flags", + "description", "inventory_link", "interfaceid", "lifetime", "snmpv3_contextname", "evaltype", + "port", "jmx_endpoint", "master_itemid", NULL); } if (0 != upd_items) --- ../ZBXNEXT-3006-2/src/libs/zbxdbhigh/lld_item.c 2017-08-02 09:42:39.823032148 +0300 +++ src/libs/zbxdbhigh/lld_item.c 2017-08-02 10:54:48.216289420 +0300 @@ -514,7 +514,8 @@ "i.snmp_community,i.snmp_oid,i.port,i.snmpv3_securityname,i.snmpv3_securitylevel," "i.snmpv3_authprotocol,i.snmpv3_authpassphrase,i.snmpv3_privprotocol," "i.snmpv3_privpassphrase,i.authtype,i.username,i.password,i.publickey,i.privatekey," - "i.description,i.interfaceid,i.snmpv3_contextname,i.jmx_endpoint,id.parent_itemid,i.master_itemid" + "i.description,i.interfaceid,i.snmpv3_contextname,i.jmx_endpoint,i.master_itemid," + "id.parent_itemid" " from item_discovery id" " join items i" " on id.itemid=i.itemid" @@ -527,7 +528,7 @@ while (NULL != (row = DBfetch(result))) { - ZBX_STR2UINT64(itemid, row[36]); + ZBX_STR2UINT64(itemid, row[37]); if (FAIL == (index = zbx_vector_ptr_bsearch(item_prototypes, &itemid, ZBX_DEFAULT_UINT64_PTR_COMPARE_FUNC))) @@ -643,7 +644,7 @@ item->jmx_endpoint = zbx_strdup(NULL, row[35]); item->jmx_endpoint_orig = NULL; - ZBX_DBROW2UINT64(item->master_itemid, row[37]); + ZBX_DBROW2UINT64(item->master_itemid, row[36]); item->lld_row = NULL; @@ -1831,8 +1832,8 @@ zbx_snprintf_alloc(sql, sql_alloc, sql_offset, "%sjmx_endpoint='%s'", d, value_esc); zbx_free(value_esc); + d = ","; } - if (0 != (item->flags & ZBX_FLAG_LLD_ITEM_UPDATE_MASTER_ITEM)) { zbx_snprintf_alloc(sql, sql_alloc, sql_offset, "%smaster_itemid=%s", @@ -1937,7 +1938,7 @@ "snmpv3_securitylevel", "snmpv3_authprotocol", "snmpv3_authpassphrase", "snmpv3_privprotocol", "snmpv3_privpassphrase", "authtype", "username", "password", "publickey", "privatekey", "description", "interfaceid", "flags", "snmpv3_contextname", - "jmx_endpoint, master_itemid", NULL); + "jmx_endpoint", "master_itemid", NULL); zbx_db_insert_prepare(&db_insert_idiscovery, "item_discovery", "itemdiscoveryid", "itemid", "parent_itemid", "key_", NULL); --- ../ZBXNEXT-3006-2/create/src/schema.tmpl 2017-08-02 11:04:47.524637331 +0300 +++ create/src/schema.tmpl 2017-08-02 11:06:49.252675314 +0300 @@ -1528,4 +1528,4 @@ TABLE|dbversion|| FIELD |mandatory |t_integer |'0' |NOT NULL | FIELD |optional |t_integer |'0' |NOT NULL | -ROW |3030145 |3030145 +ROW |3030150 |3030150 --- ../ZBXNEXT-3006-2/create/src/data.tmpl 2017-08-02 11:33:12.525852067 +0300 +++ create/src/data.tmpl 2017-08-02 11:35:20.245739517 +0300 @@ -891,6 +891,7 @@ ROW |25366 |5 | | |10047 |Zabbix $4 $2 processes, in % |zabbix[process,ipmi manager,avg,busy] |1m |1w |365d |0 |0 | |% | |0 | | | | |NULL |NULL | | |0 | | | | |0 |NULL | | |0 |30d |0 |0 | |0 | | ROW |25368 |5 | | |10048 |Zabbix $4 $2 processes, in % |zabbix[process,ipmi manager,avg,busy] |1m |1w |365d |0 |0 | |% | |0 | | | | |NULL |NULL | | |0 | | | | |0 |NULL | | |0 |30d |0 |0 | |0 | | ROW |25369 |5 | | |10048 |Zabbix $4 $2 processes, in % |zabbix[process,task manager,avg,busy] |1m |1w |365d |0 |0 | |% | |0 | | | | |NULL |NULL | | |0 | | | | |0 |NULL | | |0 |30d |0 |0 | |0 | | +ROW |25370 |5 | | |10047 |Zabbix $4 $2 processes, in % |zabbix[process,alert manager,avg,busy] |1m |1w |365d |0 |0 | |% | |0 | | | | |NULL |NULL | | |0 | | | | |0 |NULL | | |0 |30d |0 |0 | |0 | | ROW |10020 |0 | | |10001 |Agent ping |agent.ping |1m |1w |365d |0 |3 | | | |0 | | | | |22232 |10 | | |0 | | | | |0 |NULL | |The agent always returns 1 for this item. It could be used in combination with nodata() for availability check. |0 |0 |0 |0 | |0 | | ROW |10059 |0 | | |10001 |Version of zabbix_agent(d) running |agent.version |1h |1w |0 |0 |1 | | | |0 | | | | |22231 |NULL | | |0 | | | | |0 |NULL | | |0 |0 |0 |0 | |0 | | ROW |22715 |4 |{$SNMP_COMMUNITY}|SNMPv2-MIB::sysContact.0 |10066 |Device contact details |sysContact |1h |1w |0 |0 |1 | | | |0 | | | | |22713 |NULL | | |0 | | | | |0 |NULL | |The textual identification of the contact person for this managed node, together with information on how to contact this person. If no contact information is known, the value is the zero-length string. |23 |0 |0 |0 | |0 | | @@ -1052,10 +1053,11 @@ ROW |23662 |5 | | |10084 |Zabbix value cache operating mode |zabbix[vcache,cache,mode] |1m |1w |365d |0 |3 | | | |0 | | | | |23661 |15 | | |0 | | | | |0 |NULL | | |0 |30d |0 |0 | |0 | | ROW |23664 |5 | | |10084 |Zabbix $4 $2 processes, in % |zabbix[process,task manager,avg,busy] |1m |1w |365d |0 |0 | |% | |0 | | | | |23663 |NULL | | |0 | | | | |0 |NULL | | |0 |30d |0 |0 | |0 | | ROW |25367 |5 | | |10084 |Zabbix $4 $2 processes, in % |zabbix[process,ipmi manager,avg,busy] |1m |1w |365d |0 |0 | |% | |0 | | | | |25366 |NULL | | |0 | | | | |0 |NULL | | |0 |30d |0 |0 | |0 | | -ROW |25665 |5 | | |10047 |Zabbix $4 $2 processes, in % |zabbix[process,preprocessing manager,avg,busy] |60 |7 |365 |0 |0 | |% | |0 | | | | |NULL |NULL | | | |0 | | | | |0 |NULL | | |0 |0 |0 |0 | |0 | -ROW |25666 |5 | | |10047 |Zabbix $4 $2 processes, in % |zabbix[process,preprocessing worker,avg,busy] |60 |7 |365 |0 |0 | |% | |0 | | | | |NULL |NULL | | | |0 | | | | |0 |NULL | | |0 |0 |0 |0 | |0 | -ROW |25667 |5 | | |10084 |Zabbix $4 $2 processes, in % |zabbix[process,preprocessing manager,avg,busy] |60 |7 |365 |0 |0 | |% | |0 | | | | |25665 |NULL | | | |0 | | | | |0 |NULL | | |0 |30 |0 |0 | |0 | -ROW |25668 |5 | | |10084 |Zabbix $4 $2 processes, in % |zabbix[process,preprocessing worker,avg,busy] |60 |7 |365 |0 |0 | |% | |0 | | | | |25666 |NULL | | | |0 | | | | |0 |NULL | | |0 |30 |0 |0 | |0 | +ROW |25371 |5 | | |10084 |Zabbix $4 $2 processes, in % |zabbix[process,alert manager,avg,busy] |1m |1w |365d |0 |0 | |% | |0 | | | | |25370 |NULL | | |0 | | | | |0 |NULL | | |0 |30d |0 |0 | |0 | | +ROW |25665 |5 | | |10047 |Zabbix $4 $2 processes, in % |zabbix[process,preprocessing manager,avg,busy] |60 |7 |365 |0 |0 | |% | |0 | | | | |NULL |NULL | | |0 | | | | |0 |NULL | | |0 |0 |0 |0 | |0 | | +ROW |25666 |5 | | |10047 |Zabbix $4 $2 processes, in % |zabbix[process,preprocessing worker,avg,busy] |60 |7 |365 |0 |0 | |% | |0 | | | | |NULL |NULL | | |0 | | | | |0 |NULL | | |0 |0 |0 |0 | |0 | | +ROW |25667 |5 | | |10084 |Zabbix $4 $2 processes, in % |zabbix[process,preprocessing manager,avg,busy] |60 |7 |365 |0 |0 | |% | |0 | | | | |25665 |NULL | | |0 | | | | |0 |NULL | | |0 |30 |0 |0 | |0 | | +ROW |25668 |5 | | |10084 |Zabbix $4 $2 processes, in % |zabbix[process,preprocessing worker,avg,busy] |60 |7 |365 |0 |0 | |% | |0 | | | | |25666 |NULL | | |0 | | | | |0 |NULL | | |0 |30 |0 |0 | |0 | | TABLE |media_type FIELDS|mediatypeid|type|description|smtp_server |smtp_helo |smtp_email |exec_path|gsm_modem |username |passwd|status|smtp_port|smtp_security|smtp_verify_peer|smtp_verify_host|smtp_authentication|exec_params|maxsessions|maxattempts|attempt_interval| @@ -1139,8 +1141,8 @@ ROW |8 |6 |23 |0 |4 | | TABLE |config -FIELDS|configid|alert_usrgrpid|discovery_groupid| -ROW |1 |7 |5 | +FIELDS|configid|refresh_unsupported|work_period |alert_usrgrpid|discovery_groupid| +ROW |1 |10m |1-5,09:00-18:00|7 |5 | TABLE |triggers FIELDS|triggerid|expression |description |url|status|priority|comments |templateid|type|flags|recovery_mode|recovery_expression|correlation_mode|correlation_tag|manual_close| @@ -1442,10 +1444,11 @@ ROW |13558 |{13161}=1 |Zabbix value cache working in low memory mode | |0 |4 | |13557 |0 |0 |0 | |0 | |0 | ROW |13560 |{13197}>75 |Zabbix task manager processes more than 75% busy | |0 |3 | |13559 |0 |0 |1 |{13197}<65 |0 | |0 | ROW |13563 |{13223}>75 |Zabbix ipmi manager processes more than 75% busy | |0 |3 | |13562 |0 |0 |1 |{13223}<65 |0 | |0 | -ROW |13566 |{13226}>75 |Zabbix preprocessing manager processes more than 75% busy | |0 |3 | |NULL |0 |0 |1 |{13226}<65 |0 | |0 | -ROW |13567 |{13227}>75 |Zabbix preprocessing worker processes more than 75% busy | |0 |3 | |NULL |0 |0 |1 |{13227}<65 |0 | |0 | -ROW |13568 |{13228}>75 |Zabbix preprocessing manager processes more than 75% busy | |0 |3 | |13566 |0 |0 |1 |{13228}<65 |0 | |0 | -ROW |13569 |{13229}>75 |Zabbix preprocessing worker processes more than 75% busy | |0 |3 | |13567 |0 |0 |1 |{13229}<65 |0 | |0 | +ROW |13567 |{13227}>75 |Zabbix ipmi manager processes more than 75% busy | |0 |3 | |13566 |0 |0 |1 |{13227}<65 |0 | |0 | +ROW |13568 |{13228}>75 |Zabbix preprocessing manager processes more than 75% busy | |0 |3 | |NULL |0 |0 |1 |{13228}<65 |0 | |0 | +ROW |13569 |{13229}>75 |Zabbix preprocessing worker processes more than 75% busy | |0 |3 | |NULL |0 |0 |1 |{13229}<65 |0 | |0 | +ROW |13570 |{13230}>75 |Zabbix preprocessing manager processes more than 75% busy | |0 |3 | |13568 |0 |0 |1 |{13230}<65 |0 | |0 | +ROW |13571 |{13231}>75 |Zabbix preprocessing worker processes more than 75% busy | |0 |3 | |13569 |0 |0 |1 |{13231}<65 |0 | |0 | TABLE |trigger_depends FIELDS|triggerdepid|triggerid_down|triggerid_up| @@ -1818,10 +1821,12 @@ ROW |13223 |25367 |13563 |avg |10m | ROW |13224 |25368 |13564 |avg |10m | ROW |13225 |25369 |13565 |avg |10m | -ROW |13226 |25665 |13566 |avg |10m | -ROW |13227 |25666 |13567 |avg |10m | -ROW |13228 |25667 |13568 |avg |10m | -ROW |13229 |25668 |13569 |avg |10m | +ROW |13226 |25370 |13566 |avg |10m | +ROW |13227 |25371 |13567 |avg |10m | +ROW |13228 |25665 |13568 |avg |10m | +ROW |13229 |25666 |13569 |avg |10m | +ROW |13230 |25667 |13570 |avg |10m | +ROW |13231 |25668 |13571 |avg |10m | TABLE |graphs FIELDS|graphid|name |width|height|yaxismin|yaxismax|templateid|show_work_period|show_triggers|graphtype|show_legend|show_3d|percent_left|percent_right|ymin_type|ymax_type|ymin_itemid|ymax_itemid|flags| @@ -2219,10 +2224,22 @@ ROW |1821 |406 |25366 |0 |9 |BBBB00|0 |2 |0 | ROW |1832 |531 |25368 |0 |6 |BBBB00|0 |2 |0 | ROW |1833 |531 |25369 |0 |6 |009999|0 |2 |0 | -ROW |1834 |406 |25665 |0 |10 |990000|0 |2 |0 | -ROW |1835 |406 |25666 |0 |11 |008800|0 |2 |0 | -ROW |1836 |517 |25667 |0 |10 |990000|0 |2 |0 | -ROW |1837 |517 |25668 |0 |11 |008800|0 |2 |0 | +ROW |1834 |406 |25370 |0 |10 |AA0000|0 |2 |0 | +ROW |1835 |517 |23268 |0 |0 |00EE00|0 |2 |0 | +ROW |1836 |517 |23256 |0 |1 |0000EE|0 |2 |0 | +ROW |1837 |517 |23258 |0 |2 |FFAA00|0 |2 |0 | +ROW |1838 |517 |23252 |0 |3 |00EEEE|0 |2 |0 | +ROW |1839 |517 |23253 |0 |4 |990099|0 |2 |0 | +ROW |1840 |517 |23254 |0 |5 |666600|0 |2 |0 | +ROW |1841 |517 |23257 |0 |6 |EE0000|0 |2 |0 | +ROW |1842 |517 |23266 |0 |7 |FF66FF|0 |2 |0 | +ROW |1843 |517 |23664 |0 |8 |009999|0 |2 |0 | +ROW |1844 |517 |25367 |0 |9 |BBBB00|0 |2 |0 | +ROW |1845 |517 |25371 |0 |10 |AA0000|0 |2 |0 | +ROW |1846 |406 |25665 |0 |10 |990000|0 |2 |0 | +ROW |1847 |406 |25666 |0 |11 |008800|0 |2 |0 | +ROW |1848 |517 |25667 |0 |10 |990000|0 |2 |0 | +ROW |1849 |517 |25668 |0 |11 |008800|0 |2 |0 | TABLE |graph_theme FIELDS|graphthemeid|theme |backgroundcolor|graphcolor|gridcolor|maingridcolor|gridbordercolor|textcolor|highlightcolor|leftpercentilecolor|rightpercentilecolor|nonworktimecolor| @@ -3120,10 +3137,12 @@ ROW |5894 |345 |25367 | ROW |5895 |356 |25368 | ROW |5896 |356 |25369 | -ROW |5897 |179 |25665 | -ROW |5898 |179 |25666 | -ROW |5899 |345 |25667 | -ROW |5900 |345 |25668 | +ROW |5897 |179 |25370 | +ROW |5898 |345 |25371 | +ROW |5899 |179 |25665 | +ROW |5900 |179 |25666 | +ROW |5901 |345 |25667 | +ROW |5902 |345 |25668 | TABLE |mappings FIELDS|mappingid|valuemapid|value|newvalue | @@ -3628,5 +3647,6 @@ ROW |124 |23637 |1 |1 |100 | TABLE |sysmap_shape -FIELDS|sysmap_shapeid|sysmapid|type|x |y |width |height |text |font |font_size |font_color |text_halign |text_valign |border_type |border_width |border_color |background_color |zindex -ROW |1 |1 |0 |0 |0 |680 |15 |{MAP.NAME} |9 |11 |000000 |0 |0 |0 |0 |000000 | |0 +FIELDS|sysmap_shapeid|sysmapid|type|x|y|width|height|text |font|font_size|font_color|text_halign|text_valign|border_type|border_width|border_color|background_color|zindex| +ROW |1 |1 |0 |0|0|680 |15 |{MAP.NAME}|9 |11 |000000 |0 |0 |0 |0 |000000 | |0 | + --- /home/sasha/zabbix-svn/trunk/src/libs/zbxdbcache/dbconfig.h 2017-08-01 11:02:24.307713716 +0300 +++ src/libs/zbxdbcache/dbconfig.h 2017-08-02 14:34:48.305443151 +0300 @@ -479,7 +479,6 @@ const char *formula; unsigned char eventsource; unsigned char evaltype; - unsigned char opflags; zbx_vector_ptr_t conditions; } zbx_dc_action_t; @@ -603,7 +602,6 @@ zbx_hashset_t simpleitems; zbx_hashset_t jmxitems; zbx_hashset_t calcitems; - zbx_hashset_t deltaitems; /* history data for delta value calculations */ zbx_hashset_t functions; zbx_hashset_t triggers; zbx_hashset_t trigdeps; --- ../ZBXNEXT-3006-2/src/libs/zbxdbcache/dbconfig.c 2017-08-02 11:33:12.217861980 +0300 +++ src/libs/zbxdbcache/dbconfig.c 2017-08-02 14:52:57.267944957 +0300 @@ -2138,16 +2138,11 @@ ZBX_DC_CALCITEM *calcitem; ZBX_DC_INTERFACE_ITEM *interface_snmpitem; ZBX_DC_ITEM_HK *item_hk, item_hk_local; - ZBX_DC_DELTAITEM *deltaitem; time_t now; unsigned char status, type, value_type; int found, update_index, ret, i, index; zbx_uint64_t itemid, hostid; - zbx_vector_uint64_t ids; - - zbx_vector_uint64_create(&ids); - zbx_vector_uint64_reserve(&ids, config->items.num_data + 32); zabbix_log(LOG_LEVEL_DEBUG, "In %s()", __function_name); @@ -2169,9 +2164,6 @@ if (NULL == (host = zbx_hashset_search(&config->hosts, &hostid))) continue; - /* array of selected items */ - zbx_vector_uint64_append(&ids, itemid); - item = DCfind_id(&config->items, itemid, sizeof(ZBX_DC_ITEM), &found); if (0 != found && ITEM_TYPE_SNMPTRAP == item->type) @@ -2260,13 +2252,6 @@ if (ITEM_STATUS_ACTIVE == status && ITEM_STATUS_ACTIVE != item->status) item->data_expected_from = now; - /* remove deltaitem history if item value type has been changed */ - if (item->value_type != value_type) - { - if (NULL != (deltaitem = zbx_hashset_search(&config->deltaitems, &itemid))) - zbx_hashset_remove_direct(&config->deltaitems, deltaitem); - } - if (ITEM_STATUS_ACTIVE == item->status) dc_host_update_agent_stats(host, item->type, -1); } @@ -2605,8 +2590,6 @@ } } - zbx_vector_uint64_destroy(&ids); - /* remove deleted items from buffer */ for (; SUCCEED == ret; ret = zbx_dbsync_next(sync, &rowid, &row, &tag)) { @@ -2791,6 +2774,7 @@ zbx_vector_ptr_destroy(&item->preproc_ops); zbx_vector_uint64_destroy(&item->dep_itemids); + zbx_hashset_remove_direct(&config->items, item); } @@ -3448,7 +3432,7 @@ char **row; zbx_uint64_t rowid; unsigned char tag; - zbx_uint64_t correlationid; + zbx_uint64_t correlationid; zbx_dc_correlation_t *correlation; int found, ret; @@ -3660,7 +3644,7 @@ char **row; zbx_uint64_t rowid; unsigned char tag; - zbx_uint64_t conditionid, correlationid; + zbx_uint64_t conditionid, correlationid; zbx_dc_corr_condition_t *condition; zbx_dc_correlation_t *correlation; int found, ret, i, index; @@ -3764,7 +3748,7 @@ char **row; zbx_uint64_t rowid; unsigned char tag; - zbx_uint64_t operationid, correlationid; + zbx_uint64_t operationid, correlationid; zbx_dc_corr_operation_t *operation; zbx_dc_correlation_t *correlation; int found, ret, index; @@ -3848,8 +3832,6 @@ char **row; zbx_uint64_t rowid; unsigned char tag; - zbx_uint64_t groupid; - zbx_dc_hostgroup_t *group; int found, ret, index; zabbix_log(LOG_LEVEL_DEBUG, "In %s()", __function_name); @@ -4020,7 +4002,7 @@ char **row; zbx_uint64_t rowid; unsigned char tag; - zbx_uint64_t item_preprocid, itemid, lastitemid = 0; + zbx_uint64_t item_preprocid, itemid, lastitemid = 0; int found, ret, i, index; ZBX_DC_ITEM *item = NULL; zbx_dc_item_preproc_t *preproc; @@ -4701,6 +4683,8 @@ config->ipmiitems.num_data, config->ipmiitems.num_slots); zabbix_log(LOG_LEVEL_DEBUG, "%s() trapitems : %d (%d slots)", __function_name, config->trapitems.num_data, config->trapitems.num_slots); + zabbix_log(LOG_LEVEL_DEBUG, "%s() dependentitems : %d (%d slots)", __function_name, + config->dependentitems.num_data, config->dependentitems.num_slots); zabbix_log(LOG_LEVEL_DEBUG, "%s() logitems : %d (%d slots)", __function_name, config->logitems.num_data, config->logitems.num_slots); zabbix_log(LOG_LEVEL_DEBUG, "%s() dbitems : %d (%d slots)", __function_name,