- Mastering Kibana 6.x
- Anurag Srivastava
- 266字
- 2021-07-16 18:20:11
Configuring Logstash to fetch data from the Apache log file
The Apache web server is widely used for serving different websites worldwide, and by monitoring this data, we can solve different issues in our web applications. However, if we try to monitor it by reading Apache log files, it will be quite difficult to get the exact issue, as we need to read the log file line by line. For these types of situations, Kibana is a very handy tool that can solve this problem if we can feed it with this data. Here, you are going to learn about the process of feeding data in Kibana. So, first of all, we need to configure Logstash to read Apache log files.
We have to create the Logstash configuration file (logs-apache.conf) under the /etc/logstash/conf.d/ location. In the Logstash configuration file, there are three sections: input, filter, and output. For now, we can use the input and output sections.
For Logstash input, we need to pass the Apache log file location and other details, such as the file path and file type. So here, in our example, we need to pass the file path as /var/log/apache2/access.log and the file type as apache-access. For the output section, we need to provide details such as Elasticsearch hosts, index, and document_type, as shown in the following screenshot:

In this way, we can configure Logstash to take inputs from Apache log files and output the data to the Elasticsearch server. In this setup, we are not going to configure the filter option, but we will cover that at a later stage.
- 大數(shù)據(jù)項(xiàng)目管理:從規(guī)劃到實(shí)現(xiàn)
- 空間機(jī)器人遙操作系統(tǒng)及控制
- Mastering Elastic Stack
- 網(wǎng)絡(luò)綜合布線設(shè)計(jì)與施工技術(shù)
- Mastering ServiceNow Scripting
- SMS 2003部署與操作深入指南
- 基于Proteus的單片機(jī)應(yīng)用技術(shù)
- AMK伺服控制系統(tǒng)原理及應(yīng)用
- 未來(lái)學(xué)徒:讀懂人工智能飛馳時(shí)代
- 貫通Java Web輕量級(jí)應(yīng)用開(kāi)發(fā)
- Windows 7來(lái)了
- 菜鳥(niǎo)起飛五筆打字高手
- JSP網(wǎng)絡(luò)開(kāi)發(fā)入門與實(shí)踐
- 人工智能:重塑個(gè)人、商業(yè)與社會(huì)
- 傳感器應(yīng)用技術(shù)