Skip to content

Latest commit

 

History

History
75 lines (56 loc) · 2.58 KB

README.md

File metadata and controls

75 lines (56 loc) · 2.58 KB

Go Report Go Version License Version Docker Discord

shelly-alert-killswitch

Shelly Alert Killswitch is a simple service that allows you to turn off Shelly Plug S devices when an alert is triggered in Prometheus Alertmanager. This is useful for example when you have a fridge full of turtles, and you don't want them to freeze by accident.

Building

CGO_ENABLED=0 go build -o shelly-alert-killswitch github.com/topi314/shelly-alert-killswitch

Installation

You can either run the binary directly or use the provided Docker image.

Docker-Compose

services:
  shelly-alert-killswitch:
    image: ghcr.io/topi314/shelly-alert-killswitch:master
    container_name: shelly-alert-killswitch
    restart: unless-stopped
    volumes:
      - ./config.toml:/var/lib/shelly-alert-killswitch/config.toml
    ports:
      - "8080:8080"

Configuration

The exporters are configured via a TOML file. The default path is /var/lib/shelly-alert-killswitch/config.toml but you can change it with the --config flag.

[log]
level = "info"
format = "text"
add_source = false

[server]
listen_addr = ":80"

# Add your alertmanager webhook configurations here
#[[configs]]
#name = "example"
#endpoint = "/webhook"
#address = "hostname:port"
#insecure = true
#username = "user"
#password = "password"
#relay = 0
#labels = { name = "bla" }

License

Shelly Exporter is licensed under the Apache License 2.0.

Contributing

Contributions are always welcome! Just open a pull request or discussion and I will take a look at it.

Contact