Skip to content

ElasticSearch Service Kibana Tips and Tricks

Dennis Christilaw edited this page Nov 11, 2019 · 6 revisions

Purpose

This is just a placeholder for some tips and tricks (kind of like a cheat sheet?) of API and other commands for you to use with your ElasticSearch Stack via the API (CULR) or Dev Tools (Kibana). I will be sure to include BOTH examples for everything. This works for both Standalone and ElasticSearch Services, however, if it does not work for AWS ESS, then I will be sure to point that out, however, most everything here will be tested on AWS ESS, so should work fine.

Couple Hints

CURL Formatting Output in JSON

When you are doing queries in either, the results come back the same, but with CURL, the commands can come back as a single block of text with no formatting. in order to format the response in JSON format, add the following to the end of the CURL URL:

?pretty

Example

curl https://<ElasticSearch_Endpoint>/_cluster/settings?pretty

This is NOT NEEDED in the Kibana Console as everything comes back with JSON formatting

CURL and Kibana

Some queries will return data in a Table format. This is great for certain results, but the tables are not always "easy" to read in knowing what the columns are. In order to return the columns with the Header Row, use the following:

?v

Example

CURL: curl https://<ElasticSearch_Endpoint>/_cat/allocation
Kibana: GET _cat/allocation

Returns (same for both):

    46      485.9mb   661.2mb       19gb     19.6gb            3 x.x.x.x x.x.x.x 99cb9f7c027ca77ae0aa9a1a7556663b
    46      488.6mb   652.7mb       19gb     19.6gb            3 x.x.x.x x.x.x.x 30cbc8cea6c3c093541481ae334dd5fd
CURL: curl https://<ElasticSearch_Endpoint>/_cat/allocation?v
Kibana: GET _cat/allocation?v

Returns (same for both):

shards disk.indices disk.used disk.avail disk.total disk.percent host          ip            node
    46      485.9mb   661.2mb       19gb     19.6gb            3 x.x.x.x x.x.x.x 99cb9f7c027ca77ae0aa9a1a7556663b
    46      488.6mb   652.7mb       19gb     19.6gb            3 x.x.x.x x.x.x.x 30cbc8cea6c3c093541481ae334dd5fd

Checking Disk Space Utilization

This is pretty easy and luckily comes back with a pretty simple format, so no real manipulation is needed for this one.

CURL

curl https://<ElasticSearch_Endpoint>/_cat/allocation?v

Kibana

GET _cat/allocation?v

Result (same for both):

shards disk.indices disk.used disk.avail disk.total disk.percent host          ip            node
    46      485.9mb   661.2mb       19gb     19.6gb            3 x.x.x.x x.x.x.x 99cb9f7c027ca77ae0aa9a1a7556663b
    46      488.6mb   652.7mb       19gb     19.6gb            3 x.x.x.x x.x.x.x 30cbc8cea6c3c093541481ae334dd5fd