User Interface
Methods for interacting with various User Interface components of OpsCenter.
OpsCenter User Interface Methods | URL |
---|---|
Get all of the Dashboard Presets |
|
Get the default Dashboard Preset |
|
Get a specific Dashboard Preset |
|
Set a preset as a default Dashboard Preset |
|
Create or update a Dashboard Preset |
|
Delete a Dashboard Preset |
GET /{cluster_id}/rc/dashboard_presets/
Displays a list of all of the dashboard presets.
Path argument:
cluster_id: The ID of a cluster returned from GET /cluster-configs.
Example:
curl --user {username}:{password} http://127.0.0.1:8888/Test_Cluster/rc/dashboard_presets/
Output:
{
"9030d196-af55-4b00-8815-1525aa4e830a": {
"id": "9030d196-af55-4b00-8815-1525aa4e830a",
"name": "MyPreset",
"preset_data": [
{
"data": [
{
"colfam": [],
"ip": [
"__all__"
],
"metric": "heap-max"
}
],
"type": "metrics"
}
],
"shared": false
},
"afb9f6ad-7e55-40a1-869f-afdeac7cd806": {
"id": "afb9f6ad-7e55-40a1-869f-afdeac7cd806",
"name": "default",
"preset_data": [
{
"type": "alerts"
},
{
"type": "clusterhealth"
},
{
"type": "storage"
},
{
"data": [
{
"colfam": null,
"ip": "__cluster__",
"metric": "write-ops"
}
],
"type": "metrics"
},
{
"data": [
{
"colfam": null,
"ip": "__cluster__",
"metric": "write-latency-op"
}
],
"type": "metrics"
},
{
"data": [
{
"colfam": null,
"ip": "__cluster__",
"metric": "os-disk-throughput"
}
],
"type": "metrics"
},
{
"data": [
{
"colfam": null,
"ip": "__cluster__",
"metric": "os-load"
}
],
"type": "metrics"
},
{
"data": [
{
"colfam": [],
"ip": [
"__all__"
],
"metric": "heap-max"
}
],
"type": "metrics"
}
],
"shared": false
}
}
GET /{cluster_id}/rc/dashboard_presets/default
Displays the attributes of the default dashboard preset.
Path argument:
-
cluster_id: The ID of a cluster returned from GET /cluster-configs.
Example:
curl --user {username}:{password} http://127.0.0.1:8888/Test_Cluster/rc/dashboard_presets/default
Output:
{
"afb9f6ad-7e55-40a1-869f-afdeac7cd806": {
"id": "afb9f6ad-7e55-40a1-869f-afdeac7cd806",
"name": "default",
"preset_data": [
{
"type": "alerts"
},
{
"type": "clusterhealth"
},
{
"type": "storage"
},
{
"data": [
{
"colfam": null,
"ip": "__cluster__",
"metric": "write-ops"
}
],
"type": "metrics"
},
{
"data": [
{
"colfam": null,
"ip": "__cluster__",
"metric": "write-latency-op"
}
],
"type": "metrics"
},
{
"data": [
{
"colfam": null,
"ip": "__cluster__",
"metric": "os-disk-throughput"
}
],
"type": "metrics"
},
{
"data": [
{
"colfam": null,
"ip": "__cluster__",
"metric": "os-load"
}
],
"type": "metrics"
},
{
"data": [
{
"colfam": [],
"ip": [
"__all__"
],
"metric": "heap-max"
}
],
"type": "metrics"
}
],
"shared": false
}
}
GET /{cluster_id}/rc/dashboard_presets/{preset_id}
Displays the attributes of a specific dashboard preset.
Path arguments:
-
cluster_id: The ID of a cluster returned from GET /cluster-configs.
-
preset_id: The ID returned for the preset (See GET /{cluster_id}/rc/dashboard_presets/).
Example:
curl --user {username}:{password} http://127.0.0.1:8888/Test_Cluster/rc/dashboard_presets/9030d196-af55-4b00-8815-1525aa4e830a
Output:
{
"id": "9030d196-af55-4b00-8815-1525aa4e830a",
"name": "MyPreset",
"preset_data": [
{
"data": [
{
"colfam": [],
"ip": [
"__all__",
],
"metric": "heap-max"
},
],
"type": "metrics"
},
],
"shared": true,
}
PUT /{cluster_id}/rc/dashboard_presets/default
Save a specific preset as the default dashboard preset.
Path arguments:
-
cluster_id: The ID of a cluster returned from GET /cluster-configs.
-
preset_id: The ID of the preset (See
get-all-dashboard-presets
).
No Output
Example:
curl --user {username}:{password} -X PUT http://127.0.0.1:8888/Test_Cluster/rc/dashboard_presets/default -d '"9030d196-af55-4b00-8815-1525aa4e830a"'
PUT /{cluster_id}/rc/dashboard_presets/{preset_id}
Create or update a dashboard preset.
Path arguments:
-
cluster_id: The ID of a cluster returned from GET /cluster-configs.
-
preset_id: The ID of the preset (See (See GET /{cluster_id}/rc/dashboard_presets/). When creating a preset you must generate a unique ID.
-
body:
-
shared: Boolean on whether this is a shared preset.
-
name: The name of the preset.
-
No Output
Example:
curl --user {username}:{password} -X PUT http://127.0.0.1:8888/Test_Cluster/rc/dashboard_presets/9030d196-af55-4b00-8815-1525aa4e830a -d '{"shared":false,"preset_data":[{"type":"metrics","data":[{"metric":"heap-max","ip":["__all__"],"colfam":[]}]},{"type":"storage"}],"name":"MyPreset"}'
DELETE /{cluster_id}/rc/dashboard_presets/{preset_id}
Delete a dashboard preset
Path arguments:
-
cluster_id: The ID of a cluster returned from GET /cluster-configs.
-
preset_id: The ID returned for the preset (See //xref:api:ui.adoc#method-get-all-dashboard-presets). GET /{cluster_id}/rc/dashboard_presets/).
No Output
Example:
curl --user {username}:{password} -X DELETE http://127.0.0.1:8888/Test_Cluster/rc/dashboard_presets/9030d196-af55-4b00-8815-1525aa4e830a