Use Telegram as notification service Q&A
-
- OMV 3.x
- gelöst
- subzero79
-
-
Thanks a lot for the guide
It's really cool, and I'll surely try it as soon as possible! -
Hi,
do you know how this could work for OMV Version 2?
I searched for this file but i could not find it.
-
-
Not possible on OMV 2.x since it is missing the key notification parts necessary for this to work.
-
If i use curl I've get:
root@mysrv:~# curl 'https://api.telegram.org/bot1234:MYTOKEN5678/getUpdates?offset=0'
{"ok":true,"result":[]}
root@mysrv:~#and not something like that
Code{"ok":true,"result":[{"update_id":60704312, "message":{"message_id":195,"from":{"id":112632459,"first_name":"John","last_name":"Snow","username":"johnsnow"},"chat":{"id":112632459,"first_name":"John","last_name":"Snow","username":"johnsnow","type":"private"},"date":1472369911,"text":"\/talk","entities":[{"type":"bot_command","offset":0,"length":5}]}}]}
can u help me pls?
/edit
OH SORRY. I've forgot to start the bot
-
same problem, I copied the token, but I don't get the correct result
-
-
same problem, I copied the token, but I don't get the correct result
Start and talk to the bot first.
-
I don't know why, but since a while OMV seems to not be able to use my bot I don't get why it doesn't seem to be able to receive messages Can you pelase help me to solve this problem?
I checked and the id and token are right -
Chatid are no longer valid if not used for a while. So maybe generate another one.
-
-
I checked the toekn, then used the curl command, and the id is still the same
-
Try to send a message to the bot running the script manually replace the variables in "content" with some random text. If it works means is ok....then postfix not running or something else
-
Just a question: it's possible to send the email to a wrong email? Or it will break the script?
I changed the email from useless@hotmail.it to my email and suddently 100 messages arrived! -
-
I don't know. I know that postfix has to be configured. I use my gmail account plus alias but then I create a rule to delete all messages in gmail. So I only receive the telegram messages.
-
understood thanks for the help!
-
Hi,
First of all thank you for this.
I just wanted to add that by default curl is not installed on OMV 3.
So maybe it would be a good idea to add the fact that it is a requirement in the tutorial.
Regards
-
-
Sure no problem. I'll edit the guide
-
THX! Works with Boxcar too
Bash#!/bin/bash curl -d "user_credentials=YOUR-BOXCAR-TOKEN" \ -d "notification[title]=NAS: ${OMV_NOTIFICATION_SUBJECT}" \ -d "notification[long_message]=${OMV_NOTIFICATION_DATE}<br><br> $(cat ${OMV_NOTIFICATION_MESSAGE_FILE})" \ -d "notification[source_name]=OMV" \ https://new.boxcar.io/api/notifications
It would be great if the Fail2Ban Plugin could use the System Notifications and not his own Mail Notifications
-
I tried the script yesterday and it works like a charm. Thank you for publishing the guide.
However, it does not send the notification e-mails from "scheduled jobs" as a telegram message to me. Is the e-mail notification in "scheduled jobs" not integrated in the default notification agent?
-
-
Every that goes through postfix should be sent by the script, including scheduled tasks.
-
This is weird. I have a scheduled task which starts a rsync backup job. When the job is done, it sends me a mail that tells me what files are transffered. Yesterday I got the mail, but no telegram message.
Jetzt mitmachen!
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!