Community discussions

MikroTik App
 
sundbynet
just joined
Topic Author
Posts: 3
Joined: Wed Dec 16, 2020 9:21 am

Need help for script to send email when psu1-state is down

Wed Mar 23, 2022 7:12 pm

Hi all

Trying to have a bunch of my CRS354 switches, do the following in RouterV7

I would like to have a script running that send an email, when the switch detect the PSU1-state is down, and preferable also when the psu1-state goes to OK again

the ideas is that all of my switches, will have a UPS attached to PSU2, and land power attached to PSU1, and therefore I will receive a mail if the landline goes down, and then I will have the time to act before the switch goes completely down.

Instead of email, I could also get the notification with telegram if that is easier to script?

can some one point me in the right direction

Sincerely
Carsten Larsen
 
User avatar
eworm
Forum Guru
Forum Guru
Posts: 1070
Joined: Wed Oct 22, 2014 9:23 am
Location: Oberhausen, Germany
Contact:

Re: Need help for script to send email when psu1-state is down

Mon Mar 28, 2022 7:09 pm

Have a look at Notify about health state. It supports both, e-mail and Telegram (and Matrix on top).
 
sundbynet
just joined
Topic Author
Posts: 3
Joined: Wed Dec 16, 2020 9:21 am

Re: Need help for script to send email when psu1-state is down

Mon Mar 28, 2022 8:14 pm

Thanks , Will check
 
sundbynet
just joined
Topic Author
Posts: 3
Joined: Wed Dec 16, 2020 9:21 am

Re: Need help for script to send email when psu1-state is down

Thu Mar 31, 2022 2:47 pm

Figured it out, had a mate help me

Now I have a script and a scheduler than runs every 5 minutes, who check if PSU-STATE has changed, and sends me a telegram when the PSU-STATE changes from down and up

Thanks a lot everyone

Sincerely
Carsten Larsen

Who is online

Users browsing this forum: No registered users and 20 guests