User Interface¶
Methods for interacting with various User Interface components of OpsCenter.
OpsCenter User Interface Methods | URL |
---|---|
Get all of the Dashboard Presets | GET /{cluster_id}/rc/dashboard_presets/ |
Get the default Dashboard Preset | GET /{cluster_id}/rc/dashboard_presets/default |
Get a specific Dashboard Preset | GET /{cluster_id}/rc/dashboard_presets/{preset_id} |
Set a preset as a default Dashboard Preset | PUT /{cluster_id}/rc/dashboard_presets/default |
Create or update a Dashboard Preset | PUT /{cluster_id}/rc/dashboard_presets/{preset_id} |
Delete a Dashboard Preset | DELETE {cluster_id}/rc/dashboard_presets/{preset_id} |
- GET /{cluster_id}/rc/dashboard_presets/¶
Displays a list of all of the dashboard presets.
Path arguments: 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 arguments: 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, }
- cluster_id – The ID of a cluster returned from
- 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
.Body: - preset_id: The ID of the preset (See
GET /{cluster_id}/rc/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"'
- preset_id: The ID of the preset (See
- 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
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"}'
- cluster_id – The ID of a cluster returned from
- 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
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
- cluster_id – The ID of a cluster returned from