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

来自linux中国网wiki
(页面间的差异)
跳到导航 跳到搜索
 
 
第1行: 第1行:
[[category:ops]] [[category:mtp]]
+
[[category:ops]]
=国外节点 安装  mtp and  kcptun server =
 
  
==安装  mtp==  
+
=ins and config=
 +
==Download and install Filebeat==
 
<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>
 
</pre>
 
+
==Edit the configuration ==
==kcpturn server  ==
 
 
<pre>
 
<pre>
os init
+
Modify /etc/filebeat/filebeat.yml to set the connection information:
  
ulimit -n 65535, or write it in ~/.bashrc.
+
output.elasticsearch:
 +
  hosts: ["<es_url>"]
 +
  username: "elastic"
 +
  password: "<password>"
 +
setup.kibana:
 +
  host: "<kibana_url>"
  
Suggested sysctl.conf parameters for better handling of UDP packets:
+
Where <password> is the password of the elastic user, <es_url> is the URL of Elasticsearch, and <kibana_url> is the URL of Kibana.
  
net.core.rmem_max=26214400
+
</pre>
net.core.rmem_default=26214400
 
net.core.wmem_max=26214400
 
net.core.wmem_default=26214400
 
net.core.netdev_max_backlog=2048
 
  
 +
==Enable and configure the nginx module ==
  
app install
+
<pre>
wget    https://github.com/xtaci/kcptun/releases/download/v20201126/kcptun-linux-amd64-20201126.tar.gz
+
sudo filebeat modules enable nginx
  
 +
Modify the settings in the /etc/filebeat/modules.d/nginx.yml file.
  
wget  -c    https://github.com/xtaci/kcptun/releases/download/v20201126/kcptun-linux-386-20201126.tar.gz
+
</pre>
  
./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>
+
== Start Filebeat==
  
= 国内节点 安装 kcptun client =
+
<pre>
 +
The setup command loads the Kibana dashboards. If the dashboards are already set up, omit this command.
  
/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 &
+
sudo filebeat setup
 +
sudo service filebeat start
 +
</pre>
  
 +
== Module status==
 +
<pre>
 +
Module status  右边的 check data 按键  -- > Nginx logs dashboard
  
最后用了国内节点的 mtp 如下
+
</pre>
https://t.me/proxy?port=80&secret=ee579b292c6e87db4d0e1ac6dcb598b1d062696e672e636f6&server=110.231.144.243
+
systemctl daemon-reload
=trouble shooting=
 
<pre>
 
./server_linux_amd64
 
-bash: ./server_linux_amd64: cannot execute binary file: Exec format error
 
  
uname -a
+
=see also=
Linux vibrant-pipe-1.localdomain 4.19.0-5-686-pae #1 SMP Debian 4.19.37-5+deb10u2 (2019-08-08) i686 GNU/Linux
 
root@vibrant-pipe-1:/data/apps#
 
  
 +
https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-nginx.html
  
领导搞了个 32 bit机子 
 
</pre>
 
  
=see also=
+
[https://www.cnblogs.com/kuku0223/p/8317965.html ELK--filebeat nginx模块]
https://github.com/xtaci/kcptun
 

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模块