- Mastering Kibana 6.x
- Anurag Srivastava
- 197字
- 2021-07-16 18:20:11
Outputting the log data into Elasticsearch
The next step is going to be to execute the configuration so that Logstash can start reading logs from the Apache log file. In order to execute the Logstash configuration file, we need to run the following command:
bin/logstash -f /etc/logstash/conf.d/logs-apache.conf
The following screen is showing us the result after executing the preceding command. Once the command is executed successfully, we will get a message, such as Successfully started Logstash API endpoint {:port=>9600}:

When we execute the Logstash configuration, it connects to the output source, which in this case is Elasticsearch. This starts the pipeline so that it reads the data from the log file and puts it into Elasticsearch.
To test this setup, we need to open the browser so that we can open some localhost websites that are served through the Apache server, as this will provide some data for writing to the Apache log file. To test whether the logs have been pushed to Elasticsearch, we can open the Elasticsearch index and check the logs:
http://localhost:9200/logs_apache/_search?pretty

In the preceding screenshot, we can see that Logstash is reading the Apache logs and pushing them to the Elasticsearch server.
- 大數據技術與應用基礎
- Introduction to DevOps with Kubernetes
- 教父母學會上網
- 影視后期制作(Avid Media Composer 5.0)
- Hadoop Real-World Solutions Cookbook(Second Edition)
- PyTorch Deep Learning Hands-On
- 大型數據庫管理系統技術、應用與實例分析:SQL Server 2005
- AutoCAD 2012中文版繪圖設計高手速成
- Cloudera Administration Handbook
- Implementing Oracle API Platform Cloud Service
- 基于單片機的嵌入式工程開發詳解
- 悟透AutoCAD 2009案例自學手冊
- 基于Proteus的單片機應用技術
- Photoshop CS4數碼照片處理入門、進階與提高
- 計算機硬件技術基礎學習指導與練習