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:07] tungntdevelopment:system:elk-stack [2024/08/22 14:53] (current) – [Cài đặt kibana] tungnt
Line 1: Line 1:
-====== Xuất file csv ======+====== Cài đặ====== 
 + 
 +**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** **Bước 1: Filter theo ý muốn**
Line 28: Line 92:
  
 {{ :development:system:screenshot_2024-08-21_at_23.06.56.png |}} {{ :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.1724256431.txt.gz · Last modified: 2024/08/21 16:07 by tungnt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki