Giter Club home page Giter Club logo

docker-nut-upsd's Introduction

Network UPS Tools server

Docker image for Network UPS Tools server and Shoutrrr integration for alert

Usage

This image provides a complete UPS monitoring service (USB driver only).

Start the container:

# docker run \
	--name nut-upsd \
	--detach \
	--publish 3493:3493 \
	--device /dev/bus/usb/xxx/yyy \
	--env SHUTDOWN_CMD="my-shutdown-command-from-container" \
	geoholz/nut-upsd-shoutrrr:0.1.2

or via compose file :

version: "3.6"
services:
  nutups-shoutrrr:
    container_name: "nutups-shoutrrr"
    devices:
      - "/dev/bus/usb/00X/00X:/dev/bus/usb/00X/00X"
    environment:
      - "API_PASSWORD=MySecret"
      - "UPS_NAME=ups"
      - "UPS_DESC=UPS"
      - "UPS_DRIVER=usbhid-ups"
      - "UPS_PORT=auto"
      - "ADMIN_PASSWORD="
      - "SHUTDOWN_CMD=echo 'System shutdown not configured!'"
      - "NOTIFY_URL=gotify://GOTIFY_URL:443/TOKEN/?title=UPS-Alert&priority=1"
    image: "geoholz/nut-upsd-shoutrrr:0.1.2"
    ports:v
      - "3493:3493/tcp"
    restart: "always"

Auto configuration via environment variables

This image supports customization via environment variables.

NOTIFY_URL

Shoutrr URL for alert, see https://containrrr.dev/shoutrrr/v0.8/services/overview/

UPS_NAME

Default value: ups

The name of the UPS.

UPS_DESC

Default value: Eaton 5SC

This allows you to set a brief description that upsd will provide to clients that ask for a list of connected equipment.

UPS_DRIVER

Default value: usbhid-ups

This specifies which program will be monitoring this UPS.

UPS_PORT

Default vaue: auto

This is the serial port where the UPS is connected.

API_USER

Default vaue: upsmon

This is the username used for communication between upsmon and upsd processes.

API_PASSWORD

Default vaue: secret

This is the password for the upsmon user.

SHUTDOWN_CMD

Default vaue: echo 'System shutdown not configured!'

This is the command upsmon will run when the system needs to be brought down. The command will be run from inside the container.

docker-nut-upsd's People

Contributors

geoholz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.