Giter Site home page Giter Site logo

rafamunoz / duplicati-monitor Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 140 KB

Duplicati Monitor is a docker-packaged monitor and alert solution for Duplicati.

License: GNU General Public License v3.0

Dockerfile 14.91% Python 85.09%
alert docker duplicati monitoring notifications report self-hosted duplicati-monitoring apprise discord

duplicati-monitor's Introduction

Duplicati Monitor

Duplicati Monitor is a docker-packaged monitoring solution for Duplicati.

It allows you to control the status of your backups and statistics for each report and notifies you by any means supported by Apprice. It is meant to be self-hosted and powered by docker.

Quick Start

Notifications

To send notifications and satisfy the end user, it has been implemented with the Apprise library, which allows you to send a notification to almost all the most popular notification services available today, such as: Telegram, Discord, Slack, Amazon SNS, Gotify, etc.

You can check all the services available in the official documentation.

Templates

You can create your own templates to receive the information you exactly need.

By default we use the following two:

# Succes backup
๐Ÿ’พ ๐ŸŸข <Extra.backup-name>

# Error backup 
๐Ÿ’พ ๐Ÿ”ด <Extra.backup-name>

You can create your own templates in a simple way. You only have to use the symbols < and > delimit the fields and separating keys with dots . to send along with the message that you want.

In the docs/examples_report folder of this repository you have two examples of the JSON reports that Duplicati sends and in which you can see the fields that compose it.

For example, with the following template, the result shown in the telegram image would be obtained.

๐Ÿ’พ ๐ŸŸข Backup: <Extra.backup-name>\n - Examined Files: <Data.ExaminedFiles>\n - Duration: <Data.Duration>\n - Status: *<Data.TestResults.ParsedResult>*

telegram-example-notication

Environment Variables

ENVIRONMENT VARIABLE TYPE DEFAULT DESCRIPTION
URI_NOTIFICATION required URI in Apprise format where the notifications will be sent.
TEMPLATE_SUCCESS opcional ๐Ÿ’พ ๐ŸŸข <Extra.backup-name> Message template to be sent when the backup is successful.
TEMPLATE_ERROR opcional ๐Ÿ’พ ๐Ÿ”ด <Extra.backup-name> Message template that will be sent when the backup is executed in an erroneous way.
PORT opcional 8000 Listening port on which the service is set up to receive the reports.

Docker Run

To start the container you can do it with the following command.

docker run -d --name=duplicati-monitor -p 8000:8000 -e URI_NOTIFICATION=tgram://<TOKEN_TELEGRAM_BOT>/<CHANEL_ID>/?format=markdown rafa93m/duplicati-monitor

Or you can also use the following docker compose.

version: "3"
services:
    duplicati-monitor:
        container_name: duplicati-monitor
        image: rafa93m/duplicati-monitor
        ports:
            - 8000:8000
        environment:
            URI_NOTIFICATION: "tgram://<TOKEN_TELEGRAM_BOT>/<CHANEL_ID>/?format=markdown"
            TEMPLATE_SUCCESS: "๐Ÿ’พ ๐ŸŸข Backup: <Extra.backup-name>"
            TEMPLATE_ERROR: "๐Ÿ’พ ๐Ÿ”ด Backup <Extra.backup-name> failed ๐Ÿ”ฅ ๐Ÿ”ฅ"
        restart: unless-stopped

Setup Duplicati

Add theses two options for each backup you want to monitor:

  • send-http-result-output-format: json
  • send-http-url: http://IP_ADDRESS:PORT/report

advanced-options

duplicati-monitor's People

Contributors

rafamunoz avatar

Watchers

 avatar  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.