Copyright (c) 2026 MindMesh Academy. All rights reserved. This content is proprietary and may not be reproduced or distributed without permission.

5.5.2. Observability Stacks and Alerting

Modern Observability: Three Pillars:
PillarWhat It IsLinux Tools
MetricsNumerical measurements over time (CPU %, requests/sec)Prometheus + Node Exporter
LogsTimestamped text records of eventsjournald, rsyslog, ELK Stack
TracesRequest paths through distributed systemsJaeger, Zipkin
Prometheus + Grafana:
# Node Exporter — exposes Linux metrics for Prometheus
# Installed on every monitored node; listens on port 9100
systemctl enable --now node_exporter

# Prometheus scrapes metrics from exporters
# grafana visualizes metrics from Prometheus
# alertmanager handles alerting rules

# Check metrics endpoint
curl http://localhost:9100/metrics | grep node_cpu
Log Aggregation (ELK Stack):
  • Elasticsearch — stores and indexes log data
  • Logstash — processes and transforms log data
  • Kibana — visualizes logs from Elasticsearch
  • Filebeat — lightweight log shipper (installed on each node)
Alerting Concepts:
# Nagios/Icinga — traditional monitoring
# Alert conditions: check_disk, check_load, check_http
check_disk -w 20% -c 10% -p /   # Warn at 20% free, critical at 10% (bare numbers would mean MB, not %)

# systemd watchdog — restart failing services automatically
# In unit file:
# WatchdogSec=30s        — systemd kills/restarts if no keepalive for 30s
# Restart=on-failure     — restart if service exits non-zero

# SNMP — Simple Network Management Protocol
# For monitoring network devices and legacy systems
snmpwalk -v2c -c public 192.168.1.1 .1.3.6.1.2.1.1.1   # Get sysDescr

SNMP works two ways: polling, where the manager asks the device for values (GET, snmpwalk; UDP 161), and traps, where the device's agent sends an unsolicited notification to the manager as soon as an event occurs — link down, threshold crossed (UDP 162). A trap means the device detected the event and pushed it; polling is how the manager notices a device that has gone silent.

Threshold vs. predictive alerts: a threshold alert fires when a metric crosses a fixed value (disk > 90% used). A predictive alert extrapolates the current rate of change — Prometheus's predict_linear() — and fires when the trend will reach the limit within a window, so it can fire while plenty of space is still free if usage is growing fast.

SLIs, SLOs, and error budgets:
TermMeaningExample
SLI (indicator)The measured value0.4% of requests failed this month
SLO (objective)The internal target for that SLIError rate stays below 1%
SLA (agreement)The contractual promise to customers, with penaltiesService credit if availability falls below 99.5%

The error budget is the unreliability an SLO allows: (1 − SLO) × period. A 99.95% availability SLO over a 30-day month (43,200 minutes) allows 0.0005 × 43,200 = 21.6 minutes of downtime. While budget remains, the team can keep shipping changes; once it is spent, the usual policy is to freeze risky releases and put engineering effort into reliability until the service is back within its objective — not to lower the SLO to fit the outage.

⚠️ Exam Trap: A high load average alone doesn't identify the cause — you need to distinguish CPU saturation (%usr and %sys in mpstat) from I/O wait (%iowait). vmstat column wa shows the percentage of time CPUs are idle waiting for I/O. High wa with low us/sy means I/O is the bottleneck, not CPU — adding more CPUs won't help.

Reflection Question: uptime shows a load average of 24 on a 4-core server. top shows %iowait at 85% and CPU %us at 5%. What is the bottleneck and what diagnostic tools would you use next?

See how it connects
Alvin Varughese
Written byAlvin Varughese
Founder•20 professional certifications