Skip to content

Latest commit

 

History

History
53 lines (34 loc) · 775 Bytes

log-management.md

File metadata and controls

53 lines (34 loc) · 775 Bytes

Log management

logstash

Loki

logrotate

Syntax

/path/to/file.log {
    rotate 30
    daily
    compress
    missingok
    copytruncate
    dateext
}

journalctl

Provided by systemd

# Jump to the end of the log
journalctl -e
# Reverse to get newest messages first
journalctl -r
# Use the message catalog for explanatory text
journalctl -x
# Show kernel logs of previous boot
journalctl -k -b -1
# Tail the log of a service
journalctl -u SERVICENAME -f

Message catalog

Catalogs in /usr/lib/systemd/catalog/*.catalog