Nginx不会重新连接到syslog服务器

时间:2018-08-07 15:50:55

标签: nginx udp logstash syslog

我的nginx配置:

http {
  resolver 172.20.0.10 valid=5s;

  log_format upstream '$remote_addr - $remote_user [$time_local] "$host" "$request" $status $bytes_sent $upstream_addr "$http_referer" "$http_user_agent"';

  access_log /var/log/nginx/access.log upstream;
  error_log /var/log/nginx/error.log notice;
  access_log syslog:server=logstash.monitoring.svc.cluster.local:4550,tag=monitoring_nginx_access upstream;
  error_log syslog:server=logstash.monitoring.svc.cluster.local:4550,tag=monitoring_nginx_error notice;
  ...
}

我的Nginx和Logstash在kubernetes中运行。重新启动logstash时,nginx不会重新连接到logstash syslog端点。

是否有可能将nginx配置为重新连接?还是真的需要为此重启Nginx?

0 个答案:

没有答案