作者:arthur | 来源:互联网 | 2023-01-09 14:31
文章转载自:https:blog.csdn.netUbuntuToucharticledetails106813223总结:nginx配置,192.168.0.5usernginx
文章转载自:https://blog.csdn.net/UbuntuTouch/article/details/106813223
总结:
nginx配置,192.168.0.5
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
stream {
upstream stream_backend {
server 192.168.0.4:5044;
server 192.168.0.3:5044;
}
server {
listen 12345;
proxy_pass stream_backend;
}
}
beats输出配置
形式
output:
logstash.hosts: ["loadbalancer"]
在本例中的配置
output:
logstash.hosts: ["192.168.0.5:12345"]
logstash1配置,ip是192.168.0.3
input {
beats {
port => 5044
}
}
output {
stdout {
codec => dots
}
}
logstash1配置,ip是192.168.0.4
input {
beats {
port => 5044
}
}
output {
stdout {
codec => dots # 如果有数据,我们直接显示 dot,也就是点
}
}