Skip to content

Latest commit

 

History

History
79 lines (63 loc) · 3.18 KB

File metadata and controls

79 lines (63 loc) · 3.18 KB

🛠️ Troubleshooting - Lab 36: Energy Pack Ingestion and Threshold Detection

This guide captures the common issues and recovery steps documented for the lab.

Issue: Telegraf not collecting data

toor@ip-172-31-10-187:~$ telegraf --config /etc/telegraf/telegraf.conf --test
2026-04-12T13:57:48Z I! Loading config: /etc/telegraf/telegraf.conf
> cpu,cpu=cpu-total,host=ip-172-31-10-187 usage_idle=96.2015503875969,usage_user=1.937984496124031,usage_system=1.8604651162790697 1744466268000000000
> mem,host=ip-172-31-10-187 used_percent=23.948230127170916,total=4028628992i,available=3064027136i,used=964601856i 1744466268000000000
> energy_consumption,host=ip-172-31-10-187,location=datacenter,rack=A1 current=1.125,power_watts=135i,voltage=120i 1744466268000000000
  • Verify API token is correct
  • Check file permissions on /var/log/energy_data.log

Issue: No alerts generated

  • Verify thresholds are being exceeded by checking actual power_watts values in InfluxDB
toor@ip-172-31-10-187:~$ sudo journalctl -u kapacitor -n 100 --no-pager
Apr 12 19:25:07 ip-172-31-10-187 systemd[1]: Started kapacitor.service - Time series data processing engine.
Apr 12 19:25:31 ip-172-31-10-187 kapacitord[4552]: ts=2026-04-12T13:55:31.622Z lvl=info msg="opened service" service=httpd addr=:9092
Apr 12 19:26:20 ip-172-31-10-187 kapacitord[4552]: ts=2026-04-12T13:56:20.112Z lvl=info msg="alert triggered" task=energy_alert level=WARNING id=energy-threshold-alert
Apr 12 19:26:30 ip-172-31-10-187 kapacitord[4552]: ts=2026-04-12T13:56:30.109Z lvl=info msg="alert triggered" task=energy_alert level=CRITICAL id=energy-threshold-alert
Apr 12 19:26:40 ip-172-31-10-187 kapacitord[4552]: ts=2026-04-12T13:56:40.110Z lvl=info msg="alert triggered" task=energy_alert level=CRITICAL id=energy-threshold-alert
toor@ip-172-31-10-187:~$ kapacitor show energy_alert
ID: energy_alert
Error:
Template:
Type: batch
Status: enabled
Executing: true
Created: 12 Apr 26 13:55 UTC
Modified: 12 Apr 26 13:55 UTC
LastEnabled: 12 Apr 26 13:55 UTC
Databases Retention Policies: [{energy_metrics autogen}]

Issue: InfluxDB connection errors

toor@ip-172-31-10-187:~$ sudo systemctl status influxdb --no-pager
● influxdb.service - InfluxDB is an open-source, distributed, time series database
     Loaded: loaded (/lib/systemd/system/influxdb.service; enabled; preset: enabled)
     Active: active (running) since Sun 2026-04-12 19:22:32 IST; 5min ago
       Docs: https://docs.influxdata.com/influxdb/
   Main PID: 3716 (influxd)
      Tasks: 10 (limit: 4523)
     Memory: 71.2M
        CPU: 2.441s
     CGroup: /system.slice/influxdb.service
             └─3716 /usr/bin/influxd
toor@ip-172-31-10-187:~$ sudo ss -tlnp | grep 8086
LISTEN 0      4096       127.0.0.1:8086       0.0.0.0:*    users:(("influxd",pid=3716,fd=10))
LISTEN 0      4096           [::1]:8086          [::]:*    users:(("influxd",pid=3716,fd=11))
toor@ip-172-31-10-187:~$ echo "Check token permissions in InfluxDB UI:"
Check token permissions in InfluxDB UI:

toor@ip-172-31-10-187:~$ echo "http://localhost:8086"
http://localhost:8086