Script to automate NAS space alerts

Hello Everyone,

I need your expertise in creating script on how to automate sending of alert/notification of NAS Space and also File counts with the following requirements.

  1. Automatically send to assigned sysadmin if it crosses threshold level.
  2. Threshold is 80% utilization of the total capacity (e.g. 70GB used out of 100GB.

Thanks in Advance.

Regards,
Rajesh

SNMP?

Hi sb008,

Yes..i need to get alerts in mail..plz help me..!!

Thanks in Advance.

Regards,
Rajesh

Build a script which gathers your the volume information of your NAS using SNMP.

Check your NAS documentation or NAS MIBs for the OID's to use.

If it would be a Linux box, something like:

snmpwalk -v2c -c <somecommuntystring> <somehost> hrStorage

would provide the required info.

Ofcourse SNMP needs to be enabled on your NAS.

If you have no idea about the OID's, run a full walk to find them.

snmpwalk -v2c -c <somecommuntystring> <somehost> .

Notice the dot "." at the end.

The SNMP output, in case of a walk, are indexed tables.

Combine "Description", "Size", "Used" or whatever in the script to calculate the used percentage for each volume.

Define a treshhold in your script and if the used percentage for a voulme exceeds the treshhold, send out an e-mail.

Run the script as a Cron job

=======

Or use some monitoring tool like Nagios. Nagios is capable to send out alerts by e-mail.

Hi sb008,

Thanks for your reply.

But I need script for Solaris box.

A script which sends NAS Space Alerts & File counts & also large space occupied filename in the same alerts.

Thanks in advance.

Regards,
Rajesh