In Centos 7, I am trying to filter out ie to stop, certain messages being written to a log file. I was successful in stopping the following text being stored in /var/log/messages:
Code: Select all
Jan 27 09:56:05 localhost systemd: Removed slice User Slice of asterisk
Code: Select all
if $programname == "systemd" and ($msg contains "Removed slice User Slice" ) then stop
Code: Select all
systemctl restart rsyslog
Code: Select all
Jan 27 12:59:01 localhost CROND[24341]: (asterisk) CMD ([ -x /var/www/html/admin/modules/dashboard/scheduler.php ] && /var/www/html/admin/modules/dashboard/scheduler.php)
Code: Select all
# if $programname == "crond" and ($msg contains "\/var\/www\/html\/admin\/modules\/dashboard\/scheduler") then stop
# if $programname == "asterisk" and ($msg contains "\/var\/www\/html\/admin\/modules\/dashboard\/scheduler") then stop
# if $programname == "asterisk" and ($msg regex "dashboard.*scheduler") then stop
No clues in /var/log/messages or from running: journalctl -xe
Any ideas out there
Thanks