User interface
Methods for interacting with various user interface components of OpsCenter.
GET /CLUSTER_ID/rc/dashboard_presets/
Get a list of all of the dashboard presets.
Path argument:
CLUSTER_ID: The ID of a cluster returned from GET /cluster-configs.
Example:
curl http://127.0.0.1:8888/Test_Cluster/rc/dashboard_presets/ \
--user {username}:{password}
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
Get the attributes of the default dashboard preset.
Path argument:
-
CLUSTER_ID: The ID of a cluster returned from
GET /cluster-configs.
Example:
curl http://127.0.0.1:8888/Test_Cluster/rc/dashboard_presets/default \
--user {username}:{password}
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
Get 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 http://127.0.0.1:8888/Test_Cluster/rc/dashboard_presets/9030d196-af55-4b00-8815-1525aa4e830a \
--user {username}:{password}
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 /CLUSTER_ID/rc/dashboard_presets/).
No Output
Example:
curl -X PUT http://127.0.0.1:8888/Test_Cluster/rc/dashboard_presets/default \
--user {username}:{password} \
-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
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 -X PUT http://127.0.0.1:8888/Test_Cluster/rc/dashboard_presets/9030d196-af55-4b00-8815-1525aa4e830a \
--user {username}:{password} \
-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
GET /CLUSTER_ID/rc/dashboard_presets/).
No Output
Example:
curl -X DELETE http://127.0.0.1:8888/Test_Cluster/rc/dashboard_presets/9030d196-af55-4b00-8815-1525aa4e830a \
--user {username}:{password}