The KAGAMI mark КАГАМИ
kagami.bg/academy · lesson · machine-readable viewVERIFIED 2026-10-01 · UPDATED 2026-10-01
IDENTITY
module
Minitech · Monitoring a Raspberry Pi 5 edge-AI setup (Hailo, Frigate, Whisper, robots) with Prometheus, Grafana and Alertmanager
series
Minitech (micro-tech skills)
level
Intermediate
duration
about 1 hour
prerequisites
Raspberry Pi 5 with 64-bit Raspberry Pi OS and sudo; Frigate 0.18 already running; Docker (for Grafana only); optional AI HAT+ (Hailo-8L 13 TOPS or Hailo-8 26 TOPS); optional Discord webhook
trust_label
VERIFIED 2026-10-01 (versions, commands, metric names and config keys checked against official docs and source code) · UPDATED 2026-10-01 · NOT TESTED live (no command was run on hardware by the author)
language
human view: bg · english edition: /en/academy/minitech/moduli/ (same file name)
next
Minitech index (no follow-up lesson yet)
PURPOSE

Teach a learner to observe a small edge-AI stack on one Raspberry Pi 5: host health (node_exporter), Frigate NVR (its built-in Prometheus endpoint), Hailo accelerator reachability (a textfile-collector metric), Wyoming faster-whisper and robots (blackbox_exporter TCP probes), dashboards in Grafana and Discord alerts through Alertmanager; and to apply GDPR basics when a camera watches people.

KEY CONCEPTS
COMMANDS / PATHS
CHECKLIST
NEXT MODULE

Minitech index: all lessons (https://kagami.bg/en/academy/minitech/)

SOURCES
TAGS
raspberry-pi-5monitoringprometheusgrafanaalertmanagerfrigatehailowhispergdpr
VERIFIED · 01.10.2026 UPDATED · 01.10.2026

Monitoring RPi5, Hailo-8, Frigate, Whisper and robots

A small AI setup on one Raspberry Pi 5 — a camera with object detection, a Hailo accelerator, speech recognition and a few robots — runs quietly until it stops. Here you instrument it so you can see temperature, load and what is not answering, and get a notification before anyone notices. The tools are Prometheus (collects), Grafana (draws) and Alertmanager (notifies). Cameras film people, so the lesson also has a section on personal data.

⏱ about 1 hour Intermediate Minitech Raspberry Pi 5 · monitoring · GDPR for cameras
Prometheus + node_exporter + blackbox_exporter🔒 local Grafana🔒 local Alertmanager🔒 local Frigate (NVR)🔒 local faster-whisper (speech to text)🔒 local Discord webhook (notifications)🌐 global
🔄
UPDATED · 01.10.2026 — what changed
Every claim has been checked against a primary source (see "Sources"). Corrected: the versions in the old commands were outdated — as of 01.10.2026 the latest are node_exporter 1.12.1, Prometheus 3.15.0 and Alertmanager 0.34.1; the command hailortcli measurement temperature does not exist (checked in the HailoRT 5.4.0 source) — replaced by a check with hailortcli fw-control identify; the custom "Frigate exporter" over MQTT is unnecessary — Frigate 0.18 has built-in Prometheus metrics at /api/metrics; Whisper over the Wyoming protocol is TCP, not HTTP — so the check uses blackbox_exporter; the old "Whisper latency" was a sleep(0.1) placeholder and the robot endpoint (/status on port 8554) is not documented — both removed; Alertmanager has built-in Discord support (discord_configs), so no third-party proxy is needed; the grafana/grafana-oss image is not updated after Grafana 12.4.0 — we use grafana/grafana; the "admin" password is no longer in the command; the Prometheus → Alertmanager link was missing — added; the "85 °C for Hailo" threshold had no source — removed. Removed for the public version: internal addresses, device names and user names — everything is replaced with <…>. Added: AI HAT+ (13 and 26 TOPS), a GDPR section for cameras, a 4-question quiz. Not run live for this lesson — hence no TESTED label.

01What you'll learn

02Before you start

⚠️
Not tested live
The commands are checked against the tools' documentation and source code, but were not run on a Raspberry Pi for this lesson. Where we are unsure, we mark it ⚠️. All addresses are placeholders — replace <pi-host>, <frigate-host> and <robot-host> with your own.

03Steps

  1. What we watch, and with what

    First pick the source of each signal. Why: the simplest method is the least fragile — so we do not write our own servers where a ready tool exists.

    WhatWhere the signal comes fromHow
    Raspberry Pi 5 — CPU, memory, disk, temperaturenode_exporterready-made tool
    Frigate — frames per second, detector speed, events, diskbuilt-in Prometheus endpoint /api/metricsno extra code
    Hailo — is the accelerator reachablehailortcli fw-control identifysmall script → textfile collector
    Whisper (Wyoming) — is the service answeringTCP connectionblackbox_exporter
    Robots — are they on the networkTCP connectionblackbox_exporter

    The chain is: sources → Prometheus (asks them every 15 seconds) → Grafana (dashboards) and Alertmanager (notifications).

    🌡️
    Why we watch temperature
    According to the Raspberry Pi documentation the Arm cores are progressively throttled between 80 and 85 °C, and at 85 °C both the cores and the GPU are throttled. An alert at 75 °C is our own choice — it gives you time to react before throttling.
  2. node_exporter: metrics for the Pi itself

    One shared login-less user for all services, then the archive and a systemd service. The textfile collector flag is needed in step 6.

    bash · node_exporter 1.12.1 (as of 01.10.2026)
    sudo useradd --system --no-create-home --shell /usr/sbin/nologin monitoring
    sudo mkdir -p /var/lib/node_exporter/textfile
    
    cd /tmp
    wget https://github.com/prometheus/node_exporter/releases/download/v1.12.1/node_exporter-1.12.1.linux-arm64.tar.gz
    tar xzf node_exporter-1.12.1.linux-arm64.tar.gz
    sudo cp node_exporter-1.12.1.linux-arm64/node_exporter /usr/local/bin/
    
    sudo tee /etc/systemd/system/node_exporter.service >/dev/null <<'EOF'
    [Unit]
    Description=Node Exporter
    After=network-online.target
    
    [Service]
    User=monitoring
    ExecStart=/usr/local/bin/node_exporter --collector.textfile.directory=/var/lib/node_exporter/textfile
    Restart=on-failure
    
    [Install]
    WantedBy=multi-user.target
    EOF
    
    sudo systemctl daemon-reload
    sudo systemctl enable --now node_exporter
    curl -s http://localhost:9100/metrics | head -n 5
    🔎
    Check the temperature metric name
    Names depend on the kernel. See which ones you have: curl -s localhost:9100/metrics | grep -E 'thermal_zone|hwmon_temp'. The alert rule below uses node_thermal_zone_temp — ⚠️ not verified on a Pi 5; if your name differs, change it.
  3. blackbox_exporter: Whisper and the robots

    The speech-to-text service (wyoming-faster-whisper, built on faster-whisper) speaks the Wyoming protocol — TCP with JSON lines and audio, not HTTP. Why this matters: a plain HTTP request to it is not an honest check. It is enough to see that the port accepts a connection — that is what the tcp_connect module of blackbox_exporter does; the same goes for the robots.

    bash · blackbox_exporter 0.28.0
    cd /tmp
    wget https://github.com/prometheus/blackbox_exporter/releases/download/v0.28.0/blackbox_exporter-0.28.0.linux-arm64.tar.gz
    tar xzf blackbox_exporter-0.28.0.linux-arm64.tar.gz
    sudo mkdir -p /etc/blackbox
    sudo cp blackbox_exporter-0.28.0.linux-arm64/blackbox_exporter /usr/local/bin/
    sudo cp blackbox_exporter-0.28.0.linux-arm64/blackbox.yml /etc/blackbox/

    The blackbox.yml in the archive includes a ready-made tcp_connect module (checked in the project's repository). The service is started in step 5.

  4. Prometheus and Alertmanager: install and services

    The same pattern: archive, binaries, systemd. We keep data and secrets off the command line.

    bash · Prometheus 3.15.0 and Alertmanager 0.34.1
    cd /tmp
    wget https://github.com/prometheus/prometheus/releases/download/v3.15.0/prometheus-3.15.0.linux-arm64.tar.gz
    wget https://github.com/prometheus/alertmanager/releases/download/v0.34.1/alertmanager-0.34.1.linux-arm64.tar.gz
    tar xzf prometheus-3.15.0.linux-arm64.tar.gz
    tar xzf alertmanager-0.34.1.linux-arm64.tar.gz
    
    sudo mkdir -p /etc/prometheus /var/lib/prometheus /etc/alertmanager /var/lib/alertmanager
    sudo cp prometheus-3.15.0.linux-arm64/{prometheus,promtool} /usr/local/bin/
    sudo cp alertmanager-0.34.1.linux-arm64/{alertmanager,amtool} /usr/local/bin/
    sudo chown -R monitoring: /var/lib/prometheus /var/lib/alertmanager
    ini · systemd: three services (each in its own file in /etc/systemd/system/)
    # prometheus.service
    [Unit]
    Description=Prometheus
    After=network-online.target
    [Service]
    User=monitoring
    ExecStart=/usr/local/bin/prometheus --config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path=/var/lib/prometheus
    Restart=on-failure
    [Install]
    WantedBy=multi-user.target
    
    # alertmanager.service
    [Unit]
    Description=Alertmanager
    After=network-online.target
    [Service]
    User=monitoring
    ExecStart=/usr/local/bin/alertmanager --config.file=/etc/alertmanager/alertmanager.yml --storage.path=/var/lib/alertmanager
    Restart=on-failure
    [Install]
    WantedBy=multi-user.target
    
    # blackbox_exporter.service
    [Unit]
    Description=Blackbox Exporter
    After=network-online.target
    [Service]
    User=monitoring
    ExecStart=/usr/local/bin/blackbox_exporter --config.file=/etc/blackbox/blackbox.yml
    Restart=on-failure
    [Install]
    WantedBy=multi-user.target

    You will start the services only in step 8, once the configurations are ready.

  5. Cameras and people: GDPR before recording

    Frigate detects people and cars, and recording is processing of personal data. Here is what the European Data Protection Board (EDPB) Guidelines 3/2019 on video devices say. This is not legal advice — for your case, ask a lawyer or your data protection authority.

    • The household exemption is narrow. If the camera covers public space, neighbours or employees, it does not apply and GDPR does.
    • Purpose and basis. Write down what you are monitoring for (e.g. protecting a property) and why less would not do. No clear purpose, no recording.
    • Sign — first layer. In a visible place before the area: that video surveillance is in use, who the controller is, the purpose, and where to read the rest (second layer).
    • Retention. EDPB: usually erase, ideally automatically, after a few days; beyond 72 hours you need stronger justification.
    • Minimisation. Switch off what is unnecessary (audio, zoom). Mask areas you do not need. Face recognition and licence-plate reading in Frigate 0.18 are separate, heavier processing — do not enable them without a separate assessment; per the EDPB, face recognition used to identify people is biometric data, a special category under Article 9 GDPR.
    • A data protection impact assessment (DPIA) is required for systematic monitoring of a publicly accessible area on a large scale (Art. 35(3)(c) GDPR).
    • Access. Frigate's internal port is never published to the internet.
    yaml · Frigate: short retention (keys from the Frigate 0.18 documentation; 3 days is our example)
    record:
      enabled: True
      continuous:
        days: 0
      motion:
        days: 0
      alerts:
        retain:
          days: 3
          mode: motion
      detections:
        retain:
          days: 3          # the default is 10 — so we set it explicitly
          mode: motion
    
    snapshots:
      retain:
        default: 3         # snapshots are kept separately from video; default 10 days

    Why all three: per the documentation, Frigate keeps video for "alerts" and "detections" separately (10 days each by default), and snapshots independently of video. If you set a period for only one of them, the others are kept longer. Frigate uses the largest of the matching retention periods.

    ⛔
    Voice is personal data too
    Recordings and transcripts of a speech service are personal data. Tell people you are recording, and do not keep audio longer than needed. In Discord notifications, put no names, pictures or transcripts — only the service name and its state.
  6. Hailo: a small script and the textfile collector

    No need for your own HTTP server. node_exporter reads *.prom files from a folder; the script writes 1 or 0 there depending on whether hailortcli fw-control identify sees the accelerator. The hailortcli command comes with the hailo-all package of Raspberry Pi OS.

    bash · /usr/local/bin/hailo_up.sh
    #!/bin/bash
    OUT=/var/lib/node_exporter/textfile/hailo.prom
    if hailortcli fw-control identify >/dev/null 2>&1; then V=1; else V=0; fi
    printf '# HELP hailo_up 1 if hailortcli can identify the accelerator\n# TYPE hailo_up gauge\nhailo_up %s\n' "$V" > "$OUT.tmp"
    mv "$OUT.tmp" "$OUT"
    ini · systemd: a timer every minute
    # hailo-up.service
    [Unit]
    Description=Write hailo_up metric
    [Service]
    Type=oneshot
    ExecStart=/usr/local/bin/hailo_up.sh
    
    # hailo-up.timer
    [Unit]
    Description=Run hailo_up every minute
    [Timer]
    OnCalendar=minutely
    [Install]
    WantedBy=timers.target

    After sudo chmod +x /usr/local/bin/hailo_up.sh and sudo systemctl enable --now hailo-up.timer the hailo_up metric appears in node_exporter.

    ⚠️
    Two things we did not verify
    1) Whether fw-control identify works while Frigate holds the accelerator. If not, watch Frigate's detector speed (frigate_detector_inference_speed_seconds) as the sign that all is well. 2) Whether the hailo-all package and the driver Frigate requires can coexist — follow the Frigate documentation. hailortcli has no separate temperature command; Frigate 0.18 shows NPU temperatures on its system-metrics page, but whether they also appear in /api/metrics (frigate_device_temperature) you must check on your installation.
  7. Prometheus configuration

    Three jobs: node_exporter, Frigate and the port checks. The alerting block is what connects Prometheus to Alertmanager — without it the rules are evaluated but no notification leaves.

    yaml · /etc/prometheus/prometheus.yml
    global:
      scrape_interval: 15s
      evaluation_interval: 15s
    
    alerting:
      alertmanagers:
        - static_configs:
            - targets: ['localhost:9093']
    
    rule_files:
      - /etc/prometheus/alerts.yml
    
    scrape_configs:
      - job_name: node
        static_configs:
          - targets: ['localhost:9100']
    
      - job_name: frigate
        metrics_path: /api/metrics
        static_configs:
          - targets: ['<frigate-host>:5000']   # Frigate's internal port; do not publish it
    
      - job_name: blackbox_tcp
        metrics_path: /probe
        params:
          module: [tcp_connect]
        static_configs:
          - targets:
              - '<pi-host>:10300'      # Whisper (Wyoming) - the default port of wyoming-faster-whisper
              - '<robot-host>:22'      # robot: the remote-login port is a simple "is it on the network" check
        relabel_configs:
          - source_labels: [__address__]
            target_label: __param_target
          - source_labels: [__param_target]
            target_label: instance
          - target_label: __address__
            replacement: localhost:9115

    The ports are the defaults from the tools' documentation (Prometheus 9090, node_exporter 9100, Alertmanager 9093, blackbox 9115, Frigate 5000, Wyoming Whisper 10300). Frigate documents the same example with metrics_path: "/api/metrics".

  8. Notifications: Alertmanager and Discord

    Alertmanager has built-in Discord support through discord_configs. We keep the webhook address in a separate file, not in the configuration.

    bash · the secret file
    sudo touch /etc/alertmanager/discord_webhook
    sudo chown monitoring: /etc/alertmanager/discord_webhook
    sudo chmod 600 /etc/alertmanager/discord_webhook
    sudoedit /etc/alertmanager/discord_webhook     # paste the webhook address, one line
    yaml · /etc/alertmanager/alertmanager.yml
    route:
      receiver: discord
      group_by: ['alertname']
      group_wait: 10s
      group_interval: 5m
      repeat_interval: 1h
    
    receivers:
      - name: discord
        discord_configs:
          - webhook_url_file: /etc/alertmanager/discord_webhook
            send_resolved: true

    The interval values are examples. The alert rules go in /etc/prometheus/alerts.yml:

    yaml · /etc/prometheus/alerts.yml
    groups:
      - name: edge_ai
        rules:
          - alert: TargetDown
            expr: up == 0
            for: 1m
            labels: {severity: critical}
            annotations:
              summary: "Not answering: {{ $labels.job }}"
    
          - alert: ProbeFailed
            expr: probe_success == 0
            for: 2m
            labels: {severity: critical}
            annotations:
              summary: "Port not accepting connections: {{ $labels.instance }}"
    
          - alert: HailoUnavailable
            expr: hailo_up == 0
            for: 2m
            labels: {severity: critical}
            annotations:
              summary: "The Hailo accelerator is not visible"
    
          - alert: CpuTemperatureHigh
            expr: node_thermal_zone_temp > 75
            for: 2m
            labels: {severity: warning}
            annotations:
              summary: "CPU temperature is {{ $value }} °C"
    
          - alert: MemoryHigh
            expr: (1 - node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes) * 100 > 85
            for: 5m
            labels: {severity: warning}
            annotations:
              summary: "Memory in use: {{ $value }} %"

    The thresholds (75 °C, 85 %) are examples — adjust them to what you see during calm operation.

  9. Start everything and check the configurations

    Syntax check first (both tools are in the archives), then start.

    bash · check and start
    promtool check config /etc/prometheus/prometheus.yml
    promtool check rules /etc/prometheus/alerts.yml
    amtool check-config /etc/alertmanager/alertmanager.yml
    
    sudo systemctl daemon-reload
    sudo systemctl enable --now prometheus alertmanager blackbox_exporter

    Open http://localhost:9090/targets — every job should be "UP". If Frigate is not "UP", check the address and whether /api/metrics answers from the same machine.

  10. Grafana: a health dashboard

    The grafana/grafana image is the recommended one for the open-source edition; the old grafana/grafana-oss is not updated after 12.4.0. We run it with --network=host — why: inside a container localhost is the container itself, not the Pi, and Grafana would not find Prometheus. Data lives in a named volume so you avoid folder-permission trouble.

    bash · Grafana
    docker run -d --name=grafana --network=host \
      -v grafana-data:/var/lib/grafana \
      grafana/grafana
    1. Open http://localhost:3000 (from another device, use the Pi's address on your internal network). The first sign-in is admin / admin; Grafana immediately asks for a new password — set one.
    2. Connections → Add new connection → Prometheus, address http://localhost:9090, save.
    3. Dashboards → New → Import, ID 1860 ("Node Exporter Full") — a ready-made dashboard for the Pi.
    4. Add your own panels: frigate_camera_fps, frigate_detection_fps, frigate_detector_inference_speed_seconds, frigate_camera_events, frigate_storage_used_bytes, hailo_up and probe_success (a Stat panel with values 1/0), plus a table of active alerts (ALERTS{alertstate="firing"}).
    5. When the dashboard is ready, also save it as JSON (Export) — you can restore it quickly after a reinstall.
    ⚠️
    Port 3000 is open to the network
    With --network=host Grafana listens on all interfaces. Keep it on the internal network only, or behind a VPN or a reverse proxy with sign-in. The Grafana 13 menus were not checked live — if screen names differ, see its documentation.
  11. Test an alert

    An alert you have not tested is not an alert. The safest way: stop the service you are checking and wait. Expected: after about two minutes ProbeFailed for the Whisper/robot ports (or TargetDown for Frigate) appears at http://localhost:9090/alerts and a Discord message arrives; after you start the service again a "resolved" message comes. If nothing arrives, check the alerting block in prometheus.yml and the permissions of the webhook file.

04Check

Checklist

Quiz

1. Where does Prometheus get metrics for Frigate 0.18?

2. Why is Whisper checked with tcp_connect rather than an HTTP request?

3. When does a Raspberry Pi start throttling its cores because of temperature (per its documentation)?

4. Beyond what retention period does the EDPB require stronger justification for stored video?

05What's next

06Sources

  1. Raspberry Pi: AI HAT+ — 13 and 26 TOPS, Hailo-8L and Hailo-8, PCIe connection; the hailo-all package and hailortcli fw-control identify (the documentation was read from its GitHub repository).
  2. Raspberry Pi: frequency and thermal management — throttling between 80 and 85 °C.
  3. Hailo-8 — up to 26 TOPS (vendor data).
  4. HailoRT (GitHub) 🔒 local — version 5.4.0; the list of hailortcli commands.
  5. Frigate: metrics — /api/metrics and the list of metrics; version 0.18.0, recording and retention, Hailo detector, installation and driver.
  6. Prometheus · node_exporter · Alertmanager · blackbox_exporter — versions and arm64 archives; the textfile collector; the tcp_connect module.
  7. Alertmanager: discord_config — webhook_url_file.
  8. Grafana in Docker — the grafana/grafana images; Prometheus data source; dashboard 1860 "Node Exporter Full".
  9. wyoming-faster-whisper 🔒 local — default port 10300; the Wyoming protocol (TCP, JSON lines + audio); faster-whisper — a reimplementation of OpenAI's Whisper.
  10. EDPB, Guidelines 3/2019 on video devices (version 2.0, 29 Jan 2020) — household exemption, sign, retention, DPIA; Bulgarian Commission for Personal Data Protection.