Hi,
I would like to eliminate some log messages going to /var/log/messages and would like to know the best way to do this. These messages are written every 5 minutes and don't seem too important to me but what do I know.
How can I turn these off/filter them out without affecting the proper functioning of my Network Analyzer?
I found another way to block rsyslog from logging those messages that may work for that version.
Add a config to /etc/rsyslog.d folder.
Call it nfcapd.conf
Put the following in it and restart rsyslog
[root@myhost rsyslog.d]# pwd
/etc/rsyslog.d
[root@myhost rsyslog.d]# cat nfcapd.conf
if $programname == 'nfcapd' then {
stop
}
[root@myhost rsyslog.d]# service rsyslog status
rsyslogd (pid 1664) is running...
[root@myhost rsyslog.d]# service rsyslog restart
Shutting down system logger: [ OK ]
Starting system logger: [ OK ]
Jan 24 12:32:39 myhost kernel: Kernel logging (proc) stopped.
Jan 24 12:32:39 myhost rsyslogd: [origin software="rsyslogd" swVersion="5.8.10" x-pid="1664" x-info="http://www.rsyslog.com"] exiting on signal 15.
Jan 24 12:32:39 myhost kernel: imklog 5.8.10, log source = /proc/kmsg started.
Jan 24 12:32:39 myhost rsyslogd: [origin software="rsyslogd" swVersion="5.8.10" x-pid="18516" x-info="http://www.rsyslog.com"] start
Jan 24 12:32:39 myhost rsyslogd: the last error occured in /etc/rsyslog.d/nfcapd.conf, line 1:"if $programname == 'nfcapd' then {"
Jan 24 12:32:39 myhost rsyslogd: warning: selector line without actions will be discarded
Jan 24 12:32:39 myhost rsyslogd-3000: unknown priority name "" [try http://www.rsyslog.com/e/3000 ]
Jan 24 12:32:39 myhost rsyslogd: the last error occured in /etc/rsyslog.d/nfcapd.conf, line 2:" stop"
Jan 24 12:32:39 myhost rsyslogd: warning: selector line without actions will be discarded
Jan 24 12:32:39 myhost rsyslogd-3000: unknown priority name "" [try http://www.rsyslog.com/e/3000 ]
Jan 24 12:32:39 myhost rsyslogd: the last error occured in /etc/rsyslog.d/nfcapd.conf, line 3:"}"
Jan 24 12:32:39 myhost rsyslogd: warning: selector line without actions will be discarded
I noticed another file in the directory that i thought might help me to figure this out but it still is very confusing to me. Perhaps someone else can look at it as a reference.