Skip to content

Commit

Permalink
.......PS. [ZBX-12852] fixed redundant query of vmware hv sensors inf…
Browse files Browse the repository at this point in the history
…o (MVekslers)
  • Loading branch information
CHERTS committed Feb 21, 2022
1 parent 2d68b9a commit 6605586
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions PATCHLIST.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
13 changes: 7 additions & 6 deletions src/zabbix_server/vmware/vmware.c
Original file line number Diff line number Diff line change
Expand Up @@ -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']"
Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -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, "<ns0:pathSet>", sizeof(props));
zbx_strlcat(props, propmap[i].name, sizeof(props));
zbx_strlcat(props, "</ns0:pathSet>", sizeof(props));
Expand Down

0 comments on commit 6605586

Please sign in to comment.