“Filebeat nginx log”的版本间的差异

来自linux中国网wiki
跳到导航 跳到搜索
第64行: 第64行:
  
 
[https://blog.51cto.com/michaelkang/2317953 filebeat 6.4.3 采集 nginx日志]
 
[https://blog.51cto.com/michaelkang/2317953 filebeat 6.4.3 采集 nginx日志]
 +
 +
 +
[http://www.javaobj.com/2020/05/nginx-logs/ 通过filebeat、logstash、rsyslog采集nginx日志的几种方式]

2021年4月28日 (三) 05:09的版本


ins and config

Download and install Filebeat



curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-7.12.0-amd64.deb
sudo dpkg -i filebeat-7.12.0-amd64.deb

Edit the configuration

Modify /etc/filebeat/filebeat.yml to set the connection information:

output.elasticsearch:
  hosts: ["<es_url>"]
  username: "elastic"
  password: "<password>"
setup.kibana:
  host: "<kibana_url>"

Where <password> is the password of the elastic user, <es_url> is the URL of Elasticsearch, and <kibana_url> is the URL of Kibana.

Enable and configure the nginx module

sudo filebeat modules enable nginx

Modify the settings in the /etc/filebeat/modules.d/nginx.yml file.

Start Filebeat

The setup command loads the Kibana dashboards. If the dashboards are already set up, omit this command.

sudo filebeat setup
sudo service filebeat start

Module status

Module status  右边的 check data 按键  -- > Nginx logs dashboard

systemctl daemon-reload

see also

https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-nginx.html

Filebeat配置module采集nginx日志

按月分割nginx访问日志-filebeat配置文件简介

ELK--filebeat nginx模块

filebeat收集nginx的json格式日志

filebeat 6.4.3 采集 nginx日志


通过filebeat、logstash、rsyslog采集nginx日志的几种方式