What notification can be sent thru telegram?
-
Hi everyone, I've just configured telegram notifications, but I don't receive every alert that instead are being sent via smtp.
For example I correctly receive dns updates and WANs (dis)connections on both mail and telegram, but ups notifications are not being sent via telegram.
Am I missing something?
-
@samlink said in What notification can be sent thru telegram?:
but ups notifications are not being sent via telegram.
Am I missing something?Yes.
This :The (NUT) UPS package only knows how to send 'mail' aka smtp_send.
It hasn't been made aware of the fact that other notifications methods exist these days.A support request is already in place : [see here](Add support for Telegram/Pushover notifications).
-
@gertjan thanks, I wrongly thought that every notification was "duplicated" by pfsense, so it could be sent with every settings I set
-
If you are willing to edit a file :
Add these at the bottom of /usr/local/pkg/nut/nut_email.php :
notify_via_telegram($message); notify_via_pushover($message);
It should now look like :
if telegram and/or pushover are set up, notices will get send to them.
Test : cut the power of the UPS.
-
@gertjan >It works flawlessly. Thanks!
Do I have to update nut_email.php if I install a nut update? -
@samlink said in What notification can be sent thru telegram?:
Do I have to update nut_email.php if I install a nut update?
Yes. This is valid for any files changed in any other package. Each time the package gets updated/reinstalled you have to remake your individual file modifications.
Regards,
fireodo -
@samlink said in What notification can be sent thru telegram?:
Do I have to update nut_email.php if I install a nut update?
Yep, although ask yourself - or me, this question : how often did this happens in the past ?
Ones last year ?Install the pfSense "Notes" package, and keep Notes about your setup changes - the URL (to this forum thread) - and whatever you do.
This way, you can forget about it. -
Or use the patches package and create a patch to do it. That can even be auto applied at a firmware update.
-
And gets auto discarded when the cited redmine feature request got implemented.On the down side : this needs some discussions with diff and 'patch'.