这是原厂英文文档的翻译页面. 欢迎帮助我们 完善文档.

3 VMware监控项的JSON示例

概览

本节提供了有关各种VMware items.返回的JSON对象的附加信息。

vmware.*.alarms.get

以下这些监控项 vmware.alarms.get[], vmware.cluster.alarms.get[], vmware.datastore.alarms.get[], vmware.dc.alarms.get[], vmware.hv.alarms.get[], vmware.vm.alarms.get[] 都以如下格式返回其JSON对象(具体的数据可参考示例):

{
           "alarms": [ 
               { 
                   "name": "Host connection and power state", 
                   "system_name": "alarm.HostConnectionStateAlarm", 
                   "description": "Default alarm to monitor host connection and power state", 
                   "enabled": true, 
                   "key": "alarm-1.host-2013", 
                   "time": "2022-06-27T05:27:38.759976Z", 
                   "overall_status": "red", 
                   "acknowledged": false 
               }, 
               { 
                   "name": "Host memory usage", 
                   "system_name": "alarm.HostMemoryUsageAlarm", 
                   "description": "Default alarm to monitor host memory usage", 
                   "enabled": true, 
                   "key": "alarm-4.host-1004", 
                   "time": "2022-05-16T13:32:42.47863Z", 
                   "overall_status": "yellow", 
                   "acknowledged": false 
               }, 
               { 
                   // other alarms 
               } 
           ]
       } 

vmware.*.tags.get

以下这些监控项vmware.cluster.tags.get[], vmware.datastore.tags.get[], vmware.dc.tags.get[], vmware.hv.tags.get[], vmware.vm.tags.get[] 都以如下格式返回其JSON对象(具体的数据可参考示例):

{
           "tags": [ 
               { 
                   "name": "Windows", 
                   "description": "tag for cat OS type", 
                   "category": "OS type" 
               }, 
               { 
                   "name": "SQL Server", 
                   "description": "tag for cat application name", 
                   "category": "application name" 
               }, 
               { 
                   // other tags 
               } 
           ] 
       }

vmware.hv.diskinfo.get

监控项vmware.hv.diskinfo.get[] 都以如下格式返回其JSON对象(具体的数据可参考示例):

[
         {
           "instance": "mpx.vmhba32:C0:T0:L0",
           "hv_uuid": "8002299e-d7b9-8728-d224-76004bbb6100",
           "datastore_uuid": "",
           "operational_state": [
             "ok"
           ],
           "lun_type": "disk",
           "queue_depth": 1,
           "model": "USB DISK",
           "vendor": "SMI Corp",
           "revision": "1100",
           "serial_number": "CCYYMMDDHHmmSS9S62CK",
           "vsan": {}
         },
         {
           // other instances
         }
       ]

vmware.dvswitch.fetchports.get

监控项 vmware.dvswitch.fetchports.get[] 都以如下格式返回其JSON对象(具体的数据可参考示例):

{ 
           "FetchDVPortsResponse": 
           { 
               "returnval": [ 
                   { 
                       "key": "0", 
                       "dvsUuid": "50 36 6a 24 25 c0 10 9e-05 4a f6 ea 4e 3d 09 88", 
                       "portgroupKey": "dvportgroup-2023", 
                       "proxyHost": 
                       { 
                           "@type": "HostSystem", 
                           "#text": "host-2021" 
                       }, 
                       "connectee": 
                       { 
                           "connectedEntity": 
                           { 
                               "@type": "HostSystem", 
                               "#text": "host-2021" 
                           }, 
                           "nicKey": "vmnic0", 
                           "type": "pnic" 
                       }, 
                       "conflict": "false", 
                       "state": 
                       { 
                           "runtimeInfo": 
                           { 
                               "linkUp": "true", 
                               "blocked": "false", 
                               "vlanIds": 
                               { 
                                   "start": "0", 
                                   "end": "4094" 
                               }, 
                               "trunkingMode": "true", 
                               "linkPeer": "vmnic0", 
                               "macAddress": "00:00:00:00:00:00", 
                               "statusDetail": null, 
                               "vmDirectPathGen2Active": "false", 
                               "vmDirectPathGen2InactiveReasonOther": "portNptIncompatibleConnectee" 
                           }, 
                           "stats": 
                           { 
                               "packetsInMulticast": "2385470", 
                               "packetsOutMulticast": "45", 
                               "bytesInMulticast": "309250248", 
                               "bytesOutMulticast": "5890", 
                               "packetsInUnicast": "155601537", 
                               "packetsOutUnicast": "113008658", 
                               "bytesInUnicast": "121609489384", 
                               "bytesOutUnicast": "47240279759", 
                               "packetsInBroadcast": "1040420", 
                               "packetsOutBroadcast": "7051",
                               "bytesInBroadcast": "77339771", 
                               "bytesOutBroadcast": "430392", 
                               "packetsInDropped": "0", 
                               "packetsOutDropped": "0", 
                               "packetsInException": "0", 
                               "packetsOutException": "0" 
                           } 
                       }, 
                       "connectionCookie": "1702765133", 
                       "lastStatusChange": "2022-03-25T14:01:11Z", 
                       "hostLocalPort": "false" 
                   }, 
                   { 
                       //other keys
                   } 
               ] 
           } 
       }

vmware.hv.hw.sensors.get

监控项vmware.hv.hw.sensors.get[] 都以如下格式返回其JSON对象(具体的数据可参考示例):

{
           "val": 
               { 
                   "@type": "HostHardwareStatusInfo", 
                   "storageStatusInfo": [ 
                       { 
                           "name": "Intel Corporation HD Graphics 630 #2", 
                           "status": 
                               { 
                                   "label": "Unknown", 
                                   "summary": "Cannot report on the current status of the physical element",
                                   "key": "Unknown" 
                               } 
                       }, 
                       { 
                           "name": "Intel Corporation 200 Series/Z370 Chipset Family USB 3.0 xHCI Controller #20",
                           "status": 
                               { 
                                   "label": "Unknown", 
                                   "summary": "Cannot report on the current status of the physical element", 
                                   "key": "Unknown" 
                               } 
                       }, 
                       { 
                           // other hv hw sensors 
                       } 
                   ] 
               }
       } 

vmware.hv.sensors.get

监控项vmware.hv.sensors.get[] 都以如下格式返回其JSON对象(具体的数据可参考示例):

{ 
           "val": 
               { 
                   "@type": "ArrayOfHostNumericSensorInfo", "HostNumericSensorInfo": [ 
                       { 
                           "@type": "HostNumericSensorInfo", 
                           "name": "System Board 1 PwrMeter Output --- Normal", 
                           "healthState": 
                               { 
                                   "label": "Green", 
                                   "summary": "Sensor is operating under normal conditions", 
                                   "key": "green" 
                               }, 
                           "currentReading": "10500", 
                           "unitModifier": "-2", 
                           "baseUnits": "Watts", 
                           "sensorType": "other" 
                       }, 
                       { 
                           "@type": "HostNumericSensorInfo", 
                           "name": "Power Supply 1 PS 1 Output --- Normal", 
                           "healthState":
                               { 
                                   "label": "Green", 
                                   "summary": "Sensor is operating under normal conditions", 
                                   "key": "green" 
                               }, 
                           "currentReading": "10000", 
                           "unitModifier": "-2", 
                           "baseUnits": "Watts", 
                           "sensorType": "power" 
                       }, 
                       { 
                           // other hv sensors 
                       } 
                   ] 
               } 
       } 

vmware.vm.snapshot.get

如果有任何的快照存在,则监控项vmware.snapshot.get[] 以如下格式返回其JSON对象(具体的数据可参考示例):

{
         "snapshot": [
           {
             "name": "VM Snapshot 4%2f1%2f2022, 9:16:39 AM",
             "description": "Descr 1",
             "createtime": "2022-04-01T06:16:51.761Z",
             "size": 5755795171,
             "uniquesize": 5755795171
           },
           {
             "name": "VM Snapshot 4%2f1%2f2022, 9:18:21 AM",
             "description": "Descr 2",
             "createtime": "2022-04-01T06:18:29.164999Z",
             "size": 118650595,
             "uniquesize": 118650595
           },
           {
             "name": "VM Snapshot 4%2f1%2f2022, 9:37:29 AM",
             "description": "Descr 3",
             "createtime": "2022-04-01T06:37:53.534999Z",
             "size": 62935016,
             "uniquesize": 62935016
           }
         ],
         "count": 3,
         "latestdate": "2022-04-01T06:37:53.534999Z",
         "latestage": 22729203,
         "oldestdate": "2022-04-01T06:16:51.761Z",
         "oldestage": 22730465,
         "size": 5937380782,
         "uniquesize": 5937380782
       }

如果没有任何快照存在,则监控项vmware.snapshot.get[] 返回其JSON对象但不包含任何参数:

{
         "snapshot": [],
         "count": 0,
         "latestdate": null,
         "latestage": 0,
         "oldestdate": null,
         "oldestage": 0,
         "size": 0,
         "uniquesize": 0
       }