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 /{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 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:

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:

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:

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

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com