Sign inSign up

marshallasch/ups_monitor

By marshallasch

Updated almost 7 years ago

to monitor the UPS status and inform any devices that need to be shut down

Image
0

400

marshallasch/ups_monitor repository overview

The scripts MUST follow the naming pattern of [a-zA-Z0-9\-]+(\.sh)? or they will not be run.

There are no default scripts that are run when none are given.

Any changes to the config file will require a reboot of the container

The directory structure is:

/cyberpower /lowPower .... scripts /powerFail .... scripts pwrstatd.conf

Running the container

$ docker run \
	-d \
	--name ups \
	-e DBUSER=user \
	-e DBPASS=password \
	-e DBHOST=192.168.1.3 \
	-e DBPORT=8086 \  			# Default 8086
	-e DBNAME=ups \   			# Default 'ups'
	-e TIMING=5 \     			# Default 20s
	-v <config dir>:/cyberpower \
	--device /dev/usb/hiddev0 \
	--restart unless-stopped \
	marshallasch/ups
Parameters
ParameterFunction
-e DBUSERthe database user
-e DBPASSthe database password
-e DBHOSTthe database server
-e DBPORTthe database communication port
-e DBNAMEthe database name
-e TIMING=5the number of seconds between polling the UPS
-v /cyberpowerAll scripts to run are stored here
-device /dev/usb/hiddev0the serial device of the UPS

Tag summary

Content type

Image

Digest

Size

79.1 MB

Last updated

almost 7 years ago

docker pull marshallasch/ups_monitor