Search⌘ K
AI Features

Logging, Alerting, Monitoring, and Auditing

Explore the fundamental concepts of logging, alerting, monitoring, and auditing within DevOps. Understand how structured log messages aid in tracking system health, creating alerts for unusual behavior, implementing health checks, and auditing business events. This lesson helps you develop strategies for effective incident management and system monitoring to ensure reliable software delivery.

Overview

In this lesson, we will go through the structure of logs within a system. We will discuss time management, minimizing bugs, and completing health checks.

Log messages structure

Logs are entirely distinct aspects of knowing the health of a system. Errors are logged. Services and major subsystems starting and stopping should be logged. If you create a log, find means of reading that log (either as a dashboard or an alert). Document the mappings between the log and the feature that reads it. Log messages should be structured for ease of searching. Include a correlation identifier in the log messages, for example, order id. Logs should be structured in the form:

INFO, starting xxx.

INFO, finished xxx.

ERROR, failed xxx.

Don’t use errors for informational logs. Keep in mind that there might be other log levels used. For example, a log that used the level CRITICAL might not be spotted by a filter that's looking for ERROR. ...