Tagged

Log guides

Hands-on guides that cover Log. Every command is run and verified on a live server before it is published.

Guide

How Linux Logging Works: journald and rsyslog

Linux logging on Ubuntu 24.04, destination-first: one journalctl query finds the failing request, make the journal persistent, then learn journald and rsyslog.

9 min read
Guide

Structured Logging and Log Rotation on Linux

Emit structured logging as JSON and query it with jq on Ubuntu 24.04, then rotate the file with logrotate and cap the journal so neither grows without bound.

6 min read
Guide

Shipping Logs to a Central Server with rsyslog

A hands-on guide to shipping logs to a central rsyslog collector over TCP on Ubuntu 24.04, then reading the line back from the store to prove it arrived.

6 min read
Guide

Querying Logs and Log Alerting on Linux

Query the journal and JSON logs with journalctl and jq, then build log alerting that fires on an error threshold and stays quiet otherwise, tested on Ubuntu 24.04.

7 min read
Guide

Log Retention, Compliance and DPDP Basics

Set a log retention policy on Ubuntu 24.04, mask personal data for DPDP, lock down file permissions, and make an audit trail tamper-evident with append-only.

7 min read
Guide

Reading Logs With journalctl

When a service misbehaves, its logs live in the journal, not a text file. Read one service with journalctl, follow the systemd logs live, and filter by time.

6 min read
Guide

Logging and Observability

Read docker logs from a running stack, cap them with json-file rotation so they cannot fill the disk, and use docker stats and inspect to see inside.

6 min read
Guide

Monitoring and Slow Queries

Turn on the MariaDB slow query log, run a query slow enough to be caught, read the entry, then use the process list and status counters to find what to tune.

9 min read