Notify by email when device is back online

Q'center app, Helpdesk app
Post Reply
podpora@dco.cz
First post
Posts: 1
Joined: Tue Apr 02, 2019 7:30 pm

Notify by email when device is back online

Post by podpora@dco.cz » Tue Apr 02, 2019 7:36 pm

Hi,

I have qcenter with online monitoring QNAP NASs(NAS is placed on different sites). When any qnap go offline due to internet connection problem I will got email with notificaciton.

How to setup notification when offline NAS go to online after offline status?

I need notification Qnap device is online, when state was offline.

Thank you

User avatar
storageman
Experience counts
Posts: 4819
Joined: Thu Sep 22, 2011 10:57 pm

Re: Notify by email when device is back online

Post by storageman » Thu Apr 04, 2019 5:54 pm

If Don's script still works maybe someway to incorporate it in autorun?
viewtopic.php?t=18350

Maybe other guys can help.

User avatar
OneCD
Ask me anything
Posts: 6206
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: Notify by email when device is back online

Post by OneCD » Fri Apr 05, 2019 3:43 am

Although, some additional logic would be needed to test and store the Internet connectivity state and only send a single email when that state returns to 'online'.

I guess the pseudocode could look like:

Code: Select all

if nas is online then
    if notify then send-email and set notify as false
    if not connected then set connected as true
else
    if connected then set connected as false and set notify as true
fi
Thoughts anyone?

production NAS: TS-569 Pro with Debian 9.9 'Stretch' (power on/off times are < 1 minute)
backup NAS: TS-559 Pro+ with QTS 4.2.6 #20190730

one.cd.only@gmail.com

Image Image Image Image

Gen19
Starting out
Posts: 18
Joined: Fri Jun 07, 2019 6:22 pm

Re: Notify by email when device is back online

Post by Gen19 » Fri Jun 07, 2019 7:09 pm

Hi, I didn't understand where I have to add code.
Regards
:arrow: NAS Qnap TS-251, 8gb

dolbyman
Guru
Posts: 14197
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: Notify by email when device is back online

Post by dolbyman » Fri Jun 07, 2019 9:31 pm

you didn't?..so now you do?

that pseudocode is only a hint on what to do (in the code of your choice) ...it is not actually "code"
Last edited by dolbyman on Fri Jun 07, 2019 11:27 pm, edited 1 time in total.

Gen19
Starting out
Posts: 18
Joined: Fri Jun 07, 2019 6:22 pm

Re: Notify by email when device is back online

Post by Gen19 » Fri Jun 07, 2019 11:10 pm

yes, I did a mistake, I wanted to know if there were something like this and how I could do.
Regards
:arrow: NAS Qnap TS-251, 8gb

Post Reply

Return to “NAS Management”