Download & Extract kibana 8.x
$ cd /opt
$ yum install wget -y
$ wget https://artifacts.elastic.co/downloads/kibana/kibana-8.4.2-linux-x86_64.tar.gz
$ tar -zxvf kibana-8.4.2-linux-x86_64.tar.gz
Configure kibana 8.x
$ cd kibana-8.4.2
$ git init
$ git config user.name "Rajesh Kumar"
$ git config user.email "devops@rajeshkumar.xyz"
$ git add config/
$ git commit -m"commiting config"
$ git statis
$ vi config/kibana.yml
$ git add config
$ git commit -m"adding host"
$ ./bin/kibana
$ ./bin/kibana --allow-root
vi config/kibana.yml
./bin/kibana –allow-root
Provide Enrollment Kye of ElasticSearch
Login to Kibana using elasticsearch username/password
Browse to this
http://192.168.1.8:5601/
elastic
pass
Register/Enrolling kibana 8.x with elasticsearch
# https://www.elastic.co/guide/en/elasticsearch/reference/current/configuring-stack-security.html
How to generate enrollment token?
$ ./elasticsearch-create-enrollment-token -s kibana
How to register kibana with elasticsearch using enrollment token?
$ ./kibana-setup --enrollment-token <enrollment-token>
$ ./kibana
How to generate service token for kibana aka serviceAccountToken in elasticsearch server?
./elasticsearch-service-tokens create elastic/kibana my-token
INFO: Kibana setup using enrollment process
If you want to use the enrollment process, then you should not make configuration changes to your kibana.yml but let the enrollment process handle this for you. enrollment process process would make following changes in kibana.yml
Some CRUD Example
curl -XPUT --cacert /home/elastic/elasticsearch-8.4.2/config/certs/http_ca.crt -u elastic:D+oYlbieuG3n2=EpiKU6'https://192.168.1.2:9200/rajesh111?&pretty'
curl -XPUT --cacert /home/elastic/elasticsearch-8.4.2/config/certs/http_ca.crt -u elastic:YrfJHfoQtniJqzyD4pM3 'https://192.168.1.2:9200/rajesh111/_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/elastic/elasticsearch-8.4.2/config/certs/http_ca.crt -u elastic:D+oYlbieuG3n2=EpiKU6 'https://192.68.1.2:9200/rajesh111/_search?pretty=true&q=*:*'
Some example with Localhost
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/rajesh111?&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/rajesh111/_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/rajesh111/_search?pretty=true&q=*:*'
Latest posts by Rajesh Kumar (see all)
- Best AI tools for Software Engineers - November 4, 2024
- Installing Jupyter: Get up and running on your computer - November 2, 2024
- An Introduction of SymOps by SymOps.com - October 30, 2024
Are these instructions if you are installing Elasticsearch and Kibana on the same server?