diff --git a/ChangeLog b/ChangeLog index fd167284..94c60354 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ New features: ........S. [ZBXNEXT-3140] added {ITEM.STATE.ERROR},{LLDRULE.STATE.ERROR},{TRIGGER.STATE.ERROR} macros to indicate error messages in internal monitoring alerts (arimdjonoks) Bug fixes: +.......PS. [ZBX-12852] fixed redundant query of vmware hv sensors info (MVekslers) ........S. [ZBX-19012] fixed {HOST.NAME} macros substitution (ssimonenko) .......PS. [ZBX-19038] fixed lld manager not to process lld rules on same host in parallel to avoid duplicated item keys being discovered; fixed crash when duplicated item key on same host exists (vso) A......... [ZBX-19558] fixed creating of dependent item prototypes (Sasha) diff --git a/PATCHLIST.md b/PATCHLIST.md index 270c9b83..ea326239 100644 --- a/PATCHLIST.md +++ b/PATCHLIST.md @@ -7,6 +7,7 @@ [ZBX-8081] fixed 'cmdline' parameter truncation on Solaris 11.3 and later (https://support.zabbix.com/browse/ZBX-8081) [ZBX-8999] fixed exporting of images separately from other objects (https://support.zabbix.com/browse/ZBX-8999) [ZBX-11764] fixed automake scripts; thanks to Tomasz Kłoczko for the patch (https://support.zabbix.com/browse/ZBX-11764) +[ZBX-12852] fixed redundant query of vmware hv sensors info (https://support.zabbix.com/browse/ZBX-12852) [ZBX-12867] reworked problem event popup of problems widget to load data only on mouse hover and click (https://support.zabbix.com/browse/ZBX-12867) [ZBX-13383] improved performance of the trigger and trigger prototype inheritance (https://support.zabbix.com/browse/ZBX-13383) [ZBX-13789] improved performance of "Problems" widget with MySQL backend by removing DISTINCT modifier from SQL statements with tables joined by primary keys (https://support.zabbix.com/browse/ZBX-13789) diff --git a/src/zabbix_server/vmware/vmware.c b/src/zabbix_server/vmware/vmware.c index a68e0f3e..0b10d4d1 100644 --- a/src/zabbix_server/vmware/vmware.c +++ b/src/zabbix_server/vmware/vmware.c @@ -271,10 +271,8 @@ static zbx_uint64_t evt_req_chunk_size; "/*/*/*/*/*/*[local-name()='propSet'][*[local-name()='name'][text()='config.instanceUuid']]" \ "/*[local-name()='val']" -#define ZBX_XPATH_HV_SENSOR_STATUS(sensor) \ - "/*/*/*/*/*/*[local-name()='propSet'][*[local-name()='name']" \ - "[text()='runtime.healthSystemRuntime.systemHealthInfo']]" \ - "/*[local-name()='val']/*[local-name()='numericSensorInfo']" \ +#define ZBX_XPATH_HV_SENSOR_STATUS(node, sensor) \ + ZBX_XPATH_PROP_NAME(node) "/*[local-name()='HostNumericSensorInfo']" \ "[*[local-name()='name'][text()='" sensor "']]" \ "/*[local-name()='healthState']/*[local-name()='key']" @@ -363,8 +361,8 @@ static zbx_vmware_propmap_t hv_propmap[] = { ZBX_HVPROPMAP("summary.hardware.uuid"), /* ZBX_VMWARE_HVPROP_HW_UUID */ ZBX_HVPROPMAP("summary.hardware.vendor"), /* ZBX_VMWARE_HVPROP_HW_VENDOR */ ZBX_HVPROPMAP("summary.quickStats.overallMemoryUsage"), /* ZBX_VMWARE_HVPROP_MEMORY_USED */ - {"runtime.healthSystemRuntime.systemHealthInfo", /* ZBX_VMWARE_HVPROP_HEALTH_STATE */ - ZBX_XPATH_HV_SENSOR_STATUS("VMware Rollup Health State"), NULL}, + {NULL, ZBX_XPATH_HV_SENSOR_STATUS("runtime.healthSystemRuntime.systemHealthInfo.numericSensorInfo", + "VMware Rollup Health State"), NULL}, /* ZBX_VMWARE_HVPROP_HEALTH_STATE */ ZBX_HVPROPMAP("summary.quickStats.uptime"), /* ZBX_VMWARE_HVPROP_UPTIME */ ZBX_HVPROPMAP("summary.config.product.version"), /* ZBX_VMWARE_HVPROP_VERSION */ ZBX_HVPROPMAP("summary.config.name"), /* ZBX_VMWARE_HVPROP_NAME */ @@ -3151,6 +3149,9 @@ static int vmware_service_get_hv_data(const zbx_vmware_service_t *service, CURL for (i = 0; i < props_num; i++) { + if (NULL == propmap[i].name) + continue; + zbx_strlcat(props, "", sizeof(props)); zbx_strlcat(props, propmap[i].name, sizeof(props)); zbx_strlcat(props, "", sizeof(props));