2021. 11. 9. 10:16

auth.log에 cron 관련 로그를 filter 하는 방법입니다.

336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

안녕하세요.
Cron에서 분단위로 돌리는 작업이 있는데요. 해당 로그가 auth.log에 매분 쌓이다 보니,
로그 분석할때 힘들어서, 아예 filter를 걸어서 제거 하는 방식으로 처리 했습니다.

https://unix.stackexchange.com/questions/139323/dont-log-cron-events-in-auth-log

 

don't log cron events in auth.log

In my /etc/rsyslog.conf, I have the following line to log the auth facility into /var/log/auth.log: auth,authpriv.* /var/log/auth.log but the file is flooded with cron logs, such as the...

unix.stackexchange.com

 

이런 방식으로 msg filter를 걸수 있네요.

해당 conf 파일 수정은 아래와 같고, 수정 후 restart 해줘야 합니다.

pi@raspberrypi:/var/log $ sudo nano /etc/rsyslog.conf
-->수정 처리.
pi@raspberrypi:/var/log $ sudo service rsyslog restart

감사 합니다.