This is an old revision of the document!
$ logger -t postfix -p mail.info 'Message from postfix' $ logger -t kernel -p kern.emerg 'Kernel Panic'
$ systemctl -a | grep syslog $ less /etc/rsyslog.conf $ man rsyslog.conf
root@server:~# cat /etc/rsyslog.d/30-cisco.conf
local0.* -/var/log/cisco.log
root@server:~# touch /var/log/cisco.log debian# chown root:adm /var/log/cisco.log ubuntu# chown syslog:adm /var/log/cisco.log root@server:~# rsyslogd -N1 root@server:~# service rsyslog restart root@server:~# tail -f /var/log/cisco.log
root@server:~# cat /etc/rsyslog.conf
... module(load="imudp") input(type="imudp" port="514") ...
root@server:~# service rsyslog restart
# cat /etc/rsyslog.d/my.conf
... module(load="imfile") input(type="imfile" File="/var/log/openvpn/openvpn_status_bmstu.log" Tag="openvpn" Severity="info" Facility="local0") ... *.* @server.corp13.un
root@server:~# cat /etc/rsyslog.conf
... module(load="omprog") local0.* action(type="omprog" binary="/etc/script.sh") ...
root@server:~# service rsyslog restart
root@server:~# apt install logwatch root@server:~# /etc/cron.daily/00logwatch
# journalctl -ra # journalctl --no-pager # journalctl -o json # journalctl -o verbose # journalctl -f client3:~# journalctl -f | grep ansible-pull
# journalctl -ra -u postfix # journalctl -ra -p err # man systemd.journal-fields # journalctl SYSLOG_FACILITY=2
# man journald.conf # journalctl --disk-usage # journalctl --vacuum-size=1G
0 kernel messages 1 user-level messages 2 mail system 3 system daemons 4 security/authorization messages 5 messages generated internally by syslogd 6 line printer subsystem 7 network news subsystem 8 UUCP subsystem 9 clock daemon 10 security/authorization messages 11 FTP daemon 12 NTP subsystem 13 log audit 14 log alert 15 clock daemon (note 2) 16 local use 0 (local0) 17 local use 1 (local1) 18 local use 2 (local2) 19 local use 3 (local3) 20 local use 4 (local4) 21 local use 5 (local5) 22 local use 6 (local6) 23 local use 7 (local7)