Data Infrastructure Management Software Discussions

Highlighted

Quota notification email

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
Highlighted

Re: Quota notification email

Hi lgor,

I am not sure about scripts or filer.  But we have a product called Operations Manager (part of DFM suite) that can do more than what you expect.

The below are the events Operations Manager can generate right today after monitoring your storage system's quota setup:

user-disk-space-quota-almost-full

user-disk-space-quota-full 

user-disk-space-quota-ok   

user-disk-space-soft-limit-exceeded 

user-disk-space-soft-limit-not-exceeded

user-files-quota-almost-full   

user-files-quota-full    

user-files-quota-utilization-normal  

user-files-soft-limit-exceeded       

user-files-soft-limit-not-exceeded     

volume-quota-almost-overcommitted

volume-quota-not-overcommitted        

volume-quota-overcommitted

Regards,

Saravanan

Highlighted

Re: Quota notification email

Helo Saravanan,

Yes, I'm looking at DFM right now. It looks a bit complicated to navigate and configure. Under Setup menu, parameters regarding quota notifications can be found in Default Thresholds, Events And Alerts and Users. And you can also choose a specific qtree, and click on Edit Quota Settings and work there. This discussion here also mentioned having to create notification groups and it seems it's not very easy to grasp...

Other than this guide http://now.netapp.com/NOW/knowledge/docs/DFM_win/rel371/pdfs/opsmgr.pdf is there any other document describing step-by-step setup for user quota alerts?

P.S. Just a thought... since Operations Manager is a part of Base Pack software pack, this may work for users which have purchased NetApp recently. Old users may not have that option.

Highlighted

Re: Quota notification email

Need to create an email account for the user in DFM.  domainname\username email address is blahblah@domain.com  This is in quota user settings.  I can send a screenshot if you like.

I would like to change the default email address from the sender of the email notification.  Right now, emails being sent to users come from "IT Administrator".

Dale

Highlighted

Re: Quota notification email

A screenshot would be helpful, thanks!

Igor

Highlighted

Re: Quota notification email

I didn't read the linked articles but we're doing quota notifications with DFM. See the "dfm quota mailformat" command - it allows you to specify an email template file, and in that file you can specify your own mail headers. For example, at the top of the file I have:

     From: <abc@xyz.com>

     Subject: Your personal drive is nearing its quota limit

     email content.....

You place the desired sender's email address in the From: field.

Highlighted

Re: Quota notification email

Thanks rmarwood..  I will try that.

igor, see attachment.

Highlighted

Re: Quota notification email

Hi Igor,

I have given step-by-step procedure below which you can use to configure quota alerts for individual users.

1=> Set your email server @ Setup -> Options -> Events and Alerts

2=> Look at the default quota thresholds @ Setup -> Options -> Default Thresholds

3=> Set your e-mail domain-name @ Setup -> Options -> Users. You can leave this field empty if you specify complete e-mail address at User settings page @ step7.

4=> Check that you set the credentials for the storage systems (which have user quotas) being monitored in DFM using dfm host set <storage system> hostlogin=xxxx hostpassword=xxxx. This is needed for the discovery of User quotas. Once the credentials are set, re-discover the storage system using 'dfm host discover <storage_system>'. This is required to keep DFM to have up-to-date information with respect to storage system.

5=> Wait for few mins (till userquotas mon completes) and launch "User Quotas All" Report (Go to Control Center -> Home -> Group Status -> File SRM/Quotas -> Report -> User Quotas, All)

6=> "User Quotal, All" page will show you all the usernames for whom quotas are configured.

7=> Click on one of the Usernames which will launch "User Details" page. Click "Edit Settings" link available in the bottom panel "QuotaUser Tools". It will launch "Edit User Settings" page where you can specify the e-mail address for the user.

8=> You need to repeat the above step for all the users. If you are not comfortable with UI, you can do this using CLI.

dfm quota user list
dfm quota user set <username> userEmail=abc@xyz.com

A simple script might help you here.

Hope these steps help you to fix your problem.

Regards,

Saravanan

Highlighted

Re: Quota notification email

Thanks for the reply Saranavan,

I'll give it a try today!

One thing though... while testing quotas, I noticed that FilerView immeditelly registers when some exceeds their quota. However, DFM doesn't... it's only after I manually issue "dfm host discover <storage_system>" command that it registeres the change, and even than it'll be after a few minutes.

Is there a way to have DFM keep up with the changes in real-time, automatically?

Thanks,

Igor

Highlighted

Re: Quota notification email

Since DFM uses SMTP for communicating with storage, could this be a SMTP issue?

Highlighted

Re: Quota notification email

Hi Igor,

Filerview is something like you are on the box directly. So, whatever changes you do on CLI (or via some operations), that will be reflected immediately in Filerview.

But, DFM is a Storage Management product. It is designed in a way that the userquotas are monitored only once in 24 hours (1 day). i.e 24 hrs is a default timer set for userquota mon.

Again, this option is configurable using "dfm options set".  If you reduce this value, it means that DFM will do more polling which in turn will consume few more CPU cycles of your storage system.

[root@10 log]# dfm options list | grep -i userQuotaMonInterval
userQuotaMonInterval                  1 day
[root@10 log]#


Regards,

Saravanan

Highlighted

Re: Quota notification email

On your other question :

>> Is there a way to have DFM keep up with the changes in real-time, automatically?

Please file a RFE for this.  We can make this possible in DFM using SNMP Traps feature. The flow should be :

1. Pre-Requisite : On your storage system, you need to configure DFM server as snmp traphosts
(snmp traphost add <DFM_Server_IP>)

2. When DFM server receives traps (quotaExceeded, quotaNormal) from these storage systems, we can have DFM to trigger userquota monitor which will fetch you the latest data. DFM would send mails to the users when their  quotas are exceeded.

Regards,

Saravanan

Highlighted

Re: Quota notification email

No, DFM is not using SMTP for storage system communication.

DFM uses SNMP and HTTP (NetApp proprietary version) protocols for 95% of its opeartions.

For UserQuotas, DFM is using HTTP (NetApp proprietary version) protocol.

Regards,

Saravanan

Highlighted

Re: Quota notification email

Sorry Saravanan,

I meant to say SNMP. 🙂

So, if I wanted to have a more frequent DFM update for UserQuotas I'd have to set userQuotaMonInterval to a lower value (e.g 1 minute, 30 secs), and that would be updated through HTTP? Is that enough to trigger a quota alarm message to be sent to a user's e-mail address?

I ask this because I think we're getting close to what I need -- to have a local user (with a quota on his home folder) receive an automated e-mail when they exceed soft/almost full/hard limits. Doesn't have to be reflected immediatelly, like on the box, but if I can get it to work within 1 minute or even 30 secs it would be great!

>>Again, this option is configurable using "dfm options set".  If you  reduce this value, it means that DFM will do more polling which in turn  will consume few more CPU cycles of your storage system.

Since userQuotaMonInterval works through HTTP, I suppose this woldn't be a significant increase in CPU load?

Thanks,

Igor

Highlighted

Re: Quota notification email

Here is my recommendation. Do not use the built-in quota notification system in DFM to generate near real-time alerts of users getting near to or going over quota. It is designed to run on a periodic basis because it asks your storage controllers for a quota report. This generates a lot of work for your DFM server and your storage controller, depending upon the complexity and scale of your systems. You MAY get away with bringing your quota monitoring interval down to an hour or so but I would still be wary of what additional load this generates.

As others have said you really should look into SNMP traps. Read the section in the DFM admin guide about these. It describes the pros and cons of changing monitoring intervals and suggests that SNMP traps - event notifications from the storage controller to an SNMP trap listender regarding a specific event - are better for near or real time monitoring. It's the difference between having your kids ask you every minute "are we there yet" or you telling them when you arrive.

I have not looked into the details but I'm quite sure the storage controller will send an SNMP trap when a user quota limit is hit. You (or someone) will have to examine the Netapp SNMP MIB to see what the specific event is so that you can watch for it. What you can do then is to configure an alarm in DFM that triggers when the trap is received. You then have the alarm call a script that sends email to the user as required. This approach isn't simple: it requires knowledge of SNMP and scripting.

As someone else pointed out, it would be nice if DFM could natively handle SNMP quota messages and send alerts to users in the same way that quota monitoring already works. I haven't checked - do Netapp have a mechanism for submitting RFEs?

Cheers,

Richard

Highlighted

Re: Quota notification email

I definitely agree with this approach.

Check out the KB!
Knowledge Base
All Community Forums