authentication - 过滤系统日志 Busybox 消息
问题描述
我正在尝试设置 BusyBox 系统日志以将消息发送到远程系统日志服务器。我更改了 syslog 配置文件 /etc/syslog-startup.conf.busybox,如下所示:
DESTINATION=remote # log destinations (buffer file remote)
#LOGFILE=/var/log/messages # where to log (file)
REMOTE=192.168.8.166:514 # where to log (syslog remote)
REDUCE=no # reduce-size logging
DROPDUPLICATES=no # whether to drop duplicate log entries
#ROTATESIZE=0 # rotate log if grown beyond X [kByte]
#ROTATEGENS=3 # keep X generations of rotated logs
BUFFERSIZE=64 # size of circular buffer [kByte]
FOREGROUND=no # run in foreground (don't use!)
#LOGLEVEL=5 # local log level (between 1 and 8)
通过这样的配置,系统成功地将日志消息发送到远程 syslog 服务器。我想只向远程系统日志服务器发送有关用户登录和注销的消息,并丢弃所有其他类型的日志。我尝试添加:
authpriv.notice @192.168.8.166:514
或者:
:msg, contains, "login" ~
但它不起作用。我认为这应该是可能的,但我真的不知道如何编辑该文件以过滤身份验证消息以发送到服务器。谢谢
解决方案
推荐阅读
- python - 在 Python 中将平均值、中值和标准差值添加为新的数组列
- c - 带 strtok 的多维数组
- python - 使用带有半结构化数据的 Python,如何根据前一行中遇到的文本添加列值
- objective-c - 使用 KeyChainItemWrapper 添加钥匙串项时使用的正确标识符是什么?
- sql-server - 在 postgresSQL 中使用 sql 查询(如 CROSSTAB)创建数据透视表
- pg-promise - pg-promise 会丢弃吗?
- html - 视频周围的 iFrame - 视频嵌入错误(自己的托管)
- arduino - 字符串末尾的额外“null”
- java - 使用 PDFBOX 拆分 pdf 文件会创建大尺寸文件
- postgresql - 有没有办法在 psql 或命令行中检查已经预加载的库?