These resources give you information about your Cassandra or DSE cluster and its nodes. For example, you can get a map of node information including the current OS load, the data held in storage, or the status of streaming or compaction operations underway.
| Cluster and Node Retrieval Methods | URL |
|---|---|
| Retrieve cluster configuration information. | GET /{cluster_id}/cluster |
| Retrieve information about a cluster property. | GET /{cluster_id}/cluster/{property} |
| Retrieve information about nodes in the cluster. | GET /{cluster_id}/nodes |
| Retrieve information about a specific node. | GET /{cluster_id}/nodes/{node_ip} |
| Retrieve information about the property of a node. | GET /{cluster_id}/nodes/{node_ip}/{property} |
| Retrieve cluster-wide storage capacity information. | GET /{cluster_id}/storage-capacity |
Retrieve information about the cluster.
| Path arguments: | cluster_id -- A key, which identifies the node's cluster, in the dictionary returned by GET /cluster-configs. |
|---|
Returns a Cluster object.
{
"endpoint_snitch": Full class name of snitch,
"name": Name of the cluster,
"partitioner": Full class name of partitioner
}
Example:
curl
http://127.0.0.1:8888/Test_Cluster/cluster
-X GET
Output:
{
"endpoint_snitch": "org.apache.cassandra.locator.SimpleSnitch",
"name": "Test Cluster",
"partitioner": "org.apache.cassandra.dht.RandomPartitioner"
}
Retrieve a single cluster property.
| Path arguments: |
|
|---|
Returns a string.
Example:
curl
http://127.0.0.1:8888/Test_Cluster/cluster/partitioner
-X GET
Output:
"org.apache.cassandra.dht.RandomPartitioner"
Retrieve a list of all nodes and node properties in the cluster.
| Path arguments: | cluster_id -- A key, which identifies the node's cluster, in the dictionary returned by GET /cluster-configs. |
|---|
Returns a list of Node objects.
A property is null if it is not applicable to the node or if there is no data to report.
{
"node_ip": <value>,
"node_name": <value>,
"token": <value>,
"node_version": <value> or <name:value>,
"load": <value>,
"data_held": <value>,
"mode": <value>,
"streaming": <name:value, name:value, . . .>,
"task_progress": <name:value, name:value, . . .>,
"last_seen": <value>,
"num_procs": <value>,
"rpc_ip": <value>,
"dc": <value>,
"rack": <value>,
"network_interfaces": <value array>,
"partitions": {
"data": <value list>,
"commitlog": <value>,
"saved_caches": <value>,
"other": <value list>
},
"devices": {
"data": <value list>,
"commitlog": <value>,
"saved_caches": <value>,
"other": <value list>
},
"os": <value>
}
This table describes the property values of a Node:
| Property | Description of Values |
|---|---|
| node_ip | IP address |
| node_name | Hostname |
| token | Token assignment (string) |
| node_version | Version of Cassandra (a string) or DataStax Enterprise (dictionary of {<component>:version string}) |
| load | OS load, which corresponds to the command, 1min avg from uptime |
| data_held | Amount of Cassandra data on the node (bytes), |
| mode | Examples are "normal", "decommissioned", "leaving". Controlled by Cassandra. |
| streaming | Dictionary of active streams - {<destination_node_ip>: percentage progress 0.0-1.0, ...} Example: 1.0 = 100%, .8 = 80%, etc. |
| task_progress | Dictionary of active tasks - {<task-name-string>: percentage progress, ...} For example, "major-compaction", "minor-compaction" is a task name. Percentage of progress is the same as it is for streaming. |
| last_seen | Null if the node is up or a UNIX timestamp indicating when it went down |
| num_procs | Number of processors |
| rpc_ip | The rpc_address set in cassandra.yaml, which is usually the same as the node_ip property |
| dc | Name of node's data center |
| rack | Name of node's rack |
| network_interfaces | Array of network interface names |
| partitions | data | List of partitions where Cassandra data is stored |
| commitlog | Partition where the commitlog resides |
| saved_caches | Partition where caches are saved |
| other | List of other partitions used by Cassandra |
| devices | data | List of devices where Cassandra data is stored |
| commitlog | Device where the commitlog resides |
| saved_caches | Device where caches are saved |
| other | List of other devices used by Cassandra |
| os | Name of the operating system that will contain "linux", "mac", or "windows" |
Example:
curl
http://127.0.0.1:8888/Test_Cluster/nodes
-X GET
Output:
{
"data_held": 53067368.0,
"dc": "Cassandra",
"devices": {
"commitlog": "disk0",
"data": [
"disk0"
],
"other": [],
"saved_caches": "disk0"
},
"last_seen": 0,
"load": 0.20000000000000001,
"mode": "normal",
"network_interfaces": [
"lo0",
"en0",
"en1"
],
"node_ip": "1.2.3.4",
"node_name": "John-Does-MacBook-Pro.local",
"node_version": {
"cassandra": "1.0.8",
"dse": "2.0-1",
"jobtracker": null,
"search": null,
"tasktracker": null
},
"num_procs": 8,
"os": "mac os x",
"partitions": {
"commitlog": "/dev/disk0s2",
"data": [
"/dev/disk0s2"
],
"other": [],
"saved_caches": "/dev/disk0s2"
},
"rack": "rack1",
"rpc_ip": "192.168.1.28",
"streaming": {},
"task_progress": {},
"token": "34478773810192488084662817292306645152"
}
.
.
.
Retrieve data for a specific node.
| Path arguments: |
|
|---|
Returns a Node object.
Example:
curl
http://127.0.0.1:8888/Test_Cluster/nodes/192.168.1.28
-X GET
Output:
{
"data_held": 52166921.0,
"dc": "Cassandra",
"devices": {
"commitlog": "disk0",
"data": [
"disk0"
],
"other": [],
"saved_caches": "disk0"
},
"last_seen": 0,
"load": 0.080000000000000002,
"mode": "normal",
"network_interfaces": [
"lo0",
"en0",
"en1"
],
"node_ip": "1.2.3.4",
"node_name": "John-Does-MacBook-Pro.local",
"node_version": {
"cassandra": "1.0.8",
"dse": "2.0-1",
"jobtracker": null,
"search": null,
"tasktracker": null
},
"num_procs": 8,
"os": "mac os x",
"partitions": {
"commitlog": "/dev/disk0s2",
"data": [
"/dev/disk0s2"
],
"other": [],
"saved_caches": "/dev/disk0s2"
},
"rack": "rack1",
"rpc_ip": "192.168.1.28",
"streaming": {},
"task_progress": {},
"token": "34478773810192488084662817292306645152"
}
Retrieve a single property for a node.
| Path arguments: |
|
|---|
Returns a single property from a Node object.
Example:
curl
http://127.0.0.1:8888/Test_Cluster/nodes/1.2.3.4/token
-X GET
Output:
"34478773810192488084662817292306645152"
Retrieve cluster-wide storage capacity information.
| Path arguments: | cluster_id -- A key, which identifies the node's cluster, in the dictionary returned by GET /cluster-configs. |
|---|
Returns:
{
"free_gb": Total free space in the cluster in GB,
"used_gb": Total c* used space in the cluster in GB,
"reporting_nodes": How many nodes are included in the first 2 numbers
}
Example:
curl
http://127.0.0.1:8888/Test_Cluster/storage-capacity
-X GET
Output:
{
"free_gb": 627,
"reporting_nodes": 1,
"used_gb": 70
}