DataStax Agent Install and Status
Install
POST /{cluster_id}/rc/install_agents/
Installs agents on nodes.
-
Path argument: cluster_id: The ID of a cluster returned from GET /cluster-configs.
-
body: A
JSONdictionary of options, including:-
ip-list: List of IPs for nodes on which the agent should be installed. -
login-user: Username to use to login to the nodes. -
login-password: Optional. Password to use to login to the nodes. -
ssh-private-key: Optional. Private key to use to login to the nodes. -
become-mode: The privilege-escalation mechanism to obtain super-user privileges on target nodes. Can besudo,su, ordirect(if login-name already has super-user privileges). Defaults tosudo. -
become-user: The name of the super-user on target nodes whose privileges are assumed. Required ifbecome-modeissudoorsu. Defaults toroot. -
become-password: The password that is used in response tosudoorsuprompts on target nodes. Required if the become-mode issudoorsuand the target node prompts for passwords.
-
Example: Agent install using password
curl -X POST
http://127.0.0.1:8888/Test_Cluster/rc/install_agents/
-d '{
"ip-list":["10.200.181.17", "10.200.181.18"],
"login-user":"testuser",
"login-password":"testpass"
}'
Example: Agent install using private key
curl -X POST
http://127.0.0.1:8888/Test_Cluster/rc/install_agents/
-d '{
"ip-list":["10.200.181.17", "10.200.181.18"],
"login-user":"testuser",
"ssh-private-key":"-----BEGIN RSA PRIVATE KEY-----\nMIIEoAIBAAKCA...D6SEf\n-----END RSA PRIVATE KEY-----\n"
}'
Status
GET /{cluster_id}/agents/
Get the status of all agents. Possible agent conditions are:
-
AGENT_INSTALLING
-
NO_AGENT_DETECTED
-
AGENT_VERSION_MISMATCH_PACKAGE
-
AGENT_VERSION_MISMATCH_TAR
-
AGENT_VERSION_MISMATCH_UNKNOWN
-
STOMP_ERROR_TAR
-
STOMP_ERROR_BAD_CONF
-
STOMP_ERROR_GOOD_CONF
-
NODE_DOWN
-
JMX_ERROR_BAD_CONF
-
JMX_ERROR_GOOD_CONF
-
CASS_ERROR_BAD_CONF
-
CASS_ERROR_GOOD_CONF
-
STORAGE_CASS_ERROR_GOOD_CONF
-
STORAGE_CASS_ERROR_BAD_CONF
-
HTTP_SERVER_NO_SSL_ERROR
-
HTTP_SERVER_SSL_ERROR
-
HTTP_SERVER_UNREACHABLE
-
ALL_OK
Path argument:
cluster_id: The ID of a cluster returned from GET /cluster-configs.
Example:
curl http://127.0.0.1:8888/Test_Cluster/agents/
Output:
{
"127.0.0.1": {
"rack": "rack1",
"agent_status": {
"storage_cassandra": {
"updated_at": 1543612266,
"status": "up"
},
"last_seen": 1543612269,
"version": "6.1.12SNAPSHOT",
"condition": "ALL_OK",
"install_status": {
"error-message": null,
"state": null
},
"jmx": {
"updated_at": 1543612266,
"status": "up"
},
"monitored_cassandra": {
"updated_at": 1543612266,
"status": "up"
},
"http": {
"updated_at": 1543612266,
"status": "up"
},
"stomp": {
"updated_at": 1543612269,
"status": "up"
},
"limitations": []
},
"name": "Orions-MBP.PK5001Z",
"agent_install_type": "tarball",
"dc": "Cassandra"
}
}
GET /{cluster_id}/agents/{node_ip}
Get the status of a single agent.
Path arguments:
-
cluster_id: The ID of a cluster returned from GET /cluster-configs.
-
node_ip: A node’s IP address.
Example:
curl http://127.0.0.1:8888/Test_Cluster/agents/127.0.0.1
Output:
{
"rack": "rack1",
"agent_status": {
"storage_cassandra": {
"updated_at": 1543612667,
"status": "up"
},
"last_seen": 1543612668,
"version": "6.1.12SNAPSHOT",
"condition": "ALL_OK",
"install_status": {
"error-message": null,
"state": null
},
"jmx": {
"updated_at": 1543612667,
"status": "up"
},
"monitored_cassandra": {
"updated_at": 1543612667,
"status": "up"
},
"http": {
"updated_at": 1543612667,
"status": "up"
},
"stomp": {
"updated_at": 1543612668,
"status": "up"
},
"limitations": []
},
"name": "Orions-MBP.PK5001Z",
"agent_install_type": "tarball",
"dc": "Cassandra"
}