This ZenPack provides monitoring support for Linux, leveraging OpenSSH for data access. In addition to system health, disks, LVM, services, and processes are monitored.
This version of the LinuxMonitor ZenPack completely replaces the EnterpriseLinux ZenPack. To avoid errors arising from conflicts between them, the EnterpriseLinux ZenPack should be removed after the new LinuxMonitor ZenPack has been installed.
The following entities will be automatically discovered. The attributes and collections will be updated on Zenoss normal remodeling interval which defaults to every 12 hours.
All Linux servers must have a device entry in an organizer below the /Devices/Server/SSH/Linux device class.
Tip: The SSH monitoring feature will attempt to use key-based authentication before using a configuration properties password value.
This ZenPack requires the ability to run the pvs, vgs, lvs, systemctl, initctl, df, and service commands, remotely on your Linux server(s) using SSH. By default, these commands are only allowed to be run locally. To run these commands remotely, the root user must not be required to use a tty.
Install the sudo package on your server.
Allow root user to execute commands via ssh without a TTY.
Run the visudo command to edit the /etc/sudoers file.
Find the line containing root ALL=(ALL) ALL.
Add this line underneath it:Defaults:root !requiretty
Save the changes and exit.
This ZenPack requires the ability to run the pvs, vgs, lvs, systemctl, initctl, df, and service commands, remotely on your Linux server(s) using SSH. By default, most of these commands are only allowed to be run by the root user. The output of the systemctl, initctl, df, and service commands can vary depending on whether or not they are executed by a user with root privileges. Furthermore, this ZenPack expects these commands be in the user's path. Normally this is only true for the root user.
Assuming that you've created a user named zenmonitor on your Linux servers for monitoring purposes, you can follow these steps to allow the zenmonitor user to run the commands.
Install the sudo package on your server
Allow the zenmonitor user to run the required commands via SSH without a tty.
Edit /etc/sudoers.d/zenoss (or /etc/sudoers if sudoers.d is not supported) and add the following lines to the bottom of the file:
Cmnd_Alias ZENOSS_CMDS = \
Cmnd_Alias ZENOSS_LVM_CMDS = \
/sbin/pvs, /usr/sbin/pvs, \
/sbin/vgs, /usr/sbin/vgs, \
Cmnd_Alias ZENOSS_SVC_CMDS = \
/sbin/initctl list, \
/sbin/service *, /usr/sbin/service *, \
/bin/ls -l /etc/rc?.d/
zenmonitor ALL=(ALL) NOPASSWD: \
Save, ensuring all paths for these commands are correct
Make sure that you have the latest release of OpenSSH installed on the target system. This is especially important for older versions of RHEL, CentOS, Ubuntu, and SUSE Linux.
If using a non-root user on SUSE Linux, you must run the following as root due to SUSE restrictions on the dmesg command: echo 0 > /proc/sys/kernel/dmesg_restrict
echo 0 > /proc/sys/kernel/dmesg_restrict
On SUSE Linux, the pvs, vgs, and lvs commands are located in /sbin. Please ensure that each command can be manually executed remotely.
The zSshConcurrentSessions configuration property has a default value of 5. If you increase this value, you must update the allowed number of sessions in the sshd configuration on the target device and restart the sshd daemon.
The following procedure assumes that credentials have been set.
Select Infrastructure from the navigation bar.
Select Add a Single Device from the Add Device list of options. The Add a Single Device dialog appears.
Enter the following information in the dialog:
Alternatively you can use zenbatchload to add Linux servers from the command line. To do this, you must create a text file with the host name, username, and password of each of the servers you want to add. Multiple endpoints can be added under the same /Devices/Server/SSH/Linux section. Here is an example.
HOST-NAME zCommandUsername="USER", zCommandPassword="PASSWORD"
You can then load the Linux servers into the Zenoss Platform with the following command: zenbatchload FILE-NAME
The Linux OS services are modeled using the zenoss.cmd.linux.os_service modeler plugin. The following systems are supported:
Version 2.3.0 supports monitoring the status of the systemd, upstart, and systemV system services. The OSService-SYSTEMD, OSService-UPSTART and OSService-SYSTEMD monitoring templates are automatically bound to a service component based on the target's modeled init system value. The configuration properties zLinuxServicesModeled and zLinuxServicesNotModeled restrict the services that are modeled and thereby monitored.
For systemd, only services that are enabled (or have "enabled-runtime" status) are modeled and monitored. Furthermore, "oneshot" services or services with unmet conditions are not modeled or monitored. In order to prevent a service from being modeled and monitored by Zenoss, the service will have to be stopped and disabled. One of those actions alone won't be sufficient. Another way to prevent a service from being modeled is to add it to the zLinuxServicesNotModeled zProperty. To also model active services of any UnitFileState (enabled, disabled, static, etc.), the zLinuxModelAllActiveServices configuration property should be set to True.
Upstart devices monitor all enabled services managed by upstart and additionally also monitor systemV services that run in the current runlevel of the same device. The Init System property, found in the Details menu of the service, displays which init system the service is managed by.
SystemV devices model and monitor all services in the current runlevel.
zLinuxServiceModeled and zLinuxServiceNotModeled can support multiple regular expressions separated by new lines. Although the zLinuxModelAllActiveServices property models all active services that are also disabled when checked, this property will still not model "oneshot" services or those services whose conditions are not met. The OSService monitoring template generates events on every collection cycle for a service that is down. The events are automatically cleared if the service is up again.
zLinuxServicesNotModeled overrules zLinuxServicesModeled. If a service name matches the regular expressions in both configuration properties, the service will not modeled.
Installing this ZenPack will add the following items to your Zenoss system.
As of version 2.3.0, the zenoss.cmd.linux.rpm and zenoss.cmd.linux.alt_kernel_name modeler plugins are disabled by default on new installs. If upgrading from a version previous to 2.3.0 they will still be enabled by default. We recommend that you disable the zenoss.cmd.linux.alt_kernel_name modeler plugin if you have a customized /etc/issue file as the customization could affect modeling results.
Device (in /Devices/Server/SSH/Linux)
In version 2.3.0, support for the MemAdjustedUsed and MemAdjustedUsedPercent data points were added. These data points include Buffers, Cached, and Free in the memory used calculation. These data points are not added by default. To use them, you will need to create data points called MemAdjustedUsed and MemAdjustedUsedPercent in the mem data source on the device template.
CPU (in /Devices/Server/SSH/Linux)
HardDisk (in /Devices/Server/SSH/Linux)
There were significant changes between 2.4 and 2.6 in the I/O subsystem. As a result, some statistic information disappeared. The translation from a disk address relative to a partition to the disk address relative to the host disk happens much earlier. All merges and timings now happen at the disk level rather than at both the disk and partition level as in 2.4. There are only four fields available for partitions on 2.6 machines and in this case few data points will be missed.
IpService (in /Devices)
FileSystem (in /Devices/Server/SSH/Linux)
Note: File Systems components will also show graphs from their related Logical Volume or Hard Disk.
ethernetCsmacd (in /Devices/Server/SSH/Linux)
SnapshotVolume (in /Devices/Server/SSH/Linux)
Note: Snapshot Volumes will also show graphs from its related Volume Group and Hard Disk.
PhysicalVolume (in /Devices/Server/SSH/Linux)
Note: Physical Volumes will also show graphs from its related Hard Disk.
VolumeGroup (in /Devices/Server/SSH/Linux)
Note: Volume Groups will also show graphs from its related Physical Volumes.
LogicalVolume (in /Devices/Server/SSH/Linux)
Note: Logical Volumes will also show graphs from its related Volume Group and Hard Disk.
ThinPool (in /Devices/Server/SSH/Linux)
Note: Thin Pools will also show graphs from its related Volume Group and Hard Disk.
OSProcess (in /Devices/Server/SSH/Linux)
OSService-SYSTEMD (in /Devices/Server/SSH/Linux)
OSService-UPSTART (in /Devices/Server/SSH/Linux)
OSService-SYSTEMV (in /Devices/Server/SSH/Linux)
When combined with the Zenoss Service Dynamics product, this ZenPack adds built-in Service Impact capability for services running on Linux. The following service impact relationships are automatically added. These will be included in any services that contain one or more of the explicitly mentioned entities.
Service Impact Relationships
The following Linux distributions are officially supported. Other distributions may also be supported, especially derivatives of Debian and Red Hat Enterprise Linux.