Sign inSign up

thecatlady/qnap-pushover

By thecatlady

•Updated over 4 years ago

Pushover notifications for QNAP NAS system events 🔔

Image
2

10K+

thecatlady/qnap-pushover repository overview

⁠qnap-pushover 🔔

Image Size Last Commit Build Status
Python Code Quality License
Become a GitHub Sponsor

Pushover⁠ notifications for QNAP⁠ NAS system events

⁠Usage

Docker images are available from both GitHub Container Registry (GHCR)⁠ and Docker Hub⁠.

If you would prefer to pull from GHCR, simply replace thecatlady/qnap-pushover with ghcr.io/thecatlady/qnap-pushover in the examples below.

Add the following volume and service definitions to a docker-compose.yml file:

volumes:
  qnap-pushover:
services:
  qnap-pushover:
    image: thecatlady/qnap-pushover
    container_name: qnap-pushover
    environment:
      - TZ=America/New_York #optional
      - LOG_LEVEL=WARN #optional
      - NOTIFY_LEVEL=WARN #optional
      - NOTIFY_ONLY= #optional
      - POLL_INTERVAL=10 #optional
      - INCLUDE= #optional
      - EXCLUDE= #optional
      - TESTING_MODE=false #optional
      - PUSHOVER_TOKEN=<Pushover application API token>
      - PUSHOVER_RECIPIENT=<Pushover user and/or group key(s)>
    volumes:
      - qnap-pushover:/data
      - /etc/logs/event.log:/event.log:ro
    restart: always

Then, run the following command from the directory containing your docker-compose.yml file:

docker-compose up -d
⁠Docker CLI

Run the following command to create the required named volume:

docker volume create qnap-pushover

Then, run the following command to create the container:

docker run -d \
  --name=qnap-pushover \
  -e TZ=America/New_York `#optional` \
  -e LOG_LEVEL=WARN `#optional` \
  -e NOTIFY_LEVEL=WARN `#optional` \
  -e NOTIFY_ONLY= `#optional` \
  -e POLL_INTERVAL=10 `#optional` \
  -e INCLUDE= `#optional` \
  -e EXCLUDE= `#optional` \
  -e TESTING_MODE=false `#optional` \
  -e PUSHOVER_TOKEN=<Pushover application API token> \
  -e PUSHOVER_RECIPIENT=<Pushover user and/or group key(s)> \
  -v qnap-pushover:/data \
  -v /etc/logs/event.log:/event.log:ro \
  --restart always \
  thecatlady/qnap-pushover

⁠Updating

The process to update the container when a new image is available is dependent on how you set it up initially.

⁠Docker Compose

Run the following commands from the directory containing your docker-compose.yml file:

docker-compose pull qnap-pushover
docker-compose up -d
docker image prune
⁠Docker CLI

Run the commands below, followed by your original docker run command:

docker stop qnap-pushover
docker rm qnap-pushover
docker pull thecatlady/qnap-pushover
docker image prune

⁠Parameters

The container image is configured using the following parameters passed at runtime:

ParameterFunctionDefault ValueRequired?
-e TZ=TZ database name⁠ of system time zone; e.g., America/New_YorkEtc/UTCno
-e LOG_LEVEL=Container logging level; DEBUG < INFO < WARNING < ERROR < CRITICALWARNINGno
-e NOTIFY_LEVEL=Minimum system event type to generate a notification; INFO < WARNING < ERRORWARNINGno
-e NOTIFY_ONLY=Set of system event types for which to generate a notification (comma-delimited), e.g. INFO,ERROR
(Value is ignored if NOTIFY_LEVEL is also set)
no
-e POLL_INTERVAL=Poll interval in seconds10no
-e INCLUDE=List of keywords which must be present in the event description to trigger a notification (comma-delimited)no
-e EXCLUDE=List of keywords which must not be present in the event description to trigger a notification (comma-delimited)no
-e TESTING_MODE=Testing mode (true or false); if set to true, will re-queue the last 10 system log events at every container start and result in duplicate notificationsfalseno
-e PUSHOVER_TOKEN=Pushover application API token⁠; e.g., azGDORePK8gMaC0QOYAMyEEuzJnyUiyes
-e PUSHOVER_RECIPIENT=Pushover user and/or group key(s)⁠; e.g., uQiRzpo4DXghDmr9QzzfQu27cmVRsG or gznej3rKEVAvPUxu9vvNnqpmZpokzF (up to 50, comma-delimited)yes
-v qnap-pushover:/dataContainer data volumeyes
-v /etc/logs/event.log:/event.log:roQNAP event logs (mounted as read-only)yes
--restartContainer restart policy⁠ (always or unless-stopped recommended)nono

⁠Building Locally

If you would like to make modifications to the code, you can build the Docker image yourself instead of pulling the pre-built image available from GitHub Container Registry (GHCR)⁠ and Docker Hub⁠.

git clone https://github.com/TheCatLady/docker-qnap-pushover.git
cd docker-qnap-pushover
docker build --no-cache --pull -t thecatlady/qnap-pushover .

Once the image has been built, follow the directions in the "Usage" section above to start the container.

⁠How to Contribute

Show your support by starring this project! 🌟 Pull requests, bug reports, and feature requests are also welcome!

You can also support me by becoming a GitHub sponsor⁠ or making a one-time donation⁠ 💖

Tag summary

Content type

Image

Digest

Size

22.8 MB

Last updated

over 4 years ago

docker pull thecatlady/qnap-pushover