Agent Install and Status

Methods for determining agent health and operations on a node.

Install

Install agents on nodes

[POST /{cluster_id}/agents/]

Status

Get all of the agent statuses

[GET /{cluster_id}/agents]

Get a single agent status

GET /{cluster_id}/agents/{node_ip}

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 JSON dictionary 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 be sudo, su, or direct (if login-name already has super-user privileges). Defaults to sudo.

    • become-user: The name of the super-user on target nodes whose privileges are assumed. Required if become-mode is sudo or su. Defaults to root.

    • become-password: The password that is used in response to sudo or su prompts on target nodes. Required if the become-mode is sudo or su and 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"
   }'

Output:

{}

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-----\nMIIEoAIBAAKCAQEAyqzJasqBrHigUmbLyPXb UIvLcshrwHmb6xqYxMnzKUdQk4i\nY4EhLOF9TI5//331ACwtF95UZFL6/mINxiLJzRHL7aU3Ux4S7uUueFYoFA3EqwmZ\nCT4JQuBEMzCFnrEhXQXIHo2cSK1xivdkRaDhP F3xZYeR0xCcy/qlx MhdQJ45WP\npJUr86f2S5dURv/Z4OxAlcCqTbAoHYhUfTLmpyAD1KyqfYKyxEeGcomQALG51bR1\n7 XJThs8 1V4If5Q/8wZj35c9Go OdRCJHQTe9ektBtfo3kUfEzERptwvGQP NVI\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6OMrTFXp/m2BApFAd84GAd9kOauWIW\nWSOZAn8UcMuPV6ksarRx5RgKlfqwiRF0DUpKysu 9Ea0jETGhfviJoz/1fhOlkX \nw60V4IeWEaLdlVwNxdfTYqs1dvNq3pdm  wQzBrmlaQ7qAzxT0XAInDBWlOFKRPo\n0GqhO9gsOq4vXsz75txzKM/J7cGfIyEsJkMzQfgKYL3D6SEf\n-----END RSA PRIVATE KEY-----\n"
    }'

Output:

{}

Status

GET /{cluster_id}/agents/

Displays 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}

Displays 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"
}

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