jotta / jotta-cli-issues

45 stars 1 forks source link

Feature request: notify errors by email #96

Open Newinx opened 4 years ago

Newinx commented 4 years ago

Description of problem: Running jotta-cli on a home headless server, I almost never verify my logs. It would be great to be notified of backup failures by email.

Kimbsen commented 4 years ago

We do have webhooks that report some errors and other status updates.

https://docs.jottacloud.com/en/articles/1459570-how-to-configure-the-command-line-client-to-send-webhooks

But i agree email would be a better/more convenient transport. I've added it to our internal todo list.

wes1993 commented 2 months ago

Hello @Kimbsen, There are some news here? I really prefer to send email instead of slack messages... I can configure msmtp-mta for sending email.

Best regards Stefano

Kimbsen commented 2 months ago

No sorry, no news.

Its still in our backlog.

wes1993 commented 2 months ago

@Kimbsen, thanks a lot for your reply, for now, as a workaround I'm using this method: Prereq: Install and configure msmtp and msmtp-mta (Details HERE: https://wiki.debian.org/msmtp)

Using the command below: { printf "Subject: JottaCloud Status\n\n"; jotta-cli status -v; } | msmtp -a default

The Result:

image

From my point of view is a accetable result :-D

Here my scritp: See the XDG_RUNTIME_DIR from a terminal session and set the correct path in the script

cat /home/JottaCliStatus.sh
#!/bin/bash
. $HOME/.profile
. $HOME/.bashrc
export XDG_RUNTIME_DIR=/run/user/0
{ printf "Subject: JottaCloud Status\n\n"; jotta-cli status -v; } | msmtp -a default <Destination Email Address>

My Crontab :

0 15 * * *  /home/JottaCliStatus.sh

Best Regards Stefano