TungNT (Blue)

tungnt.blue@gmail.com

User Tools

Site Tools


development:system:elk-stack

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
development:system:elk-stack [2024/08/21 16:00] tungntdevelopment:system:elk-stack [2024/08/22 14:53] (current) – [Cài đặt kibana] tungnt
Line 1: Line 1:
-====== Xuấfile csv ======+====== Cài đặt ======
  
-**Bước 1: Filter theo ý muốn:**+**Download:** 
 +  * https://www.elastic.co/downloads/elasticsearch 
 +  * https://www.elastic.co/downloads/kibana 
 + 
 +===== Cài đặt elasticsearch ===== 
 + 
 +<code bash> 
 +(venv) tungnt@MacBook-Pro-cua-Nguyen-2 Downloads % cd elasticsearch-8.15.0 
 +(venv) tungnt@MacBook-Pro-cua-Nguyen-2 elasticsearch-8.15.0 % bin/elasticsearch 
 +... 
 +✅ 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`): 
 +  Btnk1NrI3-I5X_dt0FmU 
 + 
 +ℹ️  HTTP CA certificate SHA-256 fingerprint: 
 +  c1542cd24b1615552f06780a36a20557b6e9539ddb71abcf358e504ffcb61395 
 + 
 +ℹ️  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): 
 +  eyJ2ZXIiOiI4LjE0LjAiLCJhZHIiOlsiMTAuOC4wLjM6OTIwMCJdLCJmZ3IiOiJjMTU0MmNkMjRiMTYxNTU1MmYwNjc4MGEzNmEyMDU1N2I2ZTk1MzlkZGI3MWFiY2YzNThlNTA0ZmZjYjYxMzk1Iiwia2V5IjoiQk02Q2VwRUJaZTcxMEdzakt0V1A6S05iZjdyTGJUWHUxSGdaUnJTaWhsZyJ9 
 + 
 +ℹ️  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. 
 +... 
 +</code> 
 + 
 +Nếu báo lỗi Privacy and security file jdk.app, dùng lệnh sau: 
 + 
 +<code bash> 
 +(venv) tungnt@MacBook-Pro-cua-Nguyen-2 elasticsearch-8.15.0 % xattr -d com.apple.quarantine jdk.app 
 +</code> 
 + 
 + 
 + 
 + 
 +===== Cài đặt kibana ===== 
 + 
 +<code bash> 
 +tungnt@192 Downloads % xattr -d com.apple.quarantine kibana-8.15.0 
 +tungnt@192 Downloads % cd kibana-8.15.0 
 +tungnt@192 kibana-8.15.0 % bin/kibana 
 +... 
 +i Kibana has not been configured. 
 + 
 +Go to http://localhost:5601/?code=308808 to get started. 
 +</code> 
 + 
 +{{ :development:system:screenshot_2024-08-22_at_21.45.31.png |}} 
 + 
 +{{ :development:system:screenshot_2024-08-22_at_21.45.57.png |}} 
 + 
 +{{ :development:system:screenshot_2024-08-22_at_21.46.04.png |}} 
 + 
 +https://www.elastic.co/guide/en/observability/current/logs-metrics-get-started.html 
 +====== Download file CSV ====== 
 + 
 +**Bước 1: Filter theo ý muốn**
  
 {{ :development:system:screenshot_2024-08-21_at_23.00.13.png |}} {{ :development:system:screenshot_2024-08-21_at_23.00.13.png |}}
 +
 +**Bước 2: Click button Save để lưu query vừa filter lại**
 +
 +{{ :development:system:screenshot_2024-08-21_at_23.01.03.png |}}
 +
 +**Bước 3: Màn hình hiển thị Popup xác nhận, tiếp tục click button Save**
 +
 +{{ :development:system:screenshot_2024-08-21_at_23.02.04.png |}}
 +
 +**Bước 4: Click button Share > CSV Reports**
 +
 +{{ :development:system:screenshot_2024-08-21_at_23.03.13.png |}}
 +
 +**Bước 5: Tiếp tục click button Generate CSV**
 +
 +{{ :development:system:screenshot_2024-08-21_at_23.04.15.png |}}
 +
 +**Bước 6: Màn hình hiển thị Popup thông báo Queue Download, click vào link để vào trang Report hoặc chờ xong click vào button Download**
 +
 +{{ :development:system:screenshot_2024-08-21_at_23.05.08.png |}}
 +
 +**Bước 7: Download file CSV**
 +
 +{{ :development:system:screenshot_2024-08-21_at_23.06.56.png |}}
 +
 +====== Creating fields on the fly in Kibana with runtime fields ======
 +
 +  * https://www.elastic.co/guide/en/kibana/7.17/managing-index-patterns.html
 +  * https://www.youtube.com/watch?v=sqKDMq1JKNM
 +
 +====== Tham khảo ======
 +
 +  * [[https://www.youtube.com/watch?v=DMh92_0epO0|Setting up Elasticsearch & Kibana on macOS & Linux]]
 +  * https://fly.io/laravel-bytes/integrating-the-elastic-stack-elk-into-a-laravel-app-on-fly/
 +  * https://www.youtube.com/watch?v=6-Oim72yrtM
 +  * https://www.digitalocean.com/community/tutorials/how-to-install-elasticsearch-logstash-and-kibana-elastic-stack-on-ubuntu-22-04
development/system/elk-stack.1724256029.txt.gz · Last modified: 2024/08/21 16:00 by tungnt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki