unraid_notify 2.55 [01-01-2010]: Email notifications for unRAID status


Recommended Posts

I hate earthlink!!

 

I use to have them for dial-up access and i never did like the e-mail.  I ended up moving to a web based e-mail back them (yahoo i believe) and never looked back.  I don't use ISP e-mail addresses anymore as i tend to change back and forth every year or so.

 

If your not opposed to it i would suggest setting up a gmail account and using that for the unraid_notify script.

Link to comment
  • Replies 235
  • Created
  • Last Reply

Top Posters In This Topic

I've read through all the pages a couple times and I didn't see it..  Is there a way to not send me an update if the disks are spun down?

 

I suppose I could comb through the script and look myself...  but it's easier to ask..  and considering I haven't got much work done at work the past two days because of unraid...  I probably just get something work releated done today!! :)

 

Jim

Link to comment

in the "# Loop over each disk, checking and reporting temp, and checking if a disk should be spun down." loop, you would need to count the number of disks spun up.    After that, you could check the new count against the total number of disks (the number of entries in the diskNumber, diskList or diskId arrays) in the "# Calculate if notification should be sent" section.

 

 

Link to comment
  • 1 month later...

Here is the script and the config file that will only give you notices if one or more disks are spun up.  If they are spun down, then no info is sent.

 

There is a new variable in the conf file that will also control it.  If the variable is not there then the script should behave like the released verison.

 

# Send report if no disks are spun up.  If True then Status report will onlt be sent if one or more disks are not

# spun up.  If all disks are not spun up, then no report will be sent if this variable is set to true.

NoReportIfAllSpunDown = False

 

just remove the .txt from both file names.

 

Maybe Brainbone will include it in his next release.

 

 

EDIT:  New version below here

Link to comment
  • 5 weeks later...

I think I understand what you are saying, but to make sure that I understand things...  I have looked at the new unraid_notify script and it looks like it will ignore any disk that is currently spun down.  If I understand this correctly, it will NOT spin a disk up just to check its temperature.  I just got a little confused by your choice of words ("If all disks are not spun up" vs. "NoReportIfAllSpunDown") and I tried looking at the script and it all seems greek to me...

 

Here is the script and the config file that will only give you notices if one or more disks are spun up.  If they are spun down, then no info is sent.

 

There is a new variable in the conf file that will also control it.  If the variable is not there then the script should behave like the released verison.

 

# Send report if no disks are spun up.  If True then Status report will onlt be sent if one or more disks are not

# spun up.  If all disks are not spun up, then no report will be sent if this variable is set to true.

NoReportIfAllSpunDown = False

 

just remove the .txt from both file names.

 

Maybe Brainbone will include it in his next release.

Link to comment

Finally, and please excuse this flurry of emails, but what impact exactly does the "SpinDownTime" parameter in the config file have?  I'm not sure how this interacts with the spin down delay that gets set on the server configuration itself.  If I knew how to incorporate jbuszkie's version of the script, then I would assume that there is no interaction.  In the meantime, I have my drives set to spindown after 45 in the unraid control screen (I'm assuming that if I haven't played music or watched some video in 45 minutes, then I am done for the night.  How do I (and do I need to) reconcile these two settings?

 

Thanks in advance for any answers to all three questions.

 

Chris

Link to comment

I think I understand what you are saying, but to make sure that I understand things...  I have looked at the new unraid_notify script and it looks like it will ignore any disk that is currently spun down.  If I understand this correctly, it will NOT spin a disk up just to check its temperature.  I just got a little confused by your choice of words ("If all disks are not spun up" vs. "NoReportIfAllSpunDown") and I tried looking at the script and it all seems greek to me...

 

The original script would send a message out every hour (or whatever the default was) if you had it set up that way.  Most of the time my disks were spun down and I would still get the message.  So I modified the script to check to see if any are spun up.  If all are spun down, then no message is sent. But if one or more are spun up, then it will send the message out.  It won't spin up the disks that are still spun down, it will just report them as spun down.

Link to comment

Finally, and please excuse this flurry of emails, but what impact exactly does the "SpinDownTime" parameter in the config file have?  I'm not sure how this interacts with the spin down delay that gets set on the server configuration itself.  If I knew how to incorporate jbuszkie's version of the script, then I would assume that there is no interaction.  In the meantime, I have my drives set to spindown after 45 in the unraid control screen (I'm assuming that if I haven't played music or watched some video in 45 minutes, then I am done for the night.  How do I (and do I need to) reconcile these two settings?

That's more of a brainbone question.  You might find the answer in one of the earlier posts in this thread if you haven't already looked..

 

Jim

Link to comment

I'm getting the following error when I try to Send a Test Email,

 

EHLO Tower

< 421 Command timeout, closing transmission channel

421 Command timeout, closing transmission channel

/usr/bin/bashmail: line 66: echo: write error: Connection reset by peer

/usr/bin/bashmail: line 66: echo: write error: Connection reset by peer

 

 

Anyone know what's wrong?

 

Thanks,

 

Steve

Link to comment
  • 2 weeks later...

I am testing the script that works very well...

 

now for test the send of OK email I give the command (with -d) for debugging info)...

 

now I need to make a  lot of email simulating the error email, but I do not want to stop the raid or detach an HD...

 

there is a command switch to send a test email of "NO OK" situation???

 

thank you so much, for the script, and for your answer.

 

Max

Link to comment
  • 3 weeks later...

Since I just added a cache disk, I felt compelled to add support for cache disk reporting.

 

I haven't done extensive testing..  but it works on my system! :-)

 

Just add it to the tgz file (after you strip off the .txt)  The cfg file is included for completeness.  There were no changes to that since I last posted a change.

 

Jim

Link to comment

Thanks guys for the great script.  I really like the easy to use config file.  Works great.  I am also monitoring my cache disk.  Since I have a VM always running on the cache drive, that is the one that is most important for me to watch to get a feel for the temp of the system anyway.  Thanks again!

Link to comment

Guys,

 

I have been using this wonderful little script pretty much from the time it came out.

And then my ISP blocked port 25 on me and it stopped working.  >:(

 

I have changed my configuration to use gmail as my smtp server but am having a little trouble.

I have tried everything I can think of and no luck.  It seems the connection is timing out.

 

Here is a screenshot of the command line:

 

http://farm4.static.flickr.com/3576/3519409856_2a332d2c01_o.jpg

 

The weird thing is, it does work every once in a while.  I get an email about every two days.

 

Does anyone have any ideas what could be wrong?

I can't live without that little notification telling me all is well anymore.  :)

 

Kent

 

 

Link to comment

I haven't seen anyone else with this issue, but it may help someone else out there...

 

I've just worked out why this system wasn't working for me - turns out that my ISP's SMTP server doesn't support ESMTP, so it was choking when fed EHLO. One small adjustment later to the bashmail script, and now it only uses EHLO when supplied with a username and password, and otherwise uses basic SMTP - i.e. HELO (this means I can quickly swap over to using gmail's SMTP service if required at some point in the future - and hopefully it doesn't break the earthlink modifications that were made...?).

 

I've tried to attach the modified script, for the sake of completeness - remove the extension to get it 'back to normal'. Usual disclaimers apply: it works for me, but I make no guarantees!

Link to comment
  • 3 weeks later...
I've just worked out why this system wasn't working for me - turns out that my ISP's SMTP server doesn't support ESMTP.

 

I was wondering when this would come up.

 

Unfortunately, ISPs like earthlink do not require authentication, but do require ESMTP, so falling back to HELO on lack of authentication will still fail in this case.

 

I'll work on changing bashmail to fall back to HELO on rejection of ELHO. It appears that's the proper thing to do.

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.