Elastic with ElasticSearch notes

http://44.201.203.164:5601/
elastic
  gy6qhiWkuJ5S*7dWk83C


Old Architecture - ELK Stack
----------------------------------
Beats --> Logstash --> Elasticsearch <---- Kibana

New Architecture - Elastic Stack
----------------------------------
Agent -->  Elasticsearch <---- Kibana < YOU

Infra
Apm
Log	== document

Webcr --> -Inverted index (Index(ES)

======================
44.201.203.164


Step 1 - Download the Latest version of Elasticsearch
- https://www.elastic.co/downloads/elasticsearch
$ wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.9.0-linux-x86_64.tar.gz

    6  wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.9.0-linux-x86_64.tar.gz
    7  clear
    8  ls
    9  tar -zxvf elasticsearch-8.9.0-linux-x86_64.tar.gz
   10  pwd
   11  clear
   12  ls
   13  cd elasticsearch-8.9.0
   14  ls
   15  cd bin
   16  ls
   17  history

./elasticsearch -d -p pid
=====================================

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ Elasticsearch security features have been automatically configured!
✅ Authentication is enabled and cluster connections are encrypted.

ℹī¸  Password for the elastic user (reset with `bin/elasticsearch-reset-password -u elastic`):

http://44.201.203.164:5601/
elastic
  gy6qhiWkuJ5S*7dWk83C

ℹī¸  HTTP CA certificate SHA-256 fingerprint:
  bc35253b2805f110990c8b12cd2c53b464219e579de0143dec3a320bb4379a7f

ℹī¸  Configure Kibana to use this cluster:
â€ĸ Run Kibana and click the configuration link in the terminal when Kibana starts.
â€ĸ Copy the following enrollment token and paste it into Kibana in your browser (valid for the next 30 minutes):
  eyJ2ZXIiOiI4LjkuMCIsImFkciI6WyIxNzIuMzEuODQuNDM6OTIwMCJdLCJmZ3IiOiJiYzM1MjUzYjI4MDVmMTEwOTkwYzhiMTJjZDJjNTNiNDY0MjE5ZTU3OWRlMDE0M2RlYzNhMzIwYmI0Mzc5YTdmIiwia2V5IjoiWklOQ3NZa0JjOFBjQlNlQ0pxNGU6YzFjajVSWnpTby1xTWFFaXhCZmhUUSJ9

ℹī¸  Configure other nodes to join this cluster:
â€ĸ On this node:
  ⁃ Create an enrollment token with `bin/elasticsearch-create-enrollment-token -s node`.
  ⁃ Uncomment the transport.host setting at the end of config/elasticsearch.yml.
  ⁃ Restart Elasticsearch.
â€ĸ On other nodes:
  ⁃ Start Elasticsearch with `bin/elasticsearch --enrollment-token <token>`, using the enrollment token that you generated.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CRUD					= API
	Create  - documents

	read - documents

	Update - documents

	Delete - documents

DSL					== API
	Query
	========================

List of Existing Index
curl -XGET --cacert /home/ubuntu/elasticsearch-8.9.0/config/certs/http_ca.crt -u elastic:gy6qhiWkuJ5S*7dWk83C https://localhost:9200/_cat/indices?pretty

Create an Index
curl -XPUT --cacert /home/ubuntu/elasticsearch-8.9.0/config/certs/http_ca.crt -u elastic:gy6qhiWkuJ5S*7dWk83C https://localhost:9200/rajesh112?&pretty

Create a Doc
curl -XPUT --cacert /home/ubuntu/elasticsearch-8.9.0/config/certs/http_ca.crt -u elastic:gy6qhiWkuJ5S*7dWk83C 'https://localhost:9200/rajesh112/_doc/1' -H 'Content-Type: application/json' -d'
{
  "name": "iPhone 7",
  "camera": "12MP",
  "storage": "256GB",
  "display": "4.7inch",
  "battery": "1,960mAh",
  "reviews": ["Incredibly happy after having used it for one week", "Best iPhone so far", "Very expensive, stick to Android"]
}
'
curl -XGET --cacert /home/ubuntu/elasticsearch-8.9.0/config/certs/http_ca.crt -u elastic:gy6qhiWkuJ5S*7dWk83C 'https://localhost:9200/rajesh112/_search?pretty=true&q=*:*'


sudo -s
cd /opt
wget https://artifacts.elastic.co/downloads/kibana/kibana-8.9.0-linux-x86_64.tar.gz


curl -L -O https://artifacts.elastic.co/downloads/beats/elastic-agent/elastic-agent-8.9.0-linux-x86_64.tar.gz
tar xzvf elastic-agent-8.9.0-linux-x86_64.tar.gz
cd elastic-agent-8.9.0-linux-x86_64
sudo ./elastic-agent install


Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x