Dela via


Monitoring - Add Widget to Dashboard

Lägger till en widget på en befintlig instrumentpanel

POST http://<Servername>/OperationsManager/monitoring/dashboard/{dashboardId}/widget

URI-parametrar

Name I Obligatorisk Typ Description
dashboardId
path True

string

Ange instrumentpanelens ID.

Begärandetext

Media Types: "application/json", "text/json", "application/xml", "text/xml", "application/x-www-form-urlencoded"

Name Obligatorisk Typ Description
name True

string

Namnet på komponenten

componentType

string

Komponenttyp

config

string

Komponentkonfiguration

description

string

Beskrivning av komponent

mpDescription

string

MP-beskrivning

mpId

string

Mp-ID

mpName

string

MP-namn

mpVersion

string

MP-version

path

string

Sökväg

Svar

Name Typ Description
200 OK

ComponentResponse

Okej. Widgeten har lagts till på instrumentpanelen.

Media Types: "application/json", "text/json", "application/xml", "text/xml"

Exempel

Monitoring_AddWidget

Sample Request

POST http://<Servername>/OperationsManager/monitoring/dashboard/b0ba870b-6d74-2f8f-2e36-99674ae53265/widget

{
  "mpId": "3d9a3d4f-f4f6-6027-6067-844af086fe3d",
  "path": "Monitoring",
  "name": "windows state",
  "description": "test",
  "config": "{\"widgetDisplay\":{\"col\":1,\"row\":2,\"sizex\":6,\"sizey\":4,\"columns\":[\"healthstate\",\"displayname\",\"path\",\"maintenancemode\"]},\"widgetParameters\":{\"scope\":{\"scopeSelection\":[],\"classSelection\":[{\"id\":\"6f7e3306-beeb-2996-3795-7c1eafb925b8\",\"displayName\":\"All Windows Computers\",\"className\":\"Microsoft.SystemCenter.Library!Microsoft.SystemCenter.AllComputersGroup\",\"path\":null,\"fullName\":null,\"objectType\":-2}]},\"criteria\":{\"healthStates\":[\"2\",\"0\",\"1\",\"3\"],\"inMaintenanceMode\":\"All\"}},\"widgetRefreshInterval\":5}",
  "componentType": "HtmlStateWidget"
}

Sample Response

{
  "id": "7f91358b-4155-a753-2a4b-7f97f287ab8f",
  "name": "windows state",
  "description": null,
  "mpId": "3d9a3d4f-f4f6-6027-6067-844af086fe3d",
  "componentType": "HtmlStateWidget",
  "config": "{\"widgetDisplay\":{\"col\":1,\"row\":2,\"sizex\":6,\"sizey\":4,\"columns\":[\"healthstate\",\"displayname\",\"path\",\"maintenancemode\"]},\"widgetParameters\":{\"scope\":{\"scopeSelection\":[],\"classSelection\":[{\"id\":\"6f7e3306-beeb-2996-3795-7c1eafb925b8\",\"displayName\":\"All Windows Computers\",\"className\":\"Microsoft.SystemCenter.Library!Microsoft.SystemCenter.AllComputersGroup\",\"path\":null,\"fullName\":null,\"objectType\":-2}]},\"criteria\":{\"healthStates\":[\"2\",\"0\",\"1\",\"3\"],\"inMaintenanceMode\":\"All\"}},\"widgetRefreshInterval\":5}"
}

Definitioner

Name Description
ComponentResponse
MonitoringComponentRequest

ComponentResponse

Name Typ Description
componentType

string

Komponenttyp

config

string

konfiguration

description

string

Komponentbeskrivning

id

string

ID

mpId

string

Komponentens MP-ID

name

string

Komponentnamn

MonitoringComponentRequest

Name Typ Description
componentType

string

Komponenttyp

config

string

Komponentkonfiguration

description

string

Beskrivning av komponent

mpDescription

string

MP-beskrivning

mpId

string

Mp-ID

mpName

string

MP-namn

mpVersion

string

MP-version

name

string

Namnet på komponenten

path

string

Sökväg