Monitoring and Logging for DevOps

Master the essentials of monitoring and logging in DevOps environments. This comprehensive course covers Prometheus for metrics collection, Grafana for visualization, and Loki for log aggregation. Through hands-on labs, you'll learn to set up monitoring infrastructure, configure exporters, create dashboards, write alerting rules, and analyze system logs - all crucial skills for maintaining reliable and observable systems.

DevOps

Introduction

Learn the foundations of metrics monitoring, visualization, log aggregation, and alert-rule evaluation through nine guided labs. You will run Prometheus, Node Exporter, Grafana, Loki, and Promtail in Docker, connect the components on local networks, and inspect the resulting metrics and logs through their web interfaces.

The course is organized as focused beginner exercises rather than one persistent production deployment. Each lab provides the starting services needed for its topic, allowing you to practice configuration files, queries, dashboards, and validation without first assembling an entire observability platform.

What You Will Learn

After completing this course, you will be able to:

  • Run Prometheus in Docker and use its web interface, status endpoints, and targets page to verify service health.
  • Write a Prometheus scrape configuration, mount it into a container, and reload changes through the lifecycle API.
  • Deploy Node Exporter on a Docker network and configure Prometheus to collect host CPU and other operating-system metrics.
  • Select and filter time series with PromQL, then apply range selectors and rate() to interpret counter data.
  • Connect Grafana to Prometheus and build a saved dashboard panel that calculates and visualizes CPU usage.
  • Configure and run a local single-node Loki service, then verify its readiness and startup behavior.
  • Configure Promtail to ship system log files to Loki and explore the collected entries with LogQL in Grafana.
  • Define a Prometheus CPU alert rule, load it into the server, generate test load, and observe inactive, pending, and firing states.

Who This Course Is For

This course is for beginners in DevOps, system administration, or SRE who want a practical introduction to the relationship between metrics, dashboards, logs, and alert rules. It is also useful for developers who need to understand how a small local observability stack collects and exposes operational data.

Prerequisites: You should be comfortable with basic Linux terminal navigation, editing YAML files, and reading commands. Introductory Docker knowledge—images, containers, ports, volumes, and networks—is helpful because every lab runs the observability tools in containers.

Learning environment: All nine labs use supplied Docker-capable Ubuntu 22.04 environments. You will work in the terminal and in local browser interfaces for Prometheus and Grafana; required sample services and preconfigured components are prepared within each lab.

Frequently Asked Questions

Do the nine labs build one monitoring stack that persists across the whole course?

No. The labs are separate guided environments, and several begin with the components required for that lesson already running. You still install or configure each major tool, but you should treat the course as a sequence of focused exercises rather than a single stack that survives from one lab to the next.

Does the alerting lab send email, chat, or pager notifications?

No. You create a Prometheus alert rule, generate CPU load, and observe the rule move through its evaluation states in the Prometheus UI. Configuring Alertmanager and an external notification receiver is outside this course.

Is the Loki setup suitable as a production architecture?

No. The lab uses a local single-node Loki configuration with authentication disabled and filesystem-based storage so beginners can study ingestion and queries. Production concerns such as durable distributed storage, multi-tenancy, authentication, retention design, and scaling are not covered.

Do I need hosted Grafana, cloud credentials, or other external accounts?

No. Prometheus, Grafana, Loki, Node Exporter, and Promtail run locally in the provided lab environments, and their interfaces use local URLs. No hosted observability subscription or cloud account is required.

Teacher

labby
Labby
Labby is the LabEx teacher.