Data - Retrieve Monitors For Objects
检索与特定对象关联的监视器及其属性的列表。
POST http://<Servername>/OperationsManager/data/object/monitors
请求正文
Media Types: "application/json", "text/json", "application/xml", "text/xml", "application/x-www-form-urlencoded"
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string |
Monitor 对象 ID |
| showUnhealthyMonitorsOnly |
boolean |
仅显示运行状况不佳的监视器 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
还行。已成功检索与特定对象关联的监视器及其属性的列表 Media Types: "application/json", "text/json", "application/xml", "text/xml" |
示例
RetrieveMonitorsForObjects
示例请求
POST http://<Servername>/OperationsManager/data/object/monitors
{
"id": "3c8ac4f3-475e-44dd-4163-8a97af363705",
"showUnhealthyMonitorsOnly": true
}
示例响应
{
"tableColumns": [
{
"field": "state",
"header": "State",
"type": null,
"hidden": false
},
{
"field": "id",
"header": "Id",
"type": null,
"hidden": true
},
{
"field": "targetid",
"header": "Target Id",
"type": null,
"hidden": true
},
{
"field": "displayname",
"header": "Display Name",
"type": null,
"hidden": false
},
{
"field": "targetname",
"header": "Target",
"type": null,
"hidden": false
},
{
"field": "category",
"header": "Category",
"type": null,
"hidden": false
},
{
"field": "type",
"header": "Type",
"type": null,
"hidden": false
},
{
"field": "laststatechange",
"header": "Last State Change",
"type": null,
"hidden": false
}
],
"rows": [
{
"id": "ffee43e2-9221-1df8-3259-8835a93b42e8",
"targetid": "ac5cddfc-a96a-ee99-745d-ec74845f53f6",
"displayname": "Entity Health",
"state": "/OperationsManager/images/instance/state/ErrorDisabled.png",
"category": "AvailabilityHealth",
"targetname": "Object",
"type": "Aggregate",
"laststatechange": "2022-05-16T20:40:27.933"
},
{
"id": "040e606c-6330-7245-f49d-a2e70a78177e",
"targetid": "ac5cddfc-a96a-ee99-745d-ec74845f53f6",
"displayname": "Availability",
"state": "/OperationsManager/images/instance/state/ErrorDisabled.png",
"category": "AvailabilityHealth",
"targetname": "Object",
"type": "Aggregate",
"laststatechange": "2022-05-16T20:40:27.933"
},
{
"id": "d08269f6-cb82-f2de-cf53-161993a3f841",
"targetid": "ee7ec974-c9f0-1818-e5be-1fb41eb4f2ae",
"displayname": "Computer Availability Health Rollup",
"state": "/OperationsManager/images/instance/state/ErrorDisabled.png",
"category": "AvailabilityHealth",
"targetname": "Computer Group",
"type": "Dependency",
"laststatechange": "2022-05-16T20:40:27.933"
}
]
}
定义
| 名称 | 说明 |
|---|---|
|
Monitor |
|
|
Table |
|
|
Table |
MonitorObjectDataRequest
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string |
Monitor 对象 ID |
| showUnhealthyMonitorsOnly |
boolean |
仅显示运行状况不佳的监视器 |
TableColumn
| 名称 | 类型 | 说明 |
|---|---|---|
| field |
string |
列的名称 |
| header |
string |
列的标题 |
| hidden |
boolean |
列是否隐藏 |
| type |
string |
列的类型 |
TableDataResponse
| 名称 | 类型 | 说明 |
|---|---|---|
| rows |
object[] |
表 数据行 |
| tableColumns |
数据表列 data |