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

Have the possibility to change apcupsd-cgi connection port #1

Closed Gis70 closed 12 months ago

Gis70 commented 12 months ago

Hello,

First, thank you for this docker.

Would it be possible to add a variable to be able to set a different port for apcupsd-cgi ?

For example, i want to monitor an UPS on a NAS Synology port cannot be modifiyed and it is 3493.

Thx

bnhf commented 12 months ago

@Gis70

Would it be possible to add a variable to be able to set a different port for apcupsd-cgi ?

If I'm understanding your requirement correctly, you have an instance of apcupsd running on a Synology NAS that uses port 3493 -- is that correct? If so, and you want apcupsd-cgi to be able to communicate with it, you should be able to add :3493 to the hostname or IP address you're using in the existing UPSHOSTS environment variable.

For example in my stack below, if I needed to change the port to query for RaspberryPi4, I would use RaspberryPi4:3493. The same would be true if you're using the IP address instead.

screencapture-raspberrypi4-9000-2023-11-17-00_41_51

I've always used the default port 3551, so this is untested by me -- but it should work.

Gis70 commented 12 months ago

Thx, indeed, the argument seems to be passed, but i forget that my Synology use NUT as built in ups integration so it doesn't work unfortunately.