1 把日志打到新的日志文件里面

#### RULES ####
ruleset(name="remote"){
action(type="omfile" file="/var/log/golang")
stop
}

input(type="imtcp" port="514" ruleset="remote")

这样通过tcp 514端口打过来的syslog会走 ruleset="remote"的规则,这个规则就是把日志打到/var/log/golang这个日志文件,然后停止

 

 

相关文章:

  • 2021-12-15
  • 2021-12-31
  • 2021-04-28
  • 2022-01-10
  • 2021-06-30
  • 2021-04-25
  • 2021-08-04
猜你喜欢
  • 2021-07-04
  • 2022-12-23
  • 2022-02-21
  • 2021-12-16
  • 2021-07-19
  • 2021-11-03
  • 2021-05-24
相关资源
相似解决方案