Welcome to echGo

This small Docker project is the easiest way to send notifications directly via .txt, .json or .xml files to services like: Gotify, Pushover, Matrix, Telegram, Discord, Slack, Trello, Zendesk, osTicket, twillo SMTP (Email) or Webhook.

On this page you can find a small quick guide to the software. A more detailed tutorial and all the code can be found in our GitHub repository. You can also view the image in the Docker Hub.

Quick start

Here you can find the instructions on how to set up the Docker container and define the files so that they can be read in correctly.

Create the configuration files

First, we start the Docker container to create the configuration file. For this you can use the following command.

docker run --name echgo-init -d --rm \
    -v /etc/echgo/configuration:/app/files/configuration \
    echgo/echgo:latest

If the container was started, then the directory /etc/echgo/configuration is created. Here you will find the configuration for the different communication paths. Please fill in and save this as required. If you want to adjust the configuration. You do not have to restart the Docker container again. The software reads the configuration once before each run, so it is always up-to-date. Here you find once the file with demo data, so that you see, how the file looks. If you need more information about the individual keys and tokens, you can find them here in the channel variables.

The container is stopped automatically and removed.

Start the service

Now we can start the service directly. To do this, please run the following command once.

docker run --name echgo -d --restart always \
    -v /etc/echgo/configuration:/app/files/configuration \
    -v /var/lib/echgo/notification:/app/files/notification \
    echgo/echgo:latest

Now the service should run. With the command we map once the configuration file and the location of the notifications.

Further adjustments

Adjust interval

If you like to adjust the interval of 15 seconds, you can do this with the following variable INTERVAL. This must be of type integer, otherwise it will not be taken into account. The whole thing looks like this.

docker run --name echgo -d --restart always \
    -e INTERVAL=5 \
    -v /etc/echgo/configuration:/app/files/configuration \
    -v /var/lib/echgo/notification:/app/files/notification \
    echgo/echgo:latest

With these settings, the service now reads the notifications every 5 seconds.

Use environments

If you want to use environments instead of the json configuration, you can force this with the variable USE_ENVIRONMENT. This value is a boolean. This is the way json configuration is taken no longer.

docker run --name echgo -d --restart always \
    -e USE_ENVIRONMENT=true \
    -v /etc/echgo/configuration:/app/files/configuration \
    -v /var/lib/echgo/notification:/app/files/notification \
    echgo/echgo:latest

Now you can use the following variables for the different services. If a service is running notification file but has no access data stored, the notification will not be executed. A list of all variables can be found here.

Create notification

Now we create a notification to be sent to different channels. You can also enter only one channel. How these notification files are created later is up to you. With a bash script or from another program does not matter.

The only important thing is that the file is placed in this folder /var/lib/echgo/notification. The name of the file does not matter. It only matters that the file extension and the file format are correct. Currently, we can read the following formats: .txt, .json & .xml.

Yu can store the following channels in the file, if they are configured: gotify, pushover, matrix, telegram, discord, slack, trello, zendesk, osticket, twillo, smtp & webhook. These are always specified in an array. That means you can address one or more channels with one notification file. Now let's look at the currently available file formats and how you can configure them.

TXT file

Now let's have a look at an example .txt file. The name of the file can always be freely chosen. It is only important that the data are set per line and that these are stored as key value pairs.

Notification channels can be listed comma separated. If you want to use only one channel, you don't have to use a comma.

channels=gotify,telegram
headline=Nice headline
message=This is a test message!
JSON file

Here you can find an example for a .json file. Here you can also enter several or only one channel. The structure of the file must be followed please. If you want to know more about JSON, you can find the official site here.

{
    "channels": [
        "gotify",
        "matrix",
        "zendesk"
    ],
    "headline": "Nice headline",
    "message": "This is a test message."
}
XML file

The file type .xml can also be used. The structure of the file looks as follows. If you need to XML, you can find it here.

<data>
    <channels>
        <type>gotify</type>
        <type>discord</type>
    </channels>
    <headline>echGo</headline>
    <message>This is a test message from a xml file.</message>
</data>

Now echGo reads the files every 15 seconds and sends them to the specified channels. It is also possible to read in several files of different types at the same time.

This is only an excerpt and the instructions for a quick start. You can find the complete documentation on GitHub.