You can monitor device remotely via SSH. Monitoring devices remotely basically consists of 2 distinct installations. You must install the Zenoss plugins on each remote device you want to monitor as detailed in the following sub-sections.
The Zenoss Plugins are packaged in 2 formats: native format and source distribution. The native format (RPM) is recommended in Red Hat based systems that support Red Hat Package Management. Using the RPM distribution allows system administrators to easily update the package when newer versions are released. The source distribution is assembled using setuptools, and is commonly used by developers rather than system administrators. The benefit of using the source distribution is that you do not need root privileges to install the Zenoss plugins.
The RPM for the zenoss plugins is a noarch RPM, which means it can be installed on any architecture (i386, amd64, ia_64). The only external dependency needed to install the zenoss plugins RPM is python itself. Most Linux distributions include python in their standard loads.
To install the zenoss plugins RPM use the following command:
$ sudo rpm -Uvh zenoss-plugins-*.rpm
Where 'zenoss-plugins-*.rpm' equals the latest Zenoss plugin RPM file.
As noted above, the setuptools installation method allows non-rootusers to install and use the zenoss plugins. The full set of setuptools arguments are supported, but most people will want to use the default build and install commands:
$ python setup.py build
$ sudo python setup.py install
The above commands will install the Zenoss Plugins into directories that are accessible to all users. If you are unable to install system software (because you are a nonprivileged user) you can still install and use the Zenoss Plugins. However, you must go through some extra leg work to get the plugins installed. For a more detailed discussion of how to install the plugins using a non-privileged account see the following URL:
http://dev.zenoss.org/trac/wiki/FAQ#HowdoIinstalltheZenossPlugins
An alternative to downloading the source tarball, exploding it, and running setup.py is to use setuptool's built-in command 'easy_install'. To automatically download and install the zenoss plugins using easy_install run the following command:
$ sudo easy_install Zenoss-Plugins
Where 'Zenoss-Plugins' is the name of the current Zenoss plugin file.
The entry point to the Zenoss Plugins is the zenplugin.py command. When run without any arguments, zenplugin.py reports the proper usage of the script providing insight into which options should be run for troubleshooting.
The Zenoss Plugins detect platform specific runtime values using plugins. For example, the CPU plugin for the linux2 platform uses /proc to read values. In comparison, the CPU plugin for the freebsd5 platform uses a different technique. In order to test the installation you will need to determine which plugins are available for your platform. To do this run the following command:
$ zenplugin.py --list-plugins
After determining a list of supported plugins for your platform run the zenplugin.py with the plugin name as the argument. The following command line illustrates:
$ zenplugin.py cpu
If you receive a "command not found" when running the zenplugin.py command check to make sure that the directory zenplugin.py was installed into is included in your PATH. If you installed via rpm you can use the command "rpm -ql zenoss-plugins | grep zenplugin.py". If you installed via setuptools pay close attention to the "Installing..." messages to see the full directory paths.
This message indicates that no development work has been put towards implementing plugins for your particular platform. If you receive this message and would like the plugins to support your platform mail the output of the following command to the development team:
$ python -c 'import sys; print sys.platform'
You must change the Zenoss properties for the group where you want to collect remote information using SSH.
-
Navigate to the device class path you want to monitor remotely. You can apply this monitoring per device or per device class path.
-
Change the zProperties value for the group. Click the zProperties tab.
The zProperties tab appears.
You must make changes to the following zProperties:
-
zCollectorPlugins
-
zCommandPassword
-
zCommandPath
-
zCommandUsername
-
zSnmpMonitorIgnore
-
zTransportPreference
Here are the values we have setup on our remote devices. These have a pre-shared key (with no password) setup from the collector to the remote boxes (it can also use password authorization if the password is entered into zCommandPassword.
zProperties Value zCollectorPlugins snmp|portscan zCommandPassword The SSH password for the remote machine. zCommandPath The path to zenplugin.py zCommandUsername The SSH Username for the remote machine. zSnmpMonitorIgnore True zTransportPreference command NOTE: It takes two passes to get full modeling. The first gets the platform type so we know what plugins to run on the second pass which gives us interfaces, filesystems, etc. Run the command:
$ zenmodeler run -d enter_server_name_here
Run the command a second time to use the plug ins the command gathered on the first pass.
-
The /Server/Cmd device class is an example configuration for modeling and monitoring devices using SSH. The zProperties have been modified as described above, and Device, Filesystem and Ethernet interface templates that 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 under this device class to use the preconfigured templates and zProperties. You will still need to set the zCommandUsername and zCommandPassword zProperties to the appropriate SSH login information for each device.