Elasticsearch Resources

Get a list of your active Elasticsearch instances

GET /elasticsearch/<instance_name>/

Response:

{
    "data": [
        {
            "api_key": "<api-key>",
            "caster": null,
            "connection_strings": {
                "public": {
                    "http": "http://iad1-10713-0.es.objectrocket.com:10713,http://iad1-10713-1.es.objectrocket.com:10713,http://iad1-10713-2.es.objectrocket.com:10713,http://iad1-10713-3.es.objectrocket.com:10713",
                    "https": "https://iad1-10713-0.es.objectrocket.com:20713,https://iad1-10713-1.es.objectrocket.com:20713,https://iad1-10713-2.es.objectrocket.com:20713,https://iad1-10713-3.es.objectrocket.com:20713",
                    "kibana_http": "http://iad1-10713-kibana.es.objectrocket.com:10713",
                    "kibana_https": "https://iad1-10713-kibana.es.objectrocket.com:20713",
                    "transport": "iad1-10713-0.es.objectrocket.com:40713,iad1-10713-1.es.objectrocket.com:40713,iad1-10713-2.es.objectrocket.com:40713,iad1-10713-3.es.objectrocket.com:40713"
                },
                "servicenet": {
                    "http": "http://iad1-sn-10713-0.es.objectrocket.com:10713,http://iad1-sn-10713-1.es.objectrocket.com:10713,http://iad1-sn-10713-2.es.objectrocket.com:10713,http://iad1-sn-10713-3.es.objectrocket.com:10713",
                    "https": "https://iad1-sn-10713-0.es.objectrocket.com:20713,https://iad1-sn-10713-1.es.objectrocket.com:20713,https://iad1-sn-10713-2.es.objectrocket.com:20713,https://iad1-sn-10713-3.es.objectrocket.com:20713",
                    "transport": "iad1-sn-10713-0.es.objectrocket.com:40713,iad1-sn-10713-1.es.objectrocket.com:40713,iad1-sn-10713-2.es.objectrocket.com:40713,iad1-sn-10713-3.es.objectrocket.com:40713"
                }
            },
            "created": "2017-02-10 22:58:54",
            "encrypted": false,
            "id": "<instance id>",
            "name": "foobar",
            "plan": 4,
            "service": "elasticsearch",
            "settings": {},
            "state": "COMPLETED",
            "type": "elasticsearch",
            "user": "<youruserid>",
            "version": "5.1.1",
            "zone": "US-East-IAD1"
        },
        {
        }
    ]
}

Response Field Map:

Field Usage
api_key Not used in Elasticsearch clusters
caster ID for customers in a dedicated casters environment
connection strings Elasticsearch API, Elasticsearch transport, and Kibana connection strings for Rackspace ServiceNet and public interfaces. All strings given in http and https (secure) options where applicable
created Date and time that the cluster was cerated
encrypted Whether this cluster has at-rest-encryption enabled
id unique instance id for each instance
name The instance name. Use this for <instance_name> in the other commands
plan The instance storage size from plan size (i.e. 4,8,16,32,64,128,256,512)
service Will always be “elasticsearch” for elasticsearch instances
settings settings for ACL sync are listed here
state Indicates the build state of the current instance (i.e. REQUESTED, STARTED, COMPLETED)
type Type of instance. Will always be “elasticsearch” for Elasticsearch instances
user your unique internal user id number
version Elasticsearch version on this cluster
zone The ObjectRocket datacenter that this instance is deployed in

Check the build status of an Elasticsearch cluster

GET /elasticsearch/<instance_name>/build

Response:

{
    "data": {
        "action": "create",
        "build_finish_date": 1487021778493,
        "build_start_date": 1487021330107,
        "encrypted": false,
        "id": "<instance id>",
        "login": "<login name>",
        "name": "new_instance",
        "phase": "INSTANCE_DEPLOYED",
        "plan": 4,
        "state": "COMPLETED",
        "updated_date": 1487021778493,
        "version": "5.1.1",
        "zone": "US-Dallas"
    }
}

Response Field Map:

Field Usage
action The action being performed on the instance
build_finish_date a timestamp for when build finished (in ms)
build_start_date a timestamp for when build started (in ms)
encrypted Whether this cluster has at-rest-encryption enabled
id unique instance id for each instance
login your login name for the ObjectRocket UI/API
name The instance name. Use this for <instance_name> in the other commands
phase Indicates the different phases of the build state
plan The instance storage size from plan size (i.e. 4,8,16,32,64,128,256,512)
state Indicates the build state of the current instance (i.e. REQUESTED, STARTED, COMPLETED)
updated_date a timestamp for the last time the instance state was updated (in ms)
version Elasticsearch version on this cluster
zone The ObjectRocket datacenter that this instance is deployed in

List users for the elasticsearch instance

GET /elasticsearch/<instance_name>/users/

Response:

{
    "data": [
        {
            "role": "kibana-only",
            "username": "foouser"
        },
        {
            "role": "readonly",
            "username": "baruser"
        }
    ]
}

Response Field Map:

:header-rows: 1 :stub-columns: 1 :class: compatibility
Field Usage
role The user’s role. Can be “admin”, “readonly”, or “kibana-only”
username the username of the user

Create a new user for the elasticsearch instance

POST /elasticsearch/<instance_name>/users/

Request Body:

{
  "username": "myuser",
  "password": "mytestp@ss",
  "role": "admin"
}

Request Field Map:

:header-rows: 1 :stub-columns: 1 :class: compatibility
Field Usage
username (Required) username of the new user
password (Required) password of the new user
role (Required) The user’s role. Can be “admin”, “readonly”, or “kibana-only”

Response:

{
    "data": {
        "role": "admin",
        "username": "myuser"
    }
}

Delete a user of the elasticsearch instance

DELETE /elasticsearch/<instance_name>/users/

Request Body:

{
  "username": "myuser"
}

Request Field Map:

:header-rows: 1 :stub-columns: 1 :class: compatibility
Field Usage
username (Required) username of the user to delete

Response:

{
    "data": {
        "username": "myuser"
    }
}

Add a data node to the Elasticsearch cluster

Note

Adding a data node will impact your monthly subscription fees. See The ObjectRocket pricing page for more details.

POST /elasticsearch/<instance_name>/data_nodes/

Request Body:

{
  "count": 1
}

Request Field Map:

:header-rows: 1 :stub-columns: 1 :class: compatibility
Field Usage
count number of data nodes to add

Response:

{
    "data": "58a20bb9ffbbf821544090f7"
}

Display RocketScale Settings

You can use the ObjectRocket API to display the current Rocketscale :sup:® settings for an instance

GET /elasticsearch/<instance_name>/rocketscale_settings/

Response:

{
  "data": {
    "num_minutes_in_violation": 10,
    "max_node_limit": 12,
    "temp_disabled_window": 3600,
    "node_disk_usage_threshold": 87,
    "cooldown_time": 1800,
    "rocketscale_enabled": true,
    "jvm_threshold": 85
  }
}

Note

There are two settings returned in the GET call that are used internally and not settable via the PATCH call. temp_disabled_window is for our support teams to temporarily deactivate RocketScale when needed. jvm_threshold is reserved for future use.

Modify RocketScale Settings for an Instance

PATCH /elasticsearch/<instance_name>/rocketscale_settings/

Request Body:

{
  "rocketscale_enabled": true,
  "cooldown_time": 660,
  "node_disk_usage_threshold": 83,
  "max_node_limit": 10,
  "num_minutes_in_violation": 8
}

Request Field Map:

Field Usage
rocketscale_enabled (Required) boolean to determine whether RocketScale should be enabled or not
cooldown_time The amount of time in seconds to wait between checking node disk usage
node_disk_usage_threshold The percentage of storage usage that must be exceeded before RocketScale will try to add another node
max_node_limit The maximum number of nodes a cluster can have. Once this limit is hit, RocketScale will not try to add more nodes
num_minutes_in_violation The amount of time in minutes that a node must exceed the node_disk_usage_threshold before adding a node

Response:

{
  "data": {
    "num_minutes_in_violation": 8,
    "max_node_limit": 10,
    "temp_disabled_window": 3600,
    "node_disk_usage_threshold": 83,
    "cooldown_time": 660,
    "rocketscale_enabled": true,
    "jvm_threshold": 85
  }
}

Display index stats

You can use the ObjectRocket API to gather information from the Elasticsearch stats APIs. This call returns data similar to an index /_stats/ call in Elasticsearch

GET /elasticsearch/<instance_name>/indices/

Response:

{
    "data": {
        "_all": {
            "primaries": {
                "completion": {
                    "size_in_bytes": 0
                },
                "docs": {
                    "count": 1,
                    "deleted": 0
                },
                "fielddata": {
                    "evictions": 0,
                    "memory_size_in_bytes": 0
                },
                "flush": {
                    "total": 1,
                    "total_time_in_millis": 6
                },
                "get": {
                    "current": 0,
                    "exists_time_in_millis": 0,
                    "exists_total": 0,
                    "missing_time_in_millis": 0,
                    "missing_total": 0,
                    "time_in_millis": 0,
                    "total": 0
                },
                "indexing": {
                    "delete_current": 0,
                    "delete_time_in_millis": 0,
                    "delete_total": 0,
                    "index_current": 0,
                    "index_failed": 0,
                    "index_time_in_millis": 55,
                    "index_total": 1,
                    "is_throttled": false,
                    "noop_update_total": 0,
                    "throttle_time_in_millis": 0
                }
}