Archived community.zenoss.org | full text search
Skip navigation
Currently Being Moderated

3.3 Modeling Devices

VERSION 4  Click to view document history
Created on: Jul 14, 2010 1:28 PM by Zenoss API - Last Modified:  Jul 14, 2010 1:47 PM by Zenoss API

 3. Modeling Devices

To model devices, the system can use:

  • SNMP

  • SSH

  • WMI

  • Telnet

The modeling method you select depends on your environment, and on the types of devices you want to model and monitor.

By default the system remodels each known device every 720 minutes (12 hours).

Tip

You can change the frequency with which devices are remodeled. Edit the value of the Modeler Cycle Interval in the collector's configuration.

For larger deployments, modeling frequency may impact performance. In such environments, you should stop the ZenModeler daemon and run the modeling process once daily from a cron job.

 3.1. Modeling Devices Using SNMP

Read this section for information about the methods  Zenoss uses to model devices using SNMP.

 3.1.1. Testing to See if a Device is Running SNMP

To test whether a device is running SNMP, run this command:

$ snmpwalk -v1 -c communityString DeviceName system

If this command does not time out, then SNMP is installed and working correctly.

 3.1.2. Configuring Windows Devices to Provide Data Through SNMP

By default, Windows may not have SNMP installed. To install SNMP on your particular version of Windows, please refer to the Microsoft documentation.

After setting up and configuring the SNMP service, you must set the zSnmpCommunity string in Zenoss to match, to obtain SNMP data.

If you want processor and memory monitoring, install SNMP-Informant on the device. Go to http://www.snmp-informant.com and download SNMP for Windows.

To collect Windows event logs or log files from a Windows box using syslog, you can use the SyslogAgent Windows add-on, available from:

http://syslogserver.com/syslogagent.html

 3.1.3. Configuring Linux Devices to Provide Data Through SNMP

To configure a Linux machine for monitoring, it must have SNMP installed. A good Linux SNMP application is net-snmp. Download, install, and configure net-snmp to then use SNMP to monitor Linux devices.

 3.2. Modeling Devices Using SSH/COMMAND

You can gather additional information by running commands on the remote device and interpreting the results. This provides a more scalable and flexible way to gather information that may not be available through any other means.

Each built-in modeling command plugin is differentiated by the platform on which it runs. To determine the platform for the device you want to model, run the uname command in a shell on the device.

To model a device using command plugins, first add the device by using the protocol "none," and then choose the plugins you want to apply:

  1. From the navigation bar, select Infrastructure.

  2. Select Add a Single Device from (Add Devices).

    The Add a Single Device dialog appears.

  3. Enter values for Name or IP and Device Class.

  4. De-select the Model Device option.

  5. Click Add.

  6. After adding the device, select the device name in the devices list.

    The Device summary page appears.

  7. In the left panel, select Configuration Properties.

  8. If necessary, set the values of the zCommandUsername and zCommandPassword configuration properties to the user name and password of the device (or set up authentication by using RSA/DSA keys.)

    Note

    If using RSA keys for a device or device class, change the value of the zKeyPath configuration property to:

    ~/.ssh/id_rsa

  9. In the left panel, select Modeler Plugins.

  10. Click Add Fields for a complete list of command plugins.

  11. Drag zenoss.cmd.uname from the Available list (on the right) to the Plugins list (on the left). Place it at the top of the list.

     

    Figure 3.4. Add Plugin

    Add Plugin

  12. Click the X next to plugins you want to remove, and then drag remaining plugins to the left.

  13. Click Save.

  14. Remodel the device.

 3.2.1. Using Device Class to Monitor Devices Using SSH

The /Server/Cmd device class is an example configuration for modeling and monitoring devices using SSH. The zCollectorPlugins have been modified (see the section titled "Modeling Using SSH/Command"), and the device, file system, and Ethernet interface templates used to gather data over SSH have been created. You can use this device class as a reference for your own configuration; or, if you have a device that needs to be modeled or monitored via SSH/Command, you can place it in this device class to use the pre-configured templates and configuration properties. You also must set the zCommandUsername and zCommandPassword configuration properties to the appropriate SSH login information for each device.

 3.3. Modeling Devices Using Port Scan

You can model IP services by doing a port scan, using the Nmap Security Scanner (http://nmap.org/). You must provide the full path to your system's nmap command.

To determine where nmap is installed, at the command line, enter:

which nmap

If your system returns a result similar to:

/usr/bin/which: no nmap in (/opt/zenoss/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/opt/zenoss/bin)

then nmap is not installed. Install it, and then try again.

After locating the nmap command (including the directory beginning with /), enter the following as the zenoss user on the  Zenoss server:

cd $ZENHOME/libexec ln -s Full_Path_to_nmap

To model a device using a port scan:

  1. View the device properties (from the left panel, select Configuration Properties).

  2. Change the zTransportPreference value to portscan.

  3. Remodel the device.

 3.3.1. Using the /Server/Scan Device Class to Monitor with Port Scan

The /Server/Scan device class is an example configuration for modeling devices by using a port scan. You can use this device class as a reference for your own configuration; or, if you have a device that will use only a port scan, you can place it under this device class and remodel the device.

Comments (0)