官术网_书友最值得收藏!

  • 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.

主站蜘蛛池模板: 满城县| 长垣县| 浠水县| 洛川县| 和顺县| 综艺| 呼和浩特市| 遂平县| 鄂托克前旗| 黄梅县| 濉溪县| 苏尼特右旗| 朝阳县| 洛川县| 嫩江县| 肇源县| 永登县| 兴国县| 佛坪县| 监利县| 温宿县| 定南县| 平舆县| 伊宁市| 阿巴嘎旗| 驻马店市| 阿瓦提县| 景谷| 江阴市| 凌云县| 丰宁| 调兵山市| 仙居县| 溆浦县| 开远市| 柏乡县| 秦皇岛市| 临猗县| 铁岭县| 海南省| 仲巴县|