<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans-CN">
	<id>https://wiki.linuxsa.org/index.php?action=history&amp;feed=atom&amp;title=Filebeat_nginx_log</id>
	<title>Filebeat nginx log - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.linuxsa.org/index.php?action=history&amp;feed=atom&amp;title=Filebeat_nginx_log"/>
	<link rel="alternate" type="text/html" href="https://wiki.linuxsa.org/index.php?title=Filebeat_nginx_log&amp;action=history"/>
	<updated>2026-04-17T16:08:21Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://wiki.linuxsa.org/index.php?title=Filebeat_nginx_log&amp;diff=379&amp;oldid=prev</id>
		<title>Evan：​/* see also */</title>
		<link rel="alternate" type="text/html" href="https://wiki.linuxsa.org/index.php?title=Filebeat_nginx_log&amp;diff=379&amp;oldid=prev"/>
		<updated>2021-05-23T14:25:49Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;see also&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[category:ops]]&lt;br /&gt;
&lt;br /&gt;
=ins and config=&lt;br /&gt;
==Download and install Filebeat==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-7.12.0-amd64.deb&lt;br /&gt;
sudo dpkg -i filebeat-7.12.0-amd64.deb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Edit the configuration ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Modify /etc/filebeat/filebeat.yml to set the connection information:&lt;br /&gt;
&lt;br /&gt;
output.elasticsearch:&lt;br /&gt;
  hosts: [&amp;quot;&amp;lt;es_url&amp;gt;&amp;quot;]&lt;br /&gt;
  username: &amp;quot;elastic&amp;quot;&lt;br /&gt;
  password: &amp;quot;&amp;lt;password&amp;gt;&amp;quot;&lt;br /&gt;
setup.kibana:&lt;br /&gt;
  host: &amp;quot;&amp;lt;kibana_url&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#可能要加这个配置&lt;br /&gt;
setup.ilm.overwrite: true&lt;br /&gt;
&lt;br /&gt;
#type: log 那一节 &lt;br /&gt;
  enabled: true&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;password&amp;gt; is the password of the elastic user, &amp;lt;es_url&amp;gt; is the URL of Elasticsearch, and &amp;lt;kibana_url&amp;gt; is the URL of Kibana.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Enable and configure the nginx module ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo filebeat modules enable nginx&lt;br /&gt;
&lt;br /&gt;
Modify the settings in the /etc/filebeat/modules.d/nginx.yml file.&lt;br /&gt;
&lt;br /&gt;
可能要打开 填写这个目录 &lt;br /&gt;
&lt;br /&gt;
vim /etc/filebeat/modules.d/nginx.yml&lt;br /&gt;
   #var.paths:&lt;br /&gt;
    var.paths: [&amp;quot;/var/log/nginx/error.log*&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Start Filebeat==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
The setup command loads the Kibana dashboards. If the dashboards are already set up, omit this command.&lt;br /&gt;
&lt;br /&gt;
sudo filebeat setup&lt;br /&gt;
sudo service filebeat start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Module status==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Module status  右边的 check data 按键  -- &amp;gt; Nginx logs dashboard&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
systemctl daemon-reload&lt;br /&gt;
&lt;br /&gt;
=see also=&lt;br /&gt;
[https://gist.github.com/Friz-zy/0103f68a522758f05163544c3e9017fd nginx_custom_log_with_elk_filebeat.conf]&lt;br /&gt;
&lt;br /&gt;
[https://blog.csdn.net/qq_28834355/article/details/108261508  Filebeat配置module采集nginx日志]&lt;br /&gt;
&lt;br /&gt;
https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-nginx.html&lt;br /&gt;
&lt;br /&gt;
[https://blog.csdn.net/qq_28834355/article/details/108261508  Filebeat配置module采集nginx日志]&lt;br /&gt;
&lt;br /&gt;
[https://ngx.hk/2017/12/18/%E6%8C%89%E6%9C%88%E5%88%86%E5%89%B2nginx%E8%AE%BF%E9%97%AE%E6%97%A5%E5%BF%97-filebeat%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6%E7%AE%80%E4%BB%8B.html 按月分割nginx访问日志-filebeat配置文件简介]&lt;br /&gt;
&lt;br /&gt;
[https://www.cnblogs.com/kuku0223/p/8317965.html ELK--filebeat nginx模块]&lt;br /&gt;
&lt;br /&gt;
[https://www.cnblogs.com/sky-cheng/p/11187534.html  filebeat收集nginx的json格式日志 ]&lt;br /&gt;
&lt;br /&gt;
[https://blog.51cto.com/michaelkang/2317953 filebeat 6.4.3 采集 nginx日志]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://www.javaobj.com/2020/05/nginx-logs/ 通过filebeat、logstash、rsyslog采集nginx日志的几种方式]&lt;/div&gt;</summary>
		<author><name>Evan</name></author>
	</entry>
</feed>