Follow

How To Monitor NFS Volumes On Linux Servers

Applies To

  • Zenoss 4.0.x
  • Zenoss 3.1.x
  • Zenoss 3.0.x
  • Zenoss 2.5.x

Tested on

  • Zenoss Resource Manager 4.2.2

Terminology

In this article, the term NFS server refers to a Linux server that has exported one or more of its local directories using the Network File System (NFS). The terms NFS client and client refer to a Linux server that has mounted one or more NFS file systems.

Summary

Two important decisions face administrators who want to monitor NFS file systems using Zenoss.

  • First, they must decide whether to monitor the file systems only on the NFS server, to monitor them only on client devices, or to monitor them on the NFS server and one or more of its clients.
  • Second, if they choose to monitor NFS file systems on one or more client devices, they must also decide whether to monitor the file systems on the clients using the SSH or the SNMP protocol.

In this article we examine the trade-offs administrators face in making both decisions.

Monitoring an NFS Server Alone Versus Monitoring NFS Mounts on Client Devices

When an NFS file system is monitored on client devices, any disk usage events caused by the underlying local file system on the NFS server will be duplicated at least X times, where X is equal to the number of client systems with that file system mounted.

Consider this example: the directory /exports/dir1 on an NFS server named NFS1 is shared on a local network. The exported directory is mounted on 15 other devices on the LAN as an NFS file system. The NFS server and all 15 of its clients are being monitored by Zenoss. If the disk usage of the file system underlying /exports/dir1 on NFS1 exceeds a monitoring threshold, 16 events will appear in the Zenoss event console (one for the local file system on NFS1, and 15 additional events — one for each device where NFS1: /exports/dir1 is mounted). In the interest of reducing event duplication, administrators may wish to monitor local file systems on NFS servers but not to monitor remotely mounted NFS file systems.

Conversely, administrators may have equally good reasons for wanting to monitor NFS mounts from the client side on some or all devices despite the potential for duplication of Zenoss events. For example, they may want to ensure that an event is issued should client systems lose connectivity to the NFS server, or they may encounter a situation where monitoring of the NFS server itself may be impractical or impossible.

In this article, we will provide the steps required to monitor file systems in either scenario, whether using SSH or SNMP.

Note: any servers monitored using both SSH and SNMP will need to be configured to allow monitoring using both protocols.

Scenario I: Monitoring Linux Servers Using SNMP; NFS Server Monitoring Only

In this scenario, the default settings in the /Server/Linux device class are sufficient and no further configuration is necessary. By default, the zFileSystemMapIgnoreTypes configuration property for the /Server/Linux class includes the value networkDisk which excludes NFS mounts in the modeling and monitoring of Linux servers. When the NFS server itself is added to Zenoss, the local file systems (and hence any exported directories) will be included in monitoring.

Scenario II: Monitoring Linux Servers Using SNMP; Monitoring NFS Mounts on Client Servers

In this scenario, the value networkDisk should be removed from the zFileSystemMapIgnoreTypes configuration property of any individual devices where you wish to monitor NFS mounts. If you want to monitor NFS mounts on all servers in a device class, then networkDisk should be removed from the zFileSystemMapIgnoreTypes configuration property on that class.

Procedure

  1. Click the Infrastructure tab.
  2. Navigate to the class or individual device you wish to edit.
  3. If you are editing a device class, click Details. The Details navigation pane appears on the left.
  4. Click Configuration Properties on the left.
  5. Navigate to the zFileSystemMapIgnoreTypes configuration property.
  6. Double-click zFileSystemMapIgnoreTypes, delete networkDisk from the list of ignored file system types, and click Submit.
  7. The change will take effect upon the next regular modeling cycle. If you wish to test the change or observe the results immediately on a particular device, you can re-model that device manually. To do so:
    1. Click the Infrastructure tab and then click the device’s name.
    2. Click the Action Wheel (gear-shaped) icon on the bottom navigation bar and select Model Device from the menu. The Model Device status dialog box appears.
    3. When modeling has completed for the device, close the status dialog box by clicking the x button.
    4. Any NFS mounts on the server should now appear in the list of File Systems under Components.

Scenario III: Monitoring Linux Servers using SSH; NFS Server Monitoring Only

The zFileSystemMapIgnoreTypes configuration property is not used by the SSH file system monitor. As a result, NFS file systems are monitored by default for devices in /Server/SSH/ and its child classes, including /Server/SSH/Linux. This is potentially problematic in two ways. First, Administrators may prefer not to monitor NFS file systems from the client side for the reasons outlined above. Second, the Linux df command used to query Linux servers for disk information has a shortcoming known to cause Zenoss to incorrectly report disk utilization on NFS file systems. Therefore, administrators may wish to tune their Zenoss settings to omit monitoring of NFS shares from the client side for some or all Linux servers monitored using SSH.

The recommended solution is to create a new device class that uses both SSH and SNMP to monitor Linux servers. The new class is configured to monitor file systems using the SNMP protocol and monitor all other data points using SSH. Because the SNMP file system monitor consults the zFileSystemMapIgnoreTypes configuration property, the networkDisk value will prevent NFS file system monitoring for devices in the new class.

Procedure

Complete the following steps to create a blended SSH/SNMP Linux device class:

  1. Click the Infrastructure tab.
  2. Navigate to Server > SSH > Linux from the list of device classes on the left. In this example we will create our new blended protocol class as a subclass of /Devices/Server/SSH/Linux.
  3. With the /Server/SSH/Linux class selected, click the + button at the bottom of the Infrastructure left navigation bar. The Add Device Class dialog box is presented.
  4. Enter a Name for the new device class (in this example: SNMP-Filesystems-NoNFS).
  5. Optionally enter a Description for the new device class (in this example: “Linux SSH with SNMP for File systems”).
  6. Click Submit.
  7. Verify that the new SNMP-Filesystems-NoNFS class is selected.
  8. Click Details above the list of device classes. The Details navigation pane appears on the left.
  9. Click the Configuration Properties link on the left.
  10. Navigate to the zSnmpMonitorIgnore configuration property. Double-click the property, select and clear the Value check box, and click Submit.
  11. Click Modeler Plugins from the pane on the left. The list of available modeler plugins is displayed on the left (“Available”), and the list of modeler plugins used by the new class is displayed on the right (“Selected”).
  12. From the Available list, select the zenoss.snmp.HRFileSystemMap plugin, then click the right-facing arrow to move this plugin to the Selected list on the right.
  13. From the right Selected list, select the zenoss.cmd.df plugin and click the left-facing arrow to move it to the Available list.
  14. Click Save at the bottom of the page.
  15. Click the Advanced tab from the top navigation bar.
  16. From the secondary navigation bar at the top, click Monitoring Templates.
  17. In the search box (designated by a magnifying glass in the upper left) enter filesystem. A list of file system templates appears.
  18. Click the arrow next to the word FileSystem (the second of three choices listed) to expand the list of templates.
  19. Click the choice labeled /Server.
    Note: the snowflake icon next to this template’s location denotes that it is a component template.
  20. From the bottom navigation bar, click the Action Wheel icon and select Copy/Override Template. The Copy / Override dialog box is presented.
  21. From the Target menu, select /Server/SSH/Linux/SNMP-Filesystems-NoNFS.
  22. Click Submit.
  23. Navigate back to the Infrastructure page.
  24. Move any devices for which you wish to omit NFS file system monitoring to the new blended class. Navigate to the device name in the main device list, then click and drag the device to the /Server/SSH/Linux/ SNMP-Filesystems-NoNFS.
    Note: When selecting a device for drag and drop, do not click on the Device Name or Device Class links. Instead, click on the whitespace to the right of the Device Name (for example).
    The Move Devices dialog box will appear; click OK to move the device.
  25. The change will take effect upon the next regular modeling cycle. If you wish to test the change or observe the results immediately on a particular device, you can re-model that device manually. To do so:
    1. Click the device’s name, then click the Action Wheel icon in the bottom navigation bar, and select Model Device from the pop-up menu. The Model Device status box appears.
    2. When modeling has completed, close the dialog box by clicking the x button at the upper right of the status box.
    3. Any NFS file systems on the server should no longer appear in the list of File Systems under Components.

Scenario VI: Monitoring Linux Servers using SSH; Monitoring NFS Mounts on Client Servers

The steps necessary to implement this scenario are identical to those for Scenario III above with one exception: the networkDisk value for the for the zFileSystemMapIgnoreTypes configuration property will need to be deleted. This will allow monitoring of NFS mounts from the client side using the SNMP protocol, which will give accurate data about NFS mount usage levels.

Procedure

  1. Click the Infrastructure tab.
  2. Navigate to Server > SSH > Linux from the list of device classes. In this example we will create our new blended protocol class as a subclass of /Devices/Server/SSH/Linux.
  3. With the /Server/SSH/Linux class selected, click the + button at the bottom of the Infrastructure left navigation bar. The Add Device Class dialog box is presented.
  4. Enter the Name (in this example: SNMP-Filesystems-WithNFS)
  5. Optionally, enter a Description of the new device class (in this example: “Linux SSH with SNMP for File systems”).
  6. Click Submit.
  7. Verify that the new SNMP-Filesystems-WithNFS class is selected.
  8. Click Details above the list of device classes. The Details navigation pane appears on the left.
  9. Click the Configuration Properties menu choice on the left.
  10. Navigate to the zSnmpMonitorIgnore configuration property. Double-click the property and deselect the Value checkbox, then click Submit.
  11. Navigate to the zFileSystemMapIgnoreTypes configuration property. Double-click the property and delete the networkDisk value from the list of ignored disk types, then click Submit.
  12. Click Modeler Plugins the pane on the left. The list of available modeler plugins is displayed on the left (“Available”), and the list of modeler plugins used by the new class is displayed on the right (“Selected”).
  13. From the Available list, select the zenoss.snmp.HRFileSystemMap plugin, then click the right-facing arrow to move this plugin to the Selected pane on the right.
  14. From the right Selected list, highlight zenoss.cmd.df and click the left-facing arrow to move it to the Available pane.
  15. Click Save at the bottom of the page.
  16. Click the Advanced tab from the top navigation bar.
  17. From the secondary navigation bar at the top, click Monitoring Templates.
  18. In the search box (designated by a magnifying glass) enter filesystem.
  19. Click the arrow next to FileSystem, the second of the three categories of templates that appears, to display the list of individual templates.
  20. Select /Server.
    Note: the snowflake icon next to this monitoring template’s location denotes that it is a component template.
  21. From the bottom navigation bar, click the Action Wheel icon and select Copy/Override Template. The Copy / Override dialog box is presented.
  22. From the Target menu, select /Server/SSH/Linux/SNMP-Filesystems-WithNFS.
  23. Click Submit.
  24. Navigate back to the Infrastructure page.
  25. Move any devices for which you wish to omit NFS share monitoring to the new blended class. Navigate to the device name in the main device list, then click and drag the device to the /Server/SSH/Linux/ SNMP-Filesystems-NoNFS.

    Note: When selecting a device for drag and drop, do not click on the Device Name or Device Class links. Instead, click on the whitespace to the right of the Device Name (for example).

    The Move Devices dialog box will appear; click OK to move the device.

  26. The change will take effect upon the next regular modeling cycle. If you wish to test the change or observe the results immediately on a particular device, you can re-model that device manually. To do so:
    1. Click the device’s name, then click the Action Wheel icon on the bottom navigation bar and select Model Device from the pop-up menu. The Model Device status dialog box appears.
    2. When modeling has completed for each device, close the dialog box by clicking on the x button at the upper right of the status box.
    3. Any NFS mounts on the server should appear in the list of File Systems under Components.
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

  • Avatar
    mahesh vijapure *SUSPENDED*

    HI,

    Thank you for the valuable information.

    I would like to know if you any provision that can help us to monitor ALL mount events on Linux servers.

    Please revert back with the pointers .

    Mahesh Vijapure

Powered by Zendesk