页面“Mtp on kcptun”与“Filebeat nginx log”之间的差异

来自linux中国网wiki
(页面间的差异)
跳到导航 跳到搜索
(创建页面,内容为“ =国外节点 安装 mtp and kcptun server = ==安装 mtp== <pre> bash <(wget -qO- https://git.io/mtg.sh) mtg 得到 国外节点的mtp info https://t.…”)
 
 
第1行: 第1行:
 +
[[category:ops]]
  
=国外节点 安装  mtp and kcptun server =
+
=ins and config=
 
+
==Download and install Filebeat==
==安装  mtp==  
 
 
<pre>
 
<pre>
bash <(wget -qO- https://git.io/mtg.sh)
 
mtg
 
  
得到 国外节点的mtp info 
 
  
https://t.me/proxy?port=15854&secret=ee579b292c6e87db4d0e1ac6dcb598b1d062696e672e636f6&server=109.182.27.193
+
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>
 
<pre>
 +
Modify /etc/filebeat/filebeat.yml to set the connection information:
  
==kcpturn server  ==
+
output.elasticsearch:
<pre>
+
  hosts: ["<es_url>"]
os init
+
  username: "elastic"
 +
  password: "<password>"
 +
setup.kibana:
 +
  host: "<kibana_url>"
  
ulimit -n 65535, or write it in ~/.bashrc.
+
Where <password> is the password of the elastic user, <es_url> is the URL of Elasticsearch, and <kibana_url> is the URL of Kibana.
  
Suggested sysctl.conf parameters for better handling of UDP packets:
+
</pre>
  
net.core.rmem_max=26214400
+
==Enable and configure the nginx module ==
net.core.rmem_default=26214400
 
net.core.wmem_max=26214400
 
net.core.wmem_default=26214400
 
net.core.netdev_max_backlog=2048
 
  
 +
<pre>
 +
sudo filebeat modules enable nginx
  
app install
+
Modify the settings in the /etc/filebeat/modules.d/nginx.yml file.
wget    https://github.com/xtaci/kcptun/releases/download/v20201126/kcptun-linux-amd64-20201126.tar.gz
 
  
 +
</pre>
  
wget  -c    https://github.com/xtaci/kcptun/releases/download/v20201126/kcptun-linux-386-20201126.tar.gz
+
== Start Filebeat==
  
./server_linux_386 -l :80 -t 127.0.0.1:15854 -key eller -mtu 1400 -sndwnd 2048 -rcvwnd 2048 -mode fast2  -sockbuf 16777217  2>&1 &</pre>
+
<pre>
 +
The setup command loads the Kibana dashboards. If the dashboards are already set up, omit this command.
  
= 国内节点 安装 kcptun client =
+
sudo filebeat setup
 +
sudo service filebeat start
 +
</pre>
  
  /root/kcptun/client_linux_amd64 -l :80 -r 107.182.27.193:80 -key eller -mtu 1400 -sndwnd 256 -rcvwnd 2048 -mode fast2 -conn 4  -sockbuf 16777217  2>&1 &
+
== Module status==
 +
<pre>
 +
Module status  右边的 check data 按键 -- > Nginx logs dashboard
  
 +
</pre>
 +
systemctl daemon-reload
  
最后用了国内节点的 mtp 如下
 
https://t.me/proxy?port=80&secret=ee579b292c6e87db4d0e1ac6dcb598b1d062696e672e636f6&server=110.231.144.243
 
 
=see also=
 
=see also=
https://github.com/xtaci/kcptun
+
 
 +
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模块