A customer recently asked me how they could monitor and alert against all the NFS mounted file systems across their datacenter. Here is a quick guide to do the same.
A. Lets say for starters, all you want to do is view details of all NFS mounted file systems on a single Host target.
Solution:
Navigate to the Host target home page. Access the menu item Host->Storage Details. Switch to the file systems tab and filter the list by NFS. You can now happily view used and total sizes of your file systems.
B. Now you want to list details of all your NFS mounted file systems across all Host targets.
Solution:
The best way to do this would be to create a report using the published repository view called ‘MGMT$STORAGE_REPORT_NFS‘. The view is rather straight forward and easy to use.
C. While the first two cases were more focused on viewing the information, lets say now you want to set a threshold and actively monitor these NFS file systems.
Solution:
All the data we have viewed so far is collected as a configuration metric, and hence its collection frequency is 24 hrs and you cannot set thresholds against it directly. So for the purposes of active monitoring, we will navigate to the All Metrics page (Host->Monitoring->All Metrics) on the host target and take a look at ‘Filesystem Space Available (%)‘ metric. This metric will allow you to set thresholds and get alerts on file system space usage. Unfortunately, when you view the output of this metric, you will not find any of your NFS mounted file systems. This is because the collection for NFS mounted file systems is disabled by default. To enable this:
1. Go to $AGENT_HOME/sysman/config/emd.properties on the desired set of hosts
2. Add the property EM_MONITOR_ALL_DISKS=true
3. Run $AGENT_HOME/bin/emctl reload agent
Wait about 15 minutes, since that is the default collection interval. Refresh the page and Viola! all your NFS mounted file systems will appear on the all metrics page. Any thresholds set for this metric will now automatically apply to your NFS mounted file systems.
Finally, making the changes on a single agent is simple enough, but doing this manually across 100s of agents is rather tedious. To automate this, go to the Agents page (Setup->Manage Cloud Control->Agents), select the desired agents and click on the Properties button in the toolbar. This will launch a job submission wizard where you can select additional agents. In the parameters tab, find the EM_MONITOR_ALL_DISKS property and set its value to ‘true’, click submit. A job is submitted which takes only a fraction of a second to finish, and takes care of applying the changes to all agents and activating them. More details on this job can be found here.
Enjoy!
– Adeesh Fulay (@AdeeshF)