Module 15 - Prometheus & Grafana

Lab 1: Install node_exporter and Collect System Metrics

  • How do you install node_exporter on a Linux server?

  • How do you run node_exporter on port 9100?

  • How do you add the node_exporter target to prometheus.yml?

  • How do you restart Prometheus and query the collected metrics?


Lab 2: Import a Pre-Built Grafana Dashboard

  • How do you access Grafana dashboards on grafana.com?

  • How do you import the Node Exporter Full dashboard (ID: 1860)?

  • How do you observe CPU, memory, disk, and network monitoring panels?


Lab 3: Install Alertmanager

  • How do you install Alertmanager?

  • How do you configure an email or Slack receiver?

  • How do you connect Alertmanager to Prometheus?

  • How do you test sending a dummy alert?


Lab 4: Create Custom Prometheus Alerts

  • How do you create an alerting rule file named alerts.yml?

  • How do you reference the alerts file inside prometheus.yml?

  • How do you restart Prometheus to load the new rules?

  • How do you view active/inactive alerts in the Prometheus UI?


Lab 5: Create a Full Monitoring Stack Using Docker Compose

  • How do you create a docker-compose.yml containing:

    • Prometheus

    • Node Exporter

    • Grafana

    • Alertmanager

  • How do you start all services using Docker Compose?


Lab 6: Monitor an Nginx Server

  • How do you install Nginx?

  • How do you install the nginx-prometheus-exporter?

  • How do you add the exporter to Prometheus targets?

  • How do you create Grafana visualizations for:

    • Requests per second

    • 4xx/5xx errors


Lab 7: Monitor a Multi-Node Environment

  • How do you create two Linux VMs for monitoring?

  • How do you install node_exporter on each VM?

  • How do you add both servers as Prometheus targets?

  • How do you create a dashboard row in Grafana for each node?


Lab 8: Create Custom Grafana Alerts

  • How do you create a Grafana alert for high CPU usage using Prometheus as the data source?

  • How do you configure an email alert channel in Grafana?

  • How do you intentionally trigger the alert to test notifications?


Lab 9: Explore PromQL Queries

  • How do you run PromQL queries for:

    • CPU usage trend

    • Memory usage

    • Disk I/O

    • Network throughput

  • How do you interpret results in Prometheus or Grafana?


Lab 10: Backup and Restore Grafana Dashboards

  • How do you export a Grafana dashboard as JSON?

  • How do you delete a dashboard?

  • How do you import the JSON file to restore the dashboard?

Last updated