Active IQ Unified Manager Discussions

Quota notification email

igor
34,378 Views

Is it possible for a filer to send out an e-mail directly to the user, when they reach soft/hard quota limit? A script, perhaps?

Examples and guides would be most welcome!

Thanks,

Igor

62 REPLIES 62

igor
8,780 Views

Hi Saravanan,

I used 2 environments:

- a local one, completely virtualized with ONTAP 7.3.2 simulator

- a remote on, with real physical servers and a test filer, through VPN

Both are quite simple with regular settings, and both failed to perform.

Would it be too much bother to send me screenshots of pages detailing the parameters you've set for your lab? I just want to make sure I'm not missing something before I file a burt... I need to make this work before we offer this to our client next week.

Thanks,

Igor

igor
8,779 Views

I'm wondering if this is a license issue... What licenses do I need to have under Setup -> Options -> Licensed Features?

Thanks,

Igor

msaravan
8,779 Views

Hi Igor,

License should not matter. As long as you see quotas discovered in Operations Manager, that is more than enough for the alerts (e-mails) to be triggered.

Regarding your issue, I am having a discussion with my peers. Hope, I'll have some data for you tomorrow.

Regards,

Saravanan

igor
8,779 Views

Thanks Saravanan,

Let me know what you find out. I've tested Ops Manager at our client's yesterday and it's the same. Only alarms regarding quotas go though, there's no direct user notification via set email...

Also, when I trigger the DFM's user quota database to be refreshed (monitoring interval), it takes at least 10-15 additional minutes for Ops Manager to register that someone exceeded their quota limit.

Regards,

Igor

igor
8,779 Views

Any news from your peers?

lovik_netapp
8,662 Views

Ok so here's my 2 cents, select the qtree and go to edit qtree page then put email address of user in email field. It works for me (tried in 3.7 as well 3.8) so it should work for you as well.

Now I know that it's big deal if you have to modify each and every qtree to add email address but this is the last thing I can think of as of now.

Don't forget to keep the alarms on for quota exceeded notification.

igor
8,662 Views

Hello Lovik,

The alarms are not the problem, they work fine. Like I wrote in this discussion before, I created a "User Disk Space Quota Almost Full" alarm and tested it successfully. The problem with alarms is that they are "global" events... for instance, any  user can trigger my test alarm simply by exceeding their quota. What I need is for DFM to send emails to specific  users when they exceed their own quotas.

But I've taken your advice - and tried both this time. I've set up a  quota for both a test user and a qtree, and then exceeded them. Surely enought, I got this report:

http://img227.imageshack.us/img227/9728/capture1m.jpg

You can see that I've set up the user's email address so he can be notified:

http://img291.imageshack.us/img291/1221/capture2ak.jpg

Same goes for the owner of the qtree:

http://img20.imageshack.us/img20/5631/capture3ujv.jpg

The mail server is setup OK and I've tested the email address DFM is using to send out notifications by setting up various alarms... This is pretty basic setup and as Saravanan said, it should work automatically. Still, I haven't managed to get DFM to send out a single quota  notification email.

lovik_netapp
8,662 Views

Ok here are some of my observations.

"The problem with alarms is that they are "global" events... for instance, any  user can trigger my test alarm simply by exceeding their quota"

for this you can create new group in OM and add that system/vol/qtree/user part of that group and then modify the alarm to limit its reach only up-to that group.

"What I need is for DFM to send emails to specific  users when they exceed their own quotas"

This should be taken care by user mail address which you have added in owner email field or if you go in options and quota alerts in OM you will see there is an option to add domain name for quota notification mail, here you have to use your organization's FQDN like 'gmail.com' rather than only ''gmail"

after all if nothing works there is a tool in toolchest called as Trapnotify - http://now.netapp.com/eservice/toolchest?toolid=425, you may want to try that, however i don't know how good they are as i have never used it.

igor
8,662 Views

Thanks for your input Lovik, but using groups isn't as effective as regular email user notifications that OM is supposed to be sending.

As for Trapnotify, I've tried it out yesterday but after running it I get an error saying "Bad arg length for Socket::inet_ntoa, length is 0, should be 4 at trapnotify line 316". I found the line in question but I've no idea what I'm looking at, I'm also quite inexperienced in scripting. 🙂

Regards,

Igor

igor
8,453 Views

Are there at least any LOG files that I can check to see whether Ops Manager attempts to send out e-mails or not?

adaikkap
8,453 Views

Hi

     Can you check the following options.

See if userEnableAlerts is yes by default its enabled.

[root@lnx ~]# dfm options list userEnableAlerts
Option           Value
---------------- ------------------------------
userEnableAlerts yes

The dfm sends the username for which the quota exceeded, its the mailserver that should resolve the domain name.If the mailserver domain name is different set the below option so that dfm sends the username with domain.

By default its blank

[root@lnx ~]# dfm options list userEmailDefaultDomain
Option                 Value
---------------------- ------------------------------
userEmailDefaultDomain

Similarly see if the value set to SMTP server resolves. ping and see if your smtp server is aliases to mail by doing the following.

ping mail in the command line else change it to appropriate value.

[root@lnx~]# dfm options list SMTPServerName
Option          Value
--------------- ------------------------------
SMTPServerName  mail
[root@lnx ~]#

If the events are generated then there is not other reason than listed above why the alert is not sent to the user.

Regards

adai

igor
8,413 Views

Hello Adai,

Well, I've tried both approaches.

First, to specify Email Default Domain which would be appended to e-mail address. On my test domain LAB, I've a user named Joe with a home folder at /vol1 volume. I've entered my own e-mail address name (igor) and specified our regular email domain (osap.rs). Alerts are enabled, but I've also enabled user quota alerts on the volume level as well. SMTP server has been defined and pinged, and a there's an account with no password which I use for mail tests ready and waiting. I've tested alarms with it and emails are getting through alright...

Here's the checklist:

C:\>dfm options list userEnableAlerts
Option           Value
---------------- ------------------------------
userEnableAlerts yes

C:\>dfm quota user get LAB\joe
QuotaUser:                            LAB\joe
Email Address for Quota Alerts:       igor
User Quota Full Threshold (%):        90
User Quota Nearly Full Threshold (%): 80

C:\>dfm options list userEmailDefaultDomain
Option                 Value
---------------------- ------------------------------
userEmailDefaultDomain osap.rs

C:\>dfm options list SMTPServerName
Option          Value
--------------- ------------------------------
SMTPServerName  mail.ourspace.si

C:\>ping mail.ourspace.si
Pinging mail.ourspace.si [84.52.141.183] with 32 bytes of data:
Reply from 84.52.141.183: bytes=32 time=30ms TTL=118
Reply from 84.52.141.183: bytes=32 time=42ms TTL=118
Reply from 84.52.141.183: bytes=32 time=32ms TTL=118
Reply from 84.52.141.183: bytes=32 time=29ms TTL=118
Ping statistics for 84.52.141.183:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 29ms, Maximum = 42ms, Average = 33ms

C:\>dfm volume get storage:/vol1
Volume: storage:/vol1
Volume Full Threshold (%): 90
Volume Nearly Full Threshold (%): 80
Volume Full Threshold Interval: 00:00:00
Enable User Quota Alerts, not available for vserver volumes: Yes
etc...

As usual, I went on and exceeded the quota and the event was registered in OM under User Quota Events. If I understand correctly, DFM should've used igor and osap.rs parameters, to send out a quota alert to igor@osap.rs via set SMTP server. Still, nothing happened.  (I have screenshots but I cannot insert them here for some reason)

Then I tried tried the default approach, leaving the Email Default Domain blank and specifying a full e-mail address for the user:

C:\>dfm options set userEmailDefaultDomain=none
Cleared default email domain for quota alerts.

C:\>dfm options list userEmailDefaultDomain
Option                 Value
---------------------- ------------------------------
userEmailDefaultDomain

C:\>dfm quota user set -s lab\joe userEmail=igor@osap.rs
Changed email address for quota alerts for user LAB\joe (125) to igor@osap.rs.

C:\>dfm quota user get LAB\joe
QuotaUser:                           LAB\joe
Email Address for Quota Alerts:       igor@osap.rs
User Quota Full Threshold (%):        90
User Quota Nearly Full Threshold (%): 80

I've exceeded the quota once again but with the same results. User alerts are not getting through...

Can you send me the checklist from your lab? Perhaps an example of what a generated user alert e-mail looks like?

adaikkap
8,413 Views

Hi

     Can you retry this entire stuff of creating a user quota full event.And capture the following.

dfm event detail <event id> for the user quota full event.

and send us the following log files. from the <installdir>/NTAPdfm/log

dfmeventd*.log and

alert*.log

Also dfm host diag for the filer

Regards

adai

igor
8,413 Views

I generated an event with timestamp Oct 05 12:57:27. Requested files are attached.

It's funny...

Alert.log says the an e-mail has been sent out for "alarm 3" which is most the alarm I had set up for User Disk Space Quota Full events. Those e-mails are coming though.

However, 4 seconds later, DFMEvent.log registeres SMTP failure to send the e-mail (SMTP server replied '554 5.1.0 Sender Denied'). I think this might be the the problem with user notification e-mails!

But, how come there were no SMTP issues with the alarm? Both alarms & user alerts use the same mail account and mail server defined under Events and Alerts, don't they?

Regards,

Igor

adaikkap
8,413 Views

Hi

     Can check the same time as when this error occurred what's the windows application viewer says ?

Regards

adai

igor
8,243 Views

Hi,

I've checked the server's Event Viewer and there aren't any events with the same timestamp under Application, or any other category. I repeated the quota event 2 more times, same results.

Regards,

Igor

igor
8,413 Views

Is Operation Manager using the same SMTP mechanism in both cases?

P.S. I've been reading up on Ops Manager and I read somewhere that people should be careful when defining mailformat so that it conforms to SMTP protocol. Perhaps the difference between alarms & user alerts is in the way Ops Manager writes email headers or something?

adaikkap
8,413 Views

Hi,

     No they both use the same SMTP servername,this is something you will have to take it up with the Exchange server Admin.

Regards

adai

igor
8,413 Views

Hello, Adai.

I've already requested them to take a look and, at first glance, they didn't find anything wrong... I don't know, it doesn't make sense that almost identical e-mails should produce different results. I tried using a new e-mail account for OM's messaging and it came out the same. Alarms go through, user alerts do not.

When I was demonstrating OM at our client's, the one for whome I need to make this work, I tested the OM messaging with their e-mail server but the same SMTP issue was observed. And their e-mail server has absolutely no restrictions - you merely have to be a part of a internal subnet, and you can send out e-mails without even having to perform account setup on Exchange. It's wide open.

Still, I appreciate your help.

If you think this is no longer an OM issue, I'll ask them to keep looking for a problem.

Regards,

Igor

adaikkap
8,431 Views

I will try the best from my side.

Regards

adai

oweinmann
8,431 Views

Hi,

has this issue ever been fixed? I'm facinf the exact same problem. We have a win2k8 server running dfm 4.2 and smtp is a exchange 2010 server.

Public