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
- Click the Infrastructure tab.
- Navigate to the class or individual device you wish to edit.
- If you are editing a device class, click Details. The Details navigation pane appears on the left.
- Click Configuration Properties on the left.
- Navigate to the zFileSystemMapIgnoreTypes configuration property.
- Double-click zFileSystemMapIgnoreTypes, delete networkDisk from the list of ignored file system types, and click Submit.
- 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:
- Click the Infrastructure tab and then click the device’s name.
- 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.
- When modeling has completed for the device, close the status dialog box by clicking the x button.
- 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:
- Click the Infrastructure tab.
- 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.
- 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.
- Enter a Name for the new device class (in this example: SNMP-Filesystems-NoNFS).
- Optionally enter a Description for the new device class (in this example: “Linux SSH with SNMP for File systems”).
- Click Submit.
- Verify that the new SNMP-Filesystems-NoNFS class is selected.
- Click Details above the list of device classes. The Details navigation pane appears on the left.
- Click the Configuration Properties link on the left.
- Navigate to the zSnmpMonitorIgnore configuration property. Double-click the property, select and clear the Value check box, and click Submit.
- 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”).
- 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.
- From the right Selected list, select the zenoss.cmd.df plugin and click the left-facing arrow to move it to the Available list.
- Click Save at the bottom of the page.
- Click the Advanced tab from the top navigation bar.
- From the secondary navigation bar at the top, click Monitoring Templates.
- In the search box (designated by a magnifying glass in the upper left) enter filesystem. A list of file system templates appears.
- Click the arrow next to the word FileSystem (the second of three choices listed) to expand the list of templates.
- Click the choice labeled /Server.
Note: the snowflake icon next to this template’s location denotes that it is a component template.
- From the bottom navigation bar, click the Action Wheel icon and select Copy/Override Template. The Copy / Override dialog box is presented.
- From the Target menu, select /Server/SSH/Linux/SNMP-Filesystems-NoNFS.
- Click Submit.
- Navigate back to the Infrastructure page.
- 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.
- 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:
- 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.
- When modeling has completed, close the dialog box by clicking the x button at the upper right of the status box.
- 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
- Click the Infrastructure tab.
- 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.
- 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.
- Enter the Name (in this example: SNMP-Filesystems-WithNFS)
- Optionally, enter a Description of the new device class (in this example: “Linux SSH with SNMP for File systems”).
- Click Submit.
- Verify that the new SNMP-Filesystems-WithNFS class is selected.
- Click Details above the list of device classes. The Details navigation pane appears on the left.
- Click the Configuration Properties menu choice on the left.
- Navigate to the zSnmpMonitorIgnore configuration property. Double-click the property and deselect the Value checkbox, then click Submit.
- 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.
- 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”).
- 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.
- From the right Selected list, highlight zenoss.cmd.df and click the left-facing arrow to move it to the Available pane.
- Click Save at the bottom of the page.
- Click the Advanced tab from the top navigation bar.
- From the secondary navigation bar at the top, click Monitoring Templates.
- In the search box (designated by a magnifying glass) enter filesystem.
- Click the arrow next to FileSystem, the second of the three categories of templates that appears, to display the list of individual templates.
- Select /Server.
Note: the snowflake icon next to this monitoring template’s location denotes that it is a component template.
- From the bottom navigation bar, click the Action Wheel icon and select Copy/Override Template. The Copy / Override dialog box is presented.
- From the Target menu, select /Server/SSH/Linux/SNMP-Filesystems-WithNFS.
- Click Submit.
- Navigate back to the Infrastructure page.
- 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.
- 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:
- 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.
- 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.
- Any NFS mounts on the server should appear in the list of File Systems under Components.
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