Source
xxxxxxxxxx
if (NULL == (xpathObj = xmlXPathEvalExpression((const xmlChar *)"//*[" ZBX_XNN("canonicalName") "]", xpathCtx)))
/*
** Copyright (C) 2001-2025 Zabbix SIA
**
** This program is free software: you can redistribute it and/or modify it under the terms of
** the GNU Affero General Public License as published by the Free Software Foundation, version 3.
**
** 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 Affero General Public License for more details.
**
** You should have received a copy of the GNU Affero General Public License along with this program.
** If not, see <https://www.gnu.org/licenses/>.
**/
/*[local-name()='HostNumericSensorInfo']" \
"[*[local-name()='name'][text()='" sensor "']]" \
"/*[local-name()='healthState']/*[local-name()='key']"
static zbx_vmware_propmap_t hv_propmap[] = {
ZBX_HVPROPMAP("summary.quickStats.overallCpuUsage"), /* ZBX_VMWARE_HVPROP_OVERALL_CPU_USAGE */
ZBX_HVPROPMAP("summary.config.product.fullName"), /* ZBX_VMWARE_HVPROP_FULL_NAME */
ZBX_HVPROPMAP("summary.hardware.numCpuCores"), /* ZBX_VMWARE_HVPROP_HW_NUM_CPU_CORES */
ZBX_HVPROPMAP("summary.hardware.cpuMhz"), /* ZBX_VMWARE_HVPROP_HW_CPU_MHZ */
ZBX_HVPROPMAP("summary.hardware.cpuModel"), /* ZBX_VMWARE_HVPROP_HW_CPU_MODEL */
ZBX_HVPROPMAP("summary.hardware.numCpuThreads"), /* ZBX_VMWARE_HVPROP_HW_NUM_CPU_THREADS */
ZBX_HVPROPMAP("summary.hardware.memorySize"), /* ZBX_VMWARE_HVPROP_HW_MEMORY_SIZE */
ZBX_HVPROPMAP("summary.hardware.model"), /* ZBX_VMWARE_HVPROP_HW_MODEL */
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 */
{NULL, ZBX_XPATH_HV_SENSOR_STATUS("runtime.healthSystemRuntime.systemHealthInfo.numericSensorInfo",
"VMware Rollup Health State"), NULL, 0},/* 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 */
ZBX_HVPROPMAP("overallStatus"), /* ZBX_VMWARE_HVPROP_STATUS */
ZBX_HVPROPMAP("runtime.inMaintenanceMode"), /* ZBX_VMWARE_HVPROP_MAINTENANCE */
ZBX_HVPROPMAP_EXT("summary.runtime.healthSystemRuntime.systemHealthInfo.numericSensorInfo",
zbx_xmlnode_to_json, 0), /* ZBX_VMWARE_HVPROP_SENSOR */
{"config.network.dnsConfig", "concat(" /* ZBX_VMWARE_HVPROP_NET_NAME */
ZBX_XPATH_PROP_NAME("config.network.dnsConfig") "/*[local-name()='hostName']" ",'.',"
ZBX_XPATH_PROP_NAME("config.network.dnsConfig") "/*[local-name()='domainName'])", NULL, 0},
ZBX_HVPROPMAP("parent"), /* ZBX_VMWARE_HVPROP_PARENT */
ZBX_HVPROPMAP("runtime.connectionState"), /* ZBX_VMWARE_HVPROP_CONNECTIONSTATE */
ZBX_HVPROPMAP_EXT("hardware.systemInfo.serialNumber", NULL, 67),/* ZBX_VMWARE_HVPROP_HW_SERIALNUMBER */
ZBX_HVPROPMAP_EXT("runtime.healthSystemRuntime.hardwareStatusInfo",
zbx_xmlnode_to_json, 0) /* ZBX_VMWARE_HVPROP_HW_SENSOR */
};
/*/*/*/*/*[local-name()='objects'][" \
"*[local-name()='obj'][@type='Folder'] and " \
"*[local-name()='propSet'][*[local-name()='name'][text()='childEntity']]" \
"/*[local-name()='val']/*[local-name()='ManagedObjectReference']=" parent_id " and " \
"*[local-name()='propSet'][*[local-name()='name'][text()='parent']]" \
"/*[local-name()='val'][@type!='Datacenter']" \
"]/*[local-name()='propSet'][*[local-name()='name'][text()='name']]/*[local-name()='val']"
/* hypervisor hashset support */
zbx_hash_t vmware_hv_hash(const void *data)
{
const zbx_vmware_hv_t *hv = (const zbx_vmware_hv_t *)data;