Introduction To ELK Stack:
ELK is the abbreviation of Elasticsearch,
Logstash, and Kibana. This has been known to be one of the most leading
log-based management platform, which is used all over the world for log
analysis.
Straight away into the ELK stack, the logstash has been extracting
the logging data or full range of other events from various sources of input.
It will be processing the events and hence, later on, will be storing them
inside the Elasticsearch. In simple, we will be calling Kibana as a complete
visualization tool, which will be accessing the logs straight from the
Elasticsearch.
To learn more about Kibana.
Click on this Link
To learn more about Logstash.
Click on this link.
In this article, we
will be looking into some of the frequently used Elastic Search Curl commands
Below is the list of
most frequently used Elastic Search Curl commands.
Elastic Search Command
|
Purpose
|
curl -X DELETE 'http://localhost:8200/samples'
|
To Delete index
|
curl -X GET 'http://localhost:8200/_cat/indices?v'
|
To
list all index
|
To query
using Parameters.
|
|
curl -X GET
|
To list index
mapping.
|
curl -XPUT --header
'Content-Type: application/json'
http://localhost:8200/samples/_doc/1
-d '{
"city" : "london"
}
|
To add data
|
curl -XPOST --header
'Content-Type: application/json' http://localhost:8200/_reindex -d '{
"source": {
"index": "samples"
},
"dest": {
"index":
"samples_backup"
}
}'
|
To take backup of
index
|
curl --user
$pwd -H 'Content-Type:
application/json' -XGET https://58571402g34564923883e7be42a037917.eu-central-1.aws.cloud.es.io:9243/_cluster/health?pretty
|
To show health
cluster
|
curl -X GET
'http://localhost:8200/_cat/indices?v' -u elastic:(password) '
|
To use basic
authentication with elastic search.
|