-
Notifications
You must be signed in to change notification settings - Fork 0
/
Credentials.txt
62 lines (42 loc) · 2.98 KB
/
Credentials.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
Elasticsearch and Kibana
https://www.elastic.co/guide/en/elasticsearch/reference/8.10/docker.html
docker network create elastic
docker pull docker.elastic.co/elasticsearch/elasticsearch:8.10.4
docker run --name es01 --net elastic -p 9200:9200 -it -m 1GB docker.elastic.co/elasticsearch/elasticsearch:8.10.4
Copy the generated elastic password and enrollment token. These credentials are only shown when you start Elasticsearch for the first time. You can regenerate the credentials using the following commands.
docker exec -it es01 /usr/share/elasticsearch/bin/elasticsearch-reset-password -u elastic
docker exec -it es01 /usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s kibana
export ELASTIC_PASSWORD="your_password"
Copy the http_ca.crt SSL certificate from the container to your local machine.
docker cp es01:/usr/share/elasticsearch/config/certs/http_ca.crt .
curl --cacert http_ca.crt -u elastic:$ELASTIC_PASSWORD https://localhost:9200
Password for the elastic user (reset with `bin/elasticsearch-reset-password -u elastic`):
ZWt_NOTFpX5go5HUdm_j
HTTP CA certificate SHA-256 fingerprint:
4a41c6d967a2dce819770fad73849b75c31224532c46577ae5736ed9809775a3
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):
eyJ2ZXIiOiI4LjEwLjQiLCJhZHIiOlsiMTcyLjE4LjAuMjo5MjAwIl0sImZnciI6IjRhNDFjNmQ5NjdhMmRjZTgxOTc3MGZhZDczODQ5Yjc1YzMxMjI0NTMyYzQ2NTc3YWU1NzM2ZWQ5ODA5Nzc1YTMiLCJrZXkiOiI5NVBuWElzQmpId1d6WDdReVNybTp5ajUxd1hjS1MwcTlsSWZzVVlodDd3In0=
Configure other nodes to join this cluster:
• Copy the following enrollment token and start new Elasticsearch nodes with `bin/elasticsearch --enrollment-token <token>` (valid for the next 30 minutes):
eyJ2ZXIiOiI4LjEwLjQiLCJhZHIiOlsiMTcyLjE4LjAuMjo5MjAwIl0sImZnciI6IjRhNDFjNmQ5NjdhMmRjZTgxOTc3MGZhZDczODQ5Yjc1YzMxMjI0NTMyYzQ2NTc3YWU1NzM2ZWQ5ODA5Nzc1YTMiLCJrZXkiOiI5WlBuWElzQmpId1d6WDdReVNyaDpjamdLbHgxZFIyYXhybk9rdFgyazhRIn0=
If you're running in Docker, copy the enrollment token and run:
`docker run -e "ENROLLMENT_TOKEN=<token>" docker.elastic.co/elasticsearch/elasticsearch:8.10.4`
docker stop es01
docker start es01
################################################
KIBANA
docker pull docker.elastic.co/kibana/kibana:8.10.4
docker run --name kib01 --net elastic -p 5601:5601 docker.elastic.co/kibana/kibana:8.10.4
################################################
LOGSTASH
https://www.elastic.co/guide/en/logstash/current/docker.html
mkdir settings
mkdir pipeline
vi ./settings/logstash.yml
vi ./pipeline/pipelines.yml
docker pull docker.elastic.co/logstash/logstash:8.10.4
docker run -it --name log01 --net elastic -p 5140:5140/udp -v /home/bkblank/git/elastic-docker/pipeline/:/usr/share/logstash/pipeline/ -v /home/bkblank/git/elastic-docker/settings/:/usr/share/logstash/config/ docker.elastic.co/logstash/logstash:8.10.4
TESTING:
echo doc4 > /dev/udp/127.0.0.1/5140