如何在syslog-ng中的标签上进行过滤,当它们在处理过程中似乎不可用时?
我很难debugging一个问题,我认为这可能是双重的 – 两个独立的程序出现问题。 主要的问题是,我在Ubuntu 14.04上将nginxlogging到系统日志中,如下所示: access_log syslog:server=unix:/dev/log,tag=nginx,facility=local7,severity=info combined 我希望能够过滤标记为nginx的消息,但没有这样的运气。 filter nginx { facility(local7) and tags("nginx") } 更改和,或工作,或只是删除标签部分,作为设施filter工作正常。 但是,标签filter不会。 所以,我想用loggertesting并设置一个基本的testing: template nginx { template("timestamp=${ISODATE} host=${HOST} tags=${TAGS} msgheader=${MSGHDR} ${MSG}\n"); template-escape(no); }; filter nginx { tags("nginx"); }; destination nginx { file("/tmp/nginx.log" template(nginx)); }; log { source(s_net); filter(nginx); destination(nginx); }; – $ logger -n localhost -P 10001 -t nginx […]