*New 11.3 series Release:
2019-10-19: XigmaNAS 11.3.0.4.7014 - released

*New 12.0 series Release:
2019-10-05: XigmaNAS 12.0.0.4.6928 - released!

*New 11.2 series Release:
2019-09-23: XigmaNAS 11.2.0.4.6881 - released!

We really need "Your" help on XigmaNAS https://translations.launchpad.net/xigmanas translations. Please help today!

Producing and hosting XigmaNAS costs money. Please consider donating for our project so that we can continue to offer you the best.
We need your support! eg: PAYPAL

Getting Telegram to work with the Extended GUI extension

XigmaNAS Extensions / Add-ons

Moderator: crest

Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
Cyberpower678
NewUser
NewUser
Posts: 9
Joined: 22 Jun 2019 21:26
Status: Offline

Getting Telegram to work with the Extended GUI extension

#1

Post by Cyberpower678 » 23 Jun 2019 22:27

So I have XigmaNAS 12 rootOnZFS 12.0.0.4 - Reticulus (revision 6766) installed, and I noticed an option to send Telegram alerts. I thought these would be definitely useful so I turned on all of the alerts added a Telegram API key and have it sending notices to me directly on Telegram. Problem is, when I tested it, nothing happened. I have the auth failure alerts active, and I intentionally failed to log in, but got no Telegram alert. I've tried looking for answer but there is little out there. Any help would be appreciated.

User avatar
crest
Hardware & Software Guru
Hardware & Software Guru
Posts: 873
Joined: 02 Jul 2012 22:25
Location: Vienna, Austria - GMT+1
Status: Offline

Re: Getting Telegram to work with the Extended GUI extension

#2

Post by crest » 24 Jun 2019 07:30

Hello Cyberpower678,

Welcome to the forums!
Cyberpower678 wrote:
23 Jun 2019 22:27
So I have XigmaNAS 12 rootOnZFS 12.0.0.4 - Reticulus (revision 6766) installed, and I noticed an option to send Telegram alerts. I thought these would be definitely useful so I turned on all of the alerts added a Telegram API key and have it sending notices to me directly on Telegram. Problem is, when I tested it, nothing happened. I have the auth failure alerts active, and I intentionally failed to log in, but got no Telegram alert. I've tried looking for answer but there is little out there. Any help would be appreciated.
Do you mean that Telegram alerts are not working at all or just not for auth failure?
What is the log message you see in the system log?

Regards
crest
NAS1: 11.2.0.4 - Omnius (Revision 6766) x64-embedded; MSI 760GM-P23; AMD Athlon(tm) II X2 250 7.58GiB RAM
NAS2: 11.2.0.4 - Omnius (Revision 6766) x64-embedded; MSI MS-7369; AMD Sempron(tm) LE-1250 8022MiB RAM
UPS: APC Back-UPS ES 550G
Extensions: OneButtonInstaller, Extended GUI, NextOwnCloud, BitTorrent Sync, Syncthing, Downloady, Midnight Commander, NCDU, MySQL, Rclone, Themes:

Cyberpower678
NewUser
NewUser
Posts: 9
Joined: 22 Jun 2019 21:26
Status: Offline

Getting Telegram to work with the Extended GUI extension

#3

Post by Cyberpower678 » 24 Jun 2019 13:13

No idea. I’m not sure what I’m looking for in the logs. I see the auth failure but no Telegram alerts. I can’t tell if the others are working or not as my system hasn’t reached critical thresholds.

Flanker_27
NewUser
NewUser
Posts: 4
Joined: 25 Jun 2019 18:23
Status: Offline

Re: Getting Telegram to work with the Extended GUI extension

#4

Post by Flanker_27 » 26 Jun 2019 11:17

Following this thread as well. I'm on the market for a NAS and use Telegram a lot, so the compatibility between these will be a huge selling point for me.

User avatar
crest
Hardware & Software Guru
Hardware & Software Guru
Posts: 873
Joined: 02 Jul 2012 22:25
Location: Vienna, Austria - GMT+1
Status: Offline

Re: Getting Telegram to work with the Extended GUI extension

#5

Post by crest » 26 Jun 2019 12:02

Cyberpower678 wrote:
24 Jun 2019 13:13
No idea. I’m not sure what I’m looking for in the logs. I see the auth failure but no Telegram alerts. I can’t tell if the others are working or not as my system hasn’t reached critical thresholds.
Pls download your system log and provide the whole line with the auth error message.

Telegram checks can easily be performed like eg:

Code: Select all

telegram-notify --title "MyServer" --text "TEST MESSAGE!"
in the CLI or also in XigmaNAS GUI > Tools > Command.

You can get the available command line params if you call just telegram-notify without params:

Code: Select all

$ telegram-notify
Tool to send a message to a Telegram User or Channel.
Message is sent from a Telegram Bot and can contain icon, text, image and/or document.
Main parameters are :
  --text <text>       Text of the message or file holding the text
  --photo <file>      Image to display
  --document <file>   Document to transfer
Options are :
  --title <title>     Title of the message (if text message)
  --html              Use HTML mode for text content (markdown by default)
  --silent            Send message in silent mode (no user notification on the client)
  --user <user-id>    Recipient User or Channel ID (replaces user-id= in /var/scripts/telegram-notify.conf)
  --key <api-key>     API Key of your Telegram bot (replaces api-key= in /var/scripts/telegram-notify.conf)
Optionnal icons are :
  --success           Add a success icon
  --error             Add an error icon
  --question          Add a question mark icon
  --info              Add an exclamation mark icon
  --icon <code>       Add an icon by UTF code (ex 1F355)
  
NAS1: 11.2.0.4 - Omnius (Revision 6766) x64-embedded; MSI 760GM-P23; AMD Athlon(tm) II X2 250 7.58GiB RAM
NAS2: 11.2.0.4 - Omnius (Revision 6766) x64-embedded; MSI MS-7369; AMD Sempron(tm) LE-1250 8022MiB RAM
UPS: APC Back-UPS ES 550G
Extensions: OneButtonInstaller, Extended GUI, NextOwnCloud, BitTorrent Sync, Syncthing, Downloady, Midnight Commander, NCDU, MySQL, Rclone, Themes:

Cyberpower678
NewUser
NewUser
Posts: 9
Joined: 22 Jun 2019 21:26
Status: Offline

Re: Getting Telegram to work with the Extended GUI extension

#6

Post by Cyberpower678 » 26 Jun 2019 15:05

crest wrote:
Cyberpower678 wrote:
24 Jun 2019 13:13
No idea. I’m not sure what I’m looking for in the logs. I see the auth failure but no Telegram alerts. I can’t tell if the others are working or not as my system hasn’t reached critical thresholds.
Pls download your system log and provide the whole line with the auth error message.

Telegram checks can easily be performed like eg:

Code: Select all

telegram-notify --title "MyServer" --text "TEST MESSAGE!"
in the CLI or also in XigmaNAS GUI > Tools > Command.

You can get the available command line params if you call just telegram-notify without params:

Code: Select all

$ telegram-notify
Tool to send a message to a Telegram User or Channel.
Message is sent from a Telegram Bot and can contain icon, text, image and/or document.
Main parameters are :
  --text <text>       Text of the message or file holding the text
  --photo <file>      Image to display
  --document <file>   Document to transfer
Options are :
  --title <title>     Title of the message (if text message)
  --html              Use HTML mode for text content (markdown by default)
  --silent            Send message in silent mode (no user notification on the client)
  --user <user-id>    Recipient User or Channel ID (replaces user-id= in /var/scripts/telegram-notify.conf)
  --key <api-key>     API Key of your Telegram bot (replaces api-key= in /var/scripts/telegram-notify.conf)
Optionnal icons are :
  --success           Add a success icon
  --error             Add an error icon
  --question          Add a question mark icon
  --info              Add an exclamation mark icon
  --icon <code>       Add an icon by UTF code (ex 1F355)
  
Ah. Those error messages were helpful. Turns out I needed my user ID from @myidbot rather than my username. I’ll retry with updated settings.


Sent from my iPhone using Tapatalk

Cyberpower678
NewUser
NewUser
Posts: 9
Joined: 22 Jun 2019 21:26
Status: Offline

Re: Getting Telegram to work with the Extended GUI extension

#7

Post by Cyberpower678 » 26 Jun 2019 15:10

UPDATE: seems to be sending them to me about ten seconds later. But for an auth error it only sends me ‘user_check.sh’ from the user column of the log, not the actual Event message.


Sent from my iPhone using Tapatalk

User avatar
crest
Hardware & Software Guru
Hardware & Software Guru
Posts: 873
Joined: 02 Jul 2012 22:25
Location: Vienna, Austria - GMT+1
Status: Offline

Re: Getting Telegram to work with the Extended GUI extension

#8

Post by crest » 26 Jun 2019 15:33

So once again please send me the log line as described in my previous post...
NAS1: 11.2.0.4 - Omnius (Revision 6766) x64-embedded; MSI 760GM-P23; AMD Athlon(tm) II X2 250 7.58GiB RAM
NAS2: 11.2.0.4 - Omnius (Revision 6766) x64-embedded; MSI MS-7369; AMD Sempron(tm) LE-1250 8022MiB RAM
UPS: APC Back-UPS ES 550G
Extensions: OneButtonInstaller, Extended GUI, NextOwnCloud, BitTorrent Sync, Syncthing, Downloady, Midnight Commander, NCDU, MySQL, Rclone, Themes:

Cyberpower678
NewUser
NewUser
Posts: 9
Joined: 22 Jun 2019 21:26
Status: Offline

Re: Getting Telegram to work with the Extended GUI extension

#9

Post by Cyberpower678 » 26 Jun 2019 15:36

crest wrote:
26 Jun 2019 15:33
So once again please send me the log line as described in my previous post...
2019.06.26 13:21:05 user_check.sh WARNING User authentication (AUTH) error(s) in system log detected

No notifications of users successfully logging in an out though.

User avatar
crest
Hardware & Software Guru
Hardware & Software Guru
Posts: 873
Joined: 02 Jul 2012 22:25
Location: Vienna, Austria - GMT+1
Status: Offline

Re: Getting Telegram to work with the Extended GUI extension

#10

Post by crest » 27 Jun 2019 08:46

Cyberpower678 wrote:
26 Jun 2019 15:36
crest wrote:
26 Jun 2019 15:33
So once again please send me the log line as described in my previous post...
2019.06.26 13:21:05 user_check.sh WARNING User authentication (AUTH) error(s) in system log detected

No notifications of users successfully logging in an out though.
OK, bug confirmed - in FreeBSD 12 the diff command (which is used by the monitoring script) no longer accepts the command line param --suppress-common-lines which leads to an empty output …
I have to revise all the scripts about this issue but in the meantime you could patch the script user_check.sh which resides in /path/to/your/extensions/extended-gui/scripts, remove the parameter --suppress-common-lines (it occurs two times in the script), save the file and restart Extended GUI. After this try the Password alert and user Login/Logout again, should work.
NAS1: 11.2.0.4 - Omnius (Revision 6766) x64-embedded; MSI 760GM-P23; AMD Athlon(tm) II X2 250 7.58GiB RAM
NAS2: 11.2.0.4 - Omnius (Revision 6766) x64-embedded; MSI MS-7369; AMD Sempron(tm) LE-1250 8022MiB RAM
UPS: APC Back-UPS ES 550G
Extensions: OneButtonInstaller, Extended GUI, NextOwnCloud, BitTorrent Sync, Syncthing, Downloady, Midnight Commander, NCDU, MySQL, Rclone, Themes:

Cyberpower678
NewUser
NewUser
Posts: 9
Joined: 22 Jun 2019 21:26
Status: Offline

Re: Getting Telegram to work with the Extended GUI extension

#11

Post by Cyberpower678 » 18 Jul 2019 14:07

@crest when I accidentally log in with wrong credentials, I get a zillion user_check.sh Telegrams each spaced exactly one minute apart.


Sent from my iPhone using Tapatalk

User avatar
crest
Hardware & Software Guru
Hardware & Software Guru
Posts: 873
Joined: 02 Jul 2012 22:25
Location: Vienna, Austria - GMT+1
Status: Offline

Re: Getting Telegram to work with the Extended GUI extension

#12

Post by crest » 20 Jul 2019 10:19

Cyberpower678 wrote:
18 Jul 2019 14:07
@crest when I accidentally log in with wrong credentials, I get a zillion user_check.sh Telegrams each spaced exactly one minute apart.


Sent from my iPhone using Tapatalk
I assume you tried the patch, therefore I would suggest to revert the changes to the original and wait for a new release which will come in 2 or 3 weeks probably.
NAS1: 11.2.0.4 - Omnius (Revision 6766) x64-embedded; MSI 760GM-P23; AMD Athlon(tm) II X2 250 7.58GiB RAM
NAS2: 11.2.0.4 - Omnius (Revision 6766) x64-embedded; MSI MS-7369; AMD Sempron(tm) LE-1250 8022MiB RAM
UPS: APC Back-UPS ES 550G
Extensions: OneButtonInstaller, Extended GUI, NextOwnCloud, BitTorrent Sync, Syncthing, Downloady, Midnight Commander, NCDU, MySQL, Rclone, Themes:

Post Reply

Return to “Extensions / Add-ons”