页面“租车”与“Filebeat nginx log”之间的差异

来自linux中国网wiki
(页面间的差异)
跳到导航 跳到搜索
(创建页面,内容为“ 联运云 有个 30天 一天 30多块钱的 租车 有点吊 平时几天的 就神舟 一嗨喽”)
 
 
第1行: 第1行:
联运云 有个  30天 一天 30多块钱的 租车 有点吊
+
[[category:ops]]
  
  平时几天的 就神舟 一嗨喽
+
=ins and config=
 +
==Download and install Filebeat==
 +
<pre>
 +
 
 +
 
 +
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
 +
</pre>
 +
==Edit the configuration ==
 +
<pre>
 +
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.
 +
 
 +
</pre>
 +
 
 +
==Enable and configure the nginx module ==
 +
 
 +
<pre>
 +
sudo filebeat modules enable nginx
 +
 
 +
Modify the settings in the /etc/filebeat/modules.d/nginx.yml file.
 +
 
 +
</pre>
 +
 
 +
== Start Filebeat==
 +
 
 +
<pre>
 +
The setup command loads the Kibana dashboards. If the dashboards are already set up, omit this command.
 +
 
 +
sudo filebeat setup
 +
sudo service filebeat start
 +
</pre>
 +
 
 +
== Module status==
 +
<pre>
 +
Module status 右边的 check data 按键  -- > Nginx logs dashboard
 +
 
 +
</pre>
 +
systemctl daemon-reload
 +
 
 +
=see also=
 +
 
 +
https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-nginx.html
 +
 
 +
 
 +
[https://www.cnblogs.com/kuku0223/p/8317965.html ELK--filebeat nginx模块]

2021年4月27日 (二) 09:25的版本


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


ELK--filebeat nginx模块