bnhf / apcupsd-admin-plus

Docker-based solution for monitoring APC UPS units, using apcupsd and apcupsd-cgi both in containers
15 stars 4 forks source link

running apcupsd on proxmox host with the rest in a docker lxc: Telegraf error #2

Closed lignicolos closed 2 months ago

lignicolos commented 2 months ago

I'm running apcupsd on my Proxmox host.

Docker is running in an LXC on Proxmox. The docker stack is running apcupsd-cgi, Influxdb, Telegraf, and Grafana with apcupsd-cgi pointed at my proxmox host IP:port and pulling data properly.

Telegraf fails with the error below. "2024-07-20T22:13:30Z E! [inputs.apcupsd] Error in plugin: dial tcp: address $UPS2: missing port in address"

I do not have UPS2 defined anywhere. I noticed the Telegraf.conf has multiple servers defined. I tried modifying this file but it is overwritten by the apcupsd-cgi everytime it starts.

servers = ["tcp://$UPS1", "tcp://$UPS2", "tcp://$UPS3", "tcp://$UPS4", "tcp://$UPS5", "tcp://$UPS6", "tcp://$UPS7", "tcp://$UPS8"]

apcupsd-cgi docker environment: environment:

telegraf docker environment: environment:

bnhf commented 2 months ago

@lignicolos

I'm not using all of the UPS devices defined globally either, six out of eight in my case. Try leaving the Docker compose as-is, but delete any UPSx values in the Portainer-Stacks Environment variables section that don't have values. For example in my case I only have UPS1 to UPS6 defined:

screenshot-raspberrypi4-2024 07 20-16_52_33