Zenoss Administration 06 022010 2.5 v02
Zenoss Administration 06 022010 2.5 v02
www.zenoss.com
Zenoss Administration
Copyright 2010 Zenoss, Inc., 275 West St. Suite 204, Annapolis, MD 21401, U.S.A. All rights reserved.
This work is licensed under a Creative Commons Attribution Share Alike 3.0 License. To view a copy of this license, visit http://
creativecommons.org/licenses/by-sa/3.0/; or send a letter to Creative Commons, 171 2nd Street, Suite 300, San Francisco, California,
94105, USA.
The Zenoss logo is a registered trademark of Zenoss, Inc. Zenoss and Open Enterprise Management are trademarks of Zenoss, Inc. in
the U.S. and other countries.
Oracle and the Oracle logo are registered trademarks of the Oracle Corporation.
Windows is a registered trademark of Microsoft Corporation in the United States and other countries.
All other companies and products mentioned are trademarks and property of their respective owners.
iii
Zenoss Administration
iv
Zenoss Administration
v
Zenoss Administration
vi
Zenoss Administration
vii
Zenoss Administration
viii
Zenoss Administration
14.4.2.1. Before You Restore (for Versions Earlier Than 2.4.5) ...................................... 166
14.4.2.2. Restore Options ........................................................................................... 166
14.5. Working with the Job Manager ........................................................................................... 167
14.5.1. Viewing Jobs .......................................................................................................... 167
14.5.2. Running the zenjobs Daemon .................................................................................. 167
14.6. Maintenance and Performance Tuning ................................................................................ 168
14.6.1. Pack ZEO Database ............................................................................................... 168
14.6.2. Log Rotate Script .................................................................................................... 168
14.6.2.1. Zenoss 2.4.x ................................................................................................ 168
14.6.2.2. Zenoss 2.3.3 and Earlier ............................................................................... 168
A. Daemon Commands and Options ................................................................................................... 170
A.1. Automated Modeling Daemons ............................................................................................ 170
A.2. Availability Monitoring Daemons ........................................................................................... 170
A.3. Event Collection Daemons ................................................................................................... 170
A.4. Performance Monitoring Daemons ........................................................................................ 171
A.5. Automated Response Daemons ........................................................................................... 171
B. SNMP Device Preparation .............................................................................................................. 172
B.1. Net-SNMP ........................................................................................................................... 172
B.2. SNMP V3 Support ............................................................................................................... 172
B.3. Community Information ........................................................................................................ 173
B.4. System Contact Information ................................................................................................. 173
B.5. Extra Information ................................................................................................................. 173
C. Using an Existing MySQL Server to Store Events ............................................................................ 174
C.1. About .................................................................................................................................. 174
C.2. Procedure ........................................................................................................................... 174
D. Syslog Device Preparation ............................................................................................................. 175
D.1. Forwarding Syslog Messages from UNIX/Linux Devices ........................................................ 175
D.2. Forwarding Syslog Messages from a Cisco IOS Router ......................................................... 175
D.2.1. Other Cisco Syslog Configurations ............................................................................ 175
D.3. Forwarding Syslog Messages from a Cisco CatOS Switch ..................................................... 176
D.4. Forwarding Syslog Messages using Syslog-ng ...................................................................... 176
E. TALES Expressions ....................................................................................................................... 177
E.1. About Tales Expressions ..................................................................................................... 177
E.1.1. Examples ................................................................................................................. 177
E.2. TALES Device Attributes ..................................................................................................... 177
E.3. Tales Event Attributes ......................................................................................................... 178
Glossary ............................................................................................................................................. 180
ix
Chapter 1. About Zenoss
Zenoss is today's premier, open source IT management solution. Through a single, Web-based console, it
enables you to manage the status and health of your infrastructure.
The power of Zenoss starts with its in-depth Inventory and IT Configuration Database. It creates this database by
discovering managed resources -- servers, networks, and other devices -- in your IT environment. The resulting
configuration model provides a complete inventory of your servers, network devices, and software applications,
down to the level of resource components (interfaces, services and processes, and installed software).
Once Zenoss discovers the IT infrastructure, it automatically begins monitoring the performance of each device.
It also provides events and fault management features that tie into the configuration database. These features
help drive operational efficiency and productivity by automating many of the notification, alerts, escalation, and
remediation tasks you perform each day.
Zenoss unifies these areas into a single system with a modern, interactive Web user interface.
1
About Zenoss
Modeling
The system's model enables it to understand the environment in which it operates. Through sophisticated
and detailed analysis, Zenoss determines how to monitor and manage complex IT environments. The core
of the standard model describes basic information about each device's operating system and hardware. The
model is object-based, and is easily extended through object inheritance.
Discovery
With a sophisticated model, manual input and maintenance of data is challenging. To address this challenge,
Zenoss uses discovery to populate the model. During discovery, the system accesses each monitored de-
vice in your infrastructure and interrogates it in detail, acquiring information about its components, network
integration, and dependencies.
Normalization
Because Zenoss collects information from different platforms and through different protocols, the amount
and format of available information varies. For example, file system information gathered from a Linux server
differs from similar information gathered from a Windows server. Zenoss standardizes the data gathered so
that you can perform valid comparisons of metrics gathered by different methods and for different systems.
Agentless Data Collection
To gather information, Zenoss relies on agent-less data collection. By communicating with a device through
one of several protocols (including SNMP, SSH, Telnet, and WMI), it minimizes the impact on monitored
systems.
Full IT Infrastructure
Unlike other tools, the system's inclusive approach unifies all areas of the IT infrastructure--network, servers,
and applications--to eliminate your need to access multiple tools.
Configuration Inheritance
Zenoss extends the concept of inheritance in object-oriented languages to configuration. All core configura-
tion parameters (known as zProperties) and monitoring directions (monitoring templates) use inheritance to
describe how a device should be monitored. Inheritance allows you to describe, at a high level, how devices
should be monitored. It also supports ongoing refinements to the configuration. (For detailed information on
inheritance and templates, refer to the chapter titled "Properties and Templates.")
Cross-Platform Monitoring
Zenoss monitors the performance and availability of heterogeneous operating systems (including Windows,
Linux, and Unix), SNMP-enabled network devices (such as Cisco), and a variety of software applications
(such as WebLogic and VMware).
Scale
You can deploy the system on a single server to manage hundreds of devices. The Enterprise version allows
you to manage large, distributed systems by using horizontal scaling of its collectors.
Extensibility
The system's extension mechanism, ZenPacks, allow for rapid addition and modification to customize your
environment.
2
About Zenoss
Through the user interface, you access and manage key components and features. From here, you can:
Watch the status of your enterprise, using the Dashboard
Work with devices, networks, and systems
Monitor and respond to events
Manage users
Create and run reports
The user layer Interacts with the data layer and translates the information for display in the user interface.
3
About Zenoss
The modeling system uses SNMP, SSH, and WMI to collect information from remote machines. The raw infor-
mation is fed into a plugin system (modeling plugins) that normalizes the data into a format that matches the
core model.
Monitoring daemons track the availability and performance of the IT infrastructure. Using multiple protocols,
they store performance information locally in RRD files, thus allowing the collectors to be spread out among
many collector machines. Status and availability information, such as ping failures and threshold breaches, are
returned through ZenHub to the event system.
For more information about system daemons, see the appendix titled "Daemon Commands and Options."
As shown in the previous illustration, model-driven monitoring begins with discovery, which populates the model.
It continues as the configuration defined in the model is automatically applied and monitoring begins. As the
system runs, the configuration is further fine-tuned.
The model-driven monitoring approach is demonstrated by the following file system monitoring scenario.
4
About Zenoss
This illustration shows the result of a system being monitored, using the default configuration. The graph shows
that the threshold of 90% has been exceeded numerous times. Because the data in the model is normalized,
thresholds will apply regardless of the collection mechanism (SNMP, SSH, and WMI).
The chapter titled "Properties and Templates" provides more information about modifying the monitoring con-
figuration.
1.4. Terminology
You should understand product-specific use of the following terms when working with the system.
Glossary
data point Data returned from a data source. In many cases, there is only one data point
for a data source (such as in SNMP); but there may also be many data points
for a data source (such as when a command results in the output of several
variables).
data source Method used to collect monitoring information. Example data sources include
SNMP OIDs, SSH commands, and perfmon paths.
device Primary monitoring object in the system. Generally, a device is the combination
of hardware and an operating system.
device class Special type of organizer used to manage how the system models and monitors
devices (through zProperties and monitoring templates).
discovery Process by which Zenoss gathers detailed information about devices in the
infrastructure. Results of discovery are used to populate the model.
event Manifestation of important occurrence within the system. Events are generated
internally (such as when a threshold is exceeded) or externally (such as through
a syslog message or SNMP trap).
event rules Controls how events are manipulated as they enter the system (for example,
changing the severity of an event). zProperties configure event rules.
managed resource Servers, networks, virtual machines, and other devices in the IT environment.
model Representation of the IT infrastructure. The model tells the system "what is out
there" and how to monitor it.
organizer Hierarchical system used to describe locations and groups. Zenoss also in-
cludes special organizers, which are classes that control system configuration.
resource component Interfaces, services and processes, and installed software in the IT environ-
ment.
5
About Zenoss
threshold Defines a value beyond which a data point should not go. When a threshold is
reached, the system generates an event. Typically, threshold events use the /
Perf event class.
6
Chapter 2. Using Zenoss
Read the following sections to learn more about working in the interface, and to learn how to:
Customize the dashboard
Search for devices
Navigate the event console
Run commands
Create and use alerts
Create custom event views
7
Using Zenoss
Browse By, which lets you see data based on any of the local groupings the system enables you to create.
Selections include:
Systems - Lets you see network status, categorized into the system groupings you create.
Groups - Provides access to the same data as when browsing by Systems, with the exception of per-
formance data.
Locations - Allows you to see data related to devices grouped by physical locations.
Networks - Shows devices and sub-networks, based on IP address groupings.
Reports - Lets you view and define reports.
The following figure illustrates key selections from the Navigation menu.
8
Using Zenoss
Click the triangular indicator at the top of the Navigation menu to hide or display menu selections.
Click the pin icon to "pin" the menu into place, keeping it visible in all views.
2.1.2. Breadcrumbs
The breadcrumbs area shows your current location. Use this trail to keep track of your location and navigate to
previously selected pages in the interface hierarchy.
9
Using Zenoss
Note
From other Preferences tabs, you can manage administered objects, event views, and alerting rules.
Logout - Click to log out.
Help - Click to access community product documentation, FAQs, and HowTos, at:
http://community.zenoss.org/community/documentation
2.1.4. Portlets
The main content of the Dashboard comprises portlets, which provide information about the system and your
infrastructure. Portlets that you can display on the dashboard are:
Site Window - Initially provides links to resources such as product guides, forums, and training events. (The
URL for the default content is http://www2.zenoss.com/in-app-welcome.) You can customize this portlet to
display content from any URL.
Device Issues - Displays a list of devices, associated with color-coded events of error or critical severity
levels. Click a device in the list to view its event log.
Google Maps (device locations) - Shows configured locations and configured network connections.
10
Using Zenoss
Object Watch List - Allows the display of high-level status device classes, groups, systems, event classes,
and locations that you select.
11
Using Zenoss
You can customize each portlet that appears on the Dashboard. Customization options vary depending on the
portlet type.
Click * (asterisk), which appears at the top right corner of a portlet, to view and customize display options. Click
Save Settings to save your selections and then return to main portlet content.
The following table lists information you can customize for each Zenoss portlet.
To add a portlet, select Add portlet (located below the server time display at the top right of the Dashboard).
From the Add Portlet dialog, you can add a portlet or restore portlets to the default view.
Your Dashboard can display more than one of the same portlet type. You might want to display duplicate portlets,
for example, to get at-a-glance information about more than one device location that appears in the Google
Maps portlet.
12
Using Zenoss
The network displayed is configured for each user. From the Preferences area, modify Network Map Start Object
to indicate a network, and then click Save.
Double-click a device or network icon in the map to focus on it. Focusing on a node:
Centers it on the map
Shows links from the node, based on the number of hops selected
Alternatively, you can type the name or IP address of a device or network in the Selected Device or Network
field, and then click Refresh to focus on that node.
Note
When you select a node, the network map displays only the links that are currently loaded into the map. It
does not download and display new link data.
13
Using Zenoss
You can filter the devices that appear on the network map. To do this, select a filter from the Device Class Filter
list of options. For example, to show only Linux devices on the map, select /Server/Linux from the list of options,
and then click Refresh.
You can adjust the number of hops that appear on the network map. Use the Number of Hops slider, which
adjusts the number of hops from 1 to 4.
Use the Repulsion slider to expand or contract the icons that appear on the map. Move the slider right to expand
the icons, or left to contract them.
Select the Fit to Window option to bring all displayed icons into the viewable area.
To see detailed information about a device or network, select it in the map, and then click Go to Status Page.
2.1.6. Menus
The interface offers two types of menus from which you make selections:
Page menus
Table menus
Page menus extend the tabs that appear at the top of the page. Generally, actions initiated through a page menu
affect the object or objects that the page represents. This could be, for example, a device or any group of devices.
As shown in the following figure, the Page menu is expanded next to the Classes tab.
Table menus generally affect objects in a table. Access table menus by clicking the triangle next to a table title
on a page. As shown in the following figure, the Sub-Devices table menu is expanded.
14
Using Zenoss
15
Using Zenoss
The portlet appears at the top right of the Dashboard main area.
Note
After selecting a new layout, you likely will need to rearrange the portlets on the Dashboard.
16
Using Zenoss
Browse By - Select an option from the Browse By area of the Navigation menu if you do not know the device
name, or if you are not searching for a specific device. You can browse by:
Systems - Browse by common device types, such as file servers, printers, and infrastructure.
Groups - Browse by groups that you set up to organize your devices.
Locations - Browse by groups based on location.
To access the event console, click Event Console in the Navigation menu.
You can sort events by any column that appears in the event console. To sort events, click a column header.
Clicking the header toggles between ascending and descending sort order.
17
Using Zenoss
You can filter the events that appear in the list in several ways, depending on the field type. Date fields (such
as First Seen and Last Seen) allow you to enter a value or use a date selection tool to limit the list. For other
fields, such as Device, Component, and Event Class, enter a match value to limit the list.
The Count field allows you to filter the list when compared to a value:
n - Displays events with counts greater than or equal to that value.
<n - Displays events with counts less than that value.
<=n - Displays events with counts less than or equal to that value.
=n - Displays events with counts equal to that value.
You can save your custom event console view by bookmarking it for quick access later. To do this:
1. Select Configure > Save this configuration.
The system adds a link titled "Event Console" to your bookmarks list.
18
Using Zenoss
Tip: You may want to re-title the bookmark, particularly if you choose to save more than one event console
view.
To configure automatic refresh, select one of the time increments from the Refresh list. By default, automatic
refresh is enabled and set to refresh each minute.
Tip: Do not double-click on or near the device name, component, or device class in the row. Doing this displays
details about that entity, rather than information about the event.
19
Using Zenoss
To see more information about the event, click Show more details.
You can use the Log area to add specific information about the event. Enter details, and then click Add.
20
Using Zenoss
The system includes several built-in commands, such as ping and traceroute.
The system runs the command. Command output appears on the screen.
21
Using Zenoss
2. To set up the mail servers, you must configure the SMTP Host, the SMTP Port, SNPP Host, and the SNPP
Port.
Now you are prepared to create and use alerting rules for the system.
22
Using Zenoss
The main Alerting Rules page appears, showing the alert you just created.
6. Click the name of the alert.
23
Using Zenoss
If action is defined as email the event will be emailed. If the default action is set to page, you must define
and test the "Page Command" (from the Settings > Settings tab). Many wireless phone systems have SMTP
to Simple Messaging Service (SMS) gateways, so in some cases, you also can use email to send pages.
By default, email alerts are sent to the email address for this user. Pager alerts go to the specified pager
address. You can override this by filling in the Address (optional) field.
5. The Where area of the tab sets the thresholds for the Alert.
The default rule that is created contains the thresholds for an event occurrence where the Event State is
New," Severity is greater than Error," and Production State is Production." You can change these thresh-
olds by changing the values in the pop-up menus.
6. You also can add more filters to the Where area by choosing a filter from the Add Filter menu. Adding a filter
creates a pop-menu in the Where area from which you can choose additional values to filter the event. To
Remove any of the filters for the alert, click the (-) minus button.
7. Click Save to save the values you entered on this tab.
Notes:
Setting Enabled to True disables all alert windows, and is the same as a 24x7 alerting window.
To alert only during certain periods specified in the alerting windows, set Enabled to False.
To ensure that an alerting rule will not send alerts, ensure that Enabled is set to False and that all alerting
rule windows are not enabled.
24
Using Zenoss
2. Use the Message tab to specify the email message subject and body. You actually have two messages
to create. The first (called Message) is the message to send when the thresholds for the alert are met or
exceeded. The second message is the one to send when the event has cleared (called Clear Message).
The fields for the subject and message areas are Python format strings.
3. Click Save to save the data you entered on this page.
By default, all enabled schedules are active at all times. If you want to restrict the times for which an alerting
rule is active, follow these steps:
1. Set the Enabled alert field to False.
2. From the Alerting Rules page, click the Schedule tab to set up a schedule for the alert.
25
Using Zenoss
4. Enter a name for the schedule in the ID field, and then click OK.
6. If you want to restrict this Alert to only monitor at certain times for certain durations, set the Enabled field
to True.
7. In the Start area, enter the date you want the alert to start, or click the Select button to choose the date
from a calendar.
8. In the fields to the right of the date, select an hour and minute for the Alert to start.
9. Use the Duration area to specify the length of time you want to Alert to be listening based on the start time.
10. If you want the Alerting period to repeat you can choose a time frame from the Repeat pop-up menu. You
can choose from:
Never
Daily
Every Weekday
Weekly
Monthly
First Sunday of the Month
11. Choose a number of times to repeat the selected interval.
12. Click Save.
You have now saved all of the options for creating a new alert.
26
Using Zenoss
Sample Scenario:
You want to set up alerting rules so if that "Person A" (the first person in the hierarchy responding to alerts) does
not acknowledge or suppress an event of a specific priority within a specific length of time (changing the event
status), then "Person B" is notified by email to respond.
Step 1: Create an Alerting Rule for the Default Case (Initial State)
The default case is "when any new event of any priority occurs, alert Person A."
For the next level in the hierarchy, the case is "If Person A does not acknowledge or suppress the event within
an hour, then send an alert to the next person in the hierarchy (Person B)."
Set the value of Delay to the number of seconds you want to wait after an event has come in to the system but
whose status has not changed. In this example, the wait time is one hour (3600 seconds).
In the Add filter area, select Event State, and then select the event state that will keep this rule from being
executed on all events (including those acknowledged by Person A). For this example, select New.
This rule now says fire this alert if there is an event in the system that is New (not acknowledged) for 5
minutes send email to this user.
3. Click the Message tab and in the Message (or subject) field enter the following:
27
Using Zenoss
This custom event view appears in the list. Note that there is a custom alerting rainbow for this event view.
6. Click the link for the new event view you created.
28
Using Zenoss
You can click the View tab to see the results of the custom event view.
29
Chapter 3. Discovering and Modeling Devices
Modeling is the process by which Zenoss:
Populates the device database
Collects information about the devices in the system (such as operating system type or file system capacity)
The system models devices when they are added to the database, either manually or through the discovery
process.
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). You can change this interval
by editing the value of Modeler Cycle Interval in the collector's configuration.
For larger deployments, modeling frequency may impact performance. In such environments, you should run
the modeling process once daily from a cron job.
30
Discovering and Modeling Devices
Note
Device Name, Device Class Path, and Discovery Protocol are the only required fields to add the device.
You should continue without adding more information or making selections, as information you enter or
select may conflict with information the system discovers about the device.
An exception is if you are adding a Cisco router in a device class other than /Network. In this case, you
should set the zProperty for zlfDescription to True. This will give you additional information about Cisco
routers. By default, this option is set to True for the /Network class.
3. Scroll to the bottom of the page, and then click Add Device.
A status page appears, showing a log of the operations the system uses to gather information about the
device.
4. Scroll to the bottom of the status page, and then click the link that appears, similar to:
31
Discovering and Modeling Devices
32
Discovering and Modeling Devices
3. Complete the Name and Discovery Protocol fields. (For descriptions of valid values for these fields, refer
to the section titled "Add a Single Device.") the Device Class value is the class you selected in the devices
hierarchy.
4. Click OK.
The Device is added into the selected device class. The main Device page appears, showing the Status tab.
Note
To perform discovery, the machine on which Zenoss is installed must have an SNMP agent running.
The Networks page appears, displaying all of the currently configured sub-networks.
33
Discovering and Modeling Devices
Note
If the sub-network that you want to scan does not appear, then select Add Network from the Subnetworks
table menu, and then supply the sub-network IP address and subnet mask (for example, 192.168.1.0/24).
2. Select one or more sub-networks that you want to scan for devices.
3. Open the Subnetworks table menu, and then select Discover Devices.
The Discover Device page appears. This page shows the status of all the device collections in progress.
(Do not navigate away from this page during discovery.)
34
Discovering and Modeling Devices
The system first models the monitoring machine, and then walks through the routing tables of all routers it
locates. Discovery continues while valid SNMP access is found or until a network is discovered in the DMD
that has its zAutoDiscover property set to False.
Zenoss places routers discovered through this process in the device path /Network/Router. Devices are
placed in the /Discovered device class.
In general, servers are organized by operating system. If the system discovers Windows devices, for example,
you might choose to relocate them to /Server/Windows/WMI. Similarly, you might choose to classify discovered
Linux devices in the /Server/Linux device class.
35
Discovering and Modeling Devices
For example, for a device in the /Server/Windows/WMI class, you must supply your Windows user name and
password before the system can monitor the device. To do this:
1. Navigate to the device in the device list.
2. From the page menu, select More > zProperties.
3. Set the user name and password values in the zWinUser and zWinPassword zProperties.
4. Click Save.
Similarly, for a device in the /Server/SSH/GenericLinux class, you must supply your SSH user name and pass-
word. Set these values in the device's zCommandUsername and zCommandPassword zProperties.
If this command does not time out, then SNMP is installed and working correctly.
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
36
Discovering and Modeling Devices
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. Go to the Add Device page.
2. Set discover to a value of None.
3. After adding the device, navigate to the device and view its zProperties tab.
4. If necessary, set zCommandUsername and zCommandPassword 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 zProperty to:
~/.ssh/id_rsa
37
Discovering and Modeling Devices
which nmap
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
3.6.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.
The Collector Plugins tab appears, showing all of the collector plugins for the device.
By passing the --collect command to the modeler, you can control which modeler plugins are used. For example,
the following command runs only the interface plugin against the build.zenoss.loc device:
$ zenmodeler run -v 10 --collect=IpInterface -d build.zenoss.loc
If the command returns any stack traces, forward these details to Support for assistance:
38
Discovering and Modeling Devices
39
Chapter 4. Working with Devices
This chapter provides information and procedures for managing devices.
To access the device list, select Device List from the navigation menu.
To view a single device, click its name in the list. The Device page appears.
The Status tab appears when you select a device from the device list.
40
Working with Devices
The Device Status table provides important device status at a glance. Events, grouped by severity, are found
at the left side of this table. Click the indicators in this "event rainbow" to view the list of events for the device.
Additional device status information appears to the right of the event rainbow:
Availability - Shows seven-day availability, as defined by the availability of the device by measuring ping.
The system determines availability by taking all events of type /Status/Ping, with a Severity 5 and higher for
the past seven days, and calculating the amount of time these systems have been in a down state, as follows:
Duration is specified by the Default Availability Report (accessible from the Event Manager area).
Uptime - Duration the device has been "up" and running, as reported by the agent on the device. This
information can be acquired through SNMP, WMI, or SSH.
State - Set this value from the Device page Edit tab. Indicates one of these device states:
41
Working with Devices
Production - The system monitors devices in production, reporting issues on the dashboard and sending
event notifications.
Maintenance - The system collects data for devices in maintenance, but does not report issues or send
event notifications.
Decommissioned - The system does not monitor the device.
Priority - Ranks the importance of your devices. You can use priority settings to control alerts. Set this value
from the Device page Edit tab.
Locks - Prevent the modeler from overriding custom changes. Set locks from the Device page menu, from
the Manage > Lock Devices selection.
For more information about locking devices, refer to the section titled "Locking Device Configuration."
Last Change - Displays the latest time the modeler detected a change on the device and updated its entry
in the system.
Last Collection - Displays the latest time the modeler checked for changes to the device.
First Seen - Displays the date and time the device was added to the system.
Component Status
On the right side of the Device Status table is the Component Status list. Each item in the list is a type of
device component, such as IPService, WinService, IpRouteEntry, IpInterface, CPU, and FileSystem. Click the
indicators in the Status column to view the event page for that component.
The status of each device component type, as shown by the color of its indicator, is determined by the collective
status of the monitored components of the same type. For example, if the IpService status is green, then all
monitored IpServices on this device are functioning normally. If there is an event related to a monitored IpService,
then the component and highest severity event associated with that component are displayed in the status.
If there is an event unrelated to a known component, then the system places it in the component type Other.
Device Information
The Device Information area provides system information and details about the device's organizers.
Organizers - Identifies the groups in which you have included this device. It also displays values for:
Collector - If your implementation uses a single collector, then this value is "localhost." If your imple-
mentation uses distributed collectors, then this value is the name of the collector that monitors the device.
IP Realm - Specifies an advanced configuration value for the MultiRealmIP ZenPack.
OS - Shows system information returned by the device collectors. The details provided in this area vary,
depending on data collection method.
The lowest section of the Device Information area includes Links, which displays links between this device and
other external systems. Links are implemented by the zlinks zProperty.
For more information about custom links, see the chapter titled "Properties and Templates."
The OS tab shows a detailed breakdown of all of the operating system components found by the modeling
process. For each of these components, you can see current status, names, and lock status.
42
Working with Devices
Monitored Selection
Some areas of the OS tab feature a Monitored option, which filters the list of interfaces shown in that area. To
view all interfaces, de-select this option. If you want to view only those interfaces that the system is monitoring,
then select the option.
Interfaces
The Interfaces area shows basic information about each of the logical and physical network interfaces that the
system models.
In the IP Address column, addresses may be links to additional information in the network information database.
The red and green status indicators in this area provide at-a-glance information about the status of each network
listed:
O - Indicates that the network is operationally online, meaning that the network interface is operating when
the indicator shows green.
A - Indicates whether the network is administratively up, meaning that it has been configured to operate
when the indicator shows green.
43
Working with Devices
M - If the indicator is green, the system is monitoring this network; if red, then the system is not monitoring it.
Win Services
This area shows detailed information about the status of Windows-based services. Key information in this area
includes:
StartMode - Windows services with a start mode of disable or manual are monitored.
StartName - Indicates the user under which the service runs.
OS Processes
Shows OS processes for this device. After adding an OS process, you should re-model the device.
The Restarts column shows whether the system will generate an event if the process is detected as restarted.
IP Services
The IP Services area shows the TCP and UDP ports that are currently listening on a device. The system monitors
only TCP ports.
Make sure you have TCP connectivity between your Zenoss server and the monitored server.
File Systems
This area lets you view file system status, if file system monitoring is enabled. To enable file system monitoring,
select Monitoring from the File Systems table menu, and then select the Enable option in the dialog.
File systems can be monitored via SNMP only if the system has a valid HOST-RESOURCES MIB.
If "Unknown" appears in the Used bytes, Free bytes, or % Util columns, then performance collection may not
yet have begun.
Routes
Routes are collected to model the network topology so that root cause analysis can be determined by the Zenoss
server. Routes are not monitored.
The Hardware tab shows a detailed breakdown of all of the hardware components found by the modeling pro-
cess. This area might provide information about the device's available and used memory, available and used
swap space, CPUs, hard disks, expansion cards, fans, temperature sensors and power supplies.
The information show in this area varies depending on the device type.
44
Working with Devices
The Software tab lists software installed on the device. The details provided in this area depend on the method
used to model the device.
Listed software links into the system's inventory of software in your IT infrastructure. You can view this inventory
from the Products link on the Navigation menu.
45
Working with Devices
The Events tab provides events information that is scoped to the device. From here, you can:
Sort event information by a range of categories
Classify and acknowledge events
Filter events by severity, state, or by one of several categories
46
Working with Devices
For detailed information about the event console and how the system handles events, see the chapter titled
"Event Management."
The Perf tab shows performance graphs defined for the currently selected device.
47
Working with Devices
You can use the arrow key and magnifying glass controls on the sides of each graph to change the graph view,
scrolling through or zooming in or out of a graph.
From this tab, you can control these performance graph options:
Range - Select the span of time displayed in the graph. You can select Hourly (past 36 hours), Daily (past
10 days), Weekly (past six weeks), Monthly (past 15 months), or Yearly (past two years).
Reset - Click to return to the default (initial view) of the graphs.
Link graphs - By default, all graphs move together. If you click the back arrow for a graph, for example,
then all graphs move backward. De-select the Link graphs option to control each graph individually.
Stop - Turns off automatic refresh of the graphs.
For more information about performance monitoring and performance graphs, see the section titled "Perfor-
mance Monitoring."
48
Working with Devices
From this tab, you can change values for various collector attributes and relations.
49
Working with Devices
To access the Custom Properties page, open the Device page menu, and then select More > Custom.
Note
For detailed information about working with zProperties, see the chapter titled "Properties and Templates."
To configure zProperties for multiple devices, click the zProperties tab from the Device Overview tab. To con-
figure zProperties for an individual device, click the device name in the Device Overview, and then click the
zProperties tab for that device.
To access the zProperties, open the device table menu, and then select More > zProperties.
50
Working with Devices
For detailed information about performance templates, go to the section titled "Performance Monitoring."
51
Working with Devices
To access the Administration page, open the Device page menu, and then select More > Administration.
If you are using Zenoss Core, the Administrators area is informational only. Use this area to define administrators
for this device, and to specify their assigned roles.
The system moves the heartbeats for the device to event history. The Edit tab for the ZenEventManager
appears. Optionally make changes, and then click Save.
52
Working with Devices
A status message appears at the upper right of the page, confirming that changes have been pushed to
the collectors.
Note
Device locking prevents changes and deletion due to remodeling. It does not prevent manual changes and
deletion.
3. To send events when actions are blocked by a lock action, select the "Send event..." option.
4. Select the type of lock you want to implement, or select Unlock to unlock the device configuration currently
set.
To rename a device:
1. Navigate to the device.
2. From the Device page menu, select Manage > Rename Device.
53
Working with Devices
3. Enter the new IP address for the device, or leave the field blank to allow the IP address to be set by DNS.
4. Click OK.
54
Working with Devices
55
Working with Devices
This command writes the names of your devices (including their device classes, groups, systems) to a file named
mydevicelist.xml.
To load these devices into another instance (or reload them into the same instance), while in the Zenoss instance
where you want the devices to be discovered, run the command:
zendeviceload -i mydevicelist.xml
The systems attempts to discover each of the devices in the XML file.
56
Chapter 5. Properties and Templates
Read this chapter to learn more about system properties (zProperties) and monitoring templates, and how they
control system monitoring.
5.1. zProperties
zProperties are individual values that exist on the major configuration organizers in the system:
Device classes
Device class zProperties control the way monitoring is gathered from devices after they have been added
to the system.
Networks
Event zProperties control the rules that process events as they are added to the system.
Services and processes
Service and process zProperties describe how operating system components are monitored by the moni-
toring daemons.
zProperties settings can be added to any ZenPacks you create, allowing you to add customized zProperties to
the system when you add ZenPacks.
At the root of the device hierarchy is the Devices object. All device class zProperties are defined here, and their
values are the default values for the entire hierarchy.
57
Properties and Templates
Through inheritance, properties defined at the root of the hierarchy apply to all objects beneath that node. So, at
the /Devices/Server/Linux level of the device class hierarchy, the value of these two properties is the same as
at /Devices, even though the property is not set explicitly at /Devices/Server/Linux. Inheritance simplifies system
configuration, because default values set at the root level apply to all devices irrespective of their device class.
To further customize the system, you can change a specific zProperty further down the hierarchy without having
to change the definitions of other zProperties. As shown in the following illustration, the value of zWmiMonitorIg-
nore is changed so that WMI monitoring is performed at the /Devices/Server/Windows level.
This locally defined value for zWmiMonitorIgnore overrides the value set at the root of the hierarchy. No other
properties at this level are affected by this local change; they continue to inherit the value set at the root.
zProperties allow you to configure the system at a very granular level, down to a particular device. For example,
in the following illustration, the device named dev.zenoss.com has the value of SNMP community set to private.
This overrides the root value (public).
If you change the SNMP Community value of dev.zenoss.com to public, it matches the value set at the root,
but is still explicitly defined. Only if you remove the locally defined property does it again inherit the value of
the property set at the root.
58
Properties and Templates
As shown in the previous screen, the zCollectorClientTimeout zProperty has a default value of 180. In the next
screen, the value has been set to 170 at /Devices/Server/Linux, overriding the default value at this node of the
hierarchy.
59
Properties and Templates
To then remove the override and once again inherit the value from the root of the hierarchy, go to the Delete
Local Property area of the zProperties page.
60
Properties and Templates
61
Properties and Templates
62
Properties and Templates
63
Properties and Templates
5.2. Templates
The system stores performance configuration data in RRDTemplates (generally referred to as templates). Tem-
plates contain other objects that define where and how to obtain performance data, thresholds for that data,
and data graphs.
You can define a template anywhere in the device class hierarchy, or on an individual device.
Templates are divided among three types: device, component, and interface.
For the Server/Linux/MySQL device class, the zDeviceTemplates property might contain, for example, "De-
vice" and "MySQL." The system would collect CPU and memory information by using the Device template, and
MySQL-specific metrics by using the MySQL template.
Note
64
Properties and Templates
If Zenoss cannot locate a template that matches the interface type, then it uses the ethernetCsmacd template.
65
Chapter 6. Core Monitoring
Read the following sections for more information about basic and advanced monitoring:
Availability Monitoring
Performance Monitoring
Monitoring Using ZenCommand
SNMP Monitoring
Monitoring Device Remotely Via SSH
Monitoring Windows Devices
ZenPing is configured automatically. ZenPing does the high-performance asynchronous testing of the ICMP
status. The most important element of this daemon is that Zenoss has built a compete model of the your routing
system. If there are gaps in the routing model, the power of ZenPings topology monitoring will not be available.
If there are these gaps, this issue can be seen in the zenping.log file.
Zenmodeler goes out and discovers the routes to each device in the network. The system tries not to use Internet
routing tables and prefers to rely on Zenmodeler to discover the relationships on its own and create its own
network map.
If any known route is broken, there will be only one ping event that is generated by the outage. Any additional
outages beyond that will only flag that device and the next time a ping sweep occurs the errors beyond the
known router will not occur.
This monitoring model breaks down if the routers do not share their routing tables and interface information.
The Services overview shows the folders and sub-folders and lists all of the services that have been added to
the system to monitor.
66
Core Monitoring
6.1.3.1. ZenStatus
ZenStatus performs monitoring of TCP services. It is configured by turning on monitoring of a service under the
Services root on the Navigation Toolbar. Service monitoring can be turned on a service class but this can be
overridden on any service instance. For example, SMTP will be monitored by default but it may not be a critical
service on all boxes. If this is the case, it may be removed on specific devices. Also, if the service is configured
to only listen on localhost (127.0.0.1) the service will not be monitored.
3. To set monitoring to True, click the Edit tab and set the Monitor pop-up to True. The service is now being
monitored.
To view the status information associated with a given service, select the service from the Services list in the
Services Overview page.
67
Core Monitoring
This tab shows you a summary of the details associated with this service. You can see the name of the service,
whether its monitored or not, a Description, any associated Service Keys and a List of Devices where the service
is currently running. To change any of this information, click the Edit tab.
To edit the information that appears on the Individual Service Status tab, from the Individual Services page,
click the Edit tab.
From this screen, use the Monitor pop-up to select True to monitor the service and False to not monitor the
service. You can also add any associated Service Keys or enter a brief Description.
You can configure zProperties either for all services, for an individual service or for any services that fall further
down in the service hierarchy tree. To configure them for all services click the zProperties tab from the Ser-
68
Core Monitoring
vice Overview tab. To configure zProperties for an individual service, click on the service name in the Service
Overview and then click the zProperties tab for that service. The Service zProperties Tab appears.
You can configure the following zProperties for an individual service from this tab:
zFailSeverity
zHideFieldsFromList
zMonitor
For more information about the Service zProperties, see the chapter titled "Properties and Templates."
The /Server/Scan device class is an example configuration for monitoring TCP services on devices using a port
scan. You can use this device class as a reference for your own configuration; or, if you have a device that you
want to be monitored for service availability alone, you can place it under this device class. The system will not
collect performance data for devices in this class.
This section will show you how to set up monitoring of an IP service across a group of devices using a service
class.
1. Navigate to the OS tab for a device you have loaded into the system.
69
Core Monitoring
2. In the IP Services area, click the link to the service you want to monitor.
The service summary for the service you have selected appears.
70
Core Monitoring
3. Set the Monitor flag to True to monitor this service for only this machine. You can also set this service to
be monitored system-wide.
4. To monitor a service system wide, click the Service Class link. This page will show you where the service
is running and whether or not the service is monitored.
5. Click the Edit tab and set Monitored to True. This turns on monitoring for every instance of this service in
the system.
6. Click Save.
7. Click the Status tab again.
Most of the instances of the Service are now set to green, indicating they are monitored and up. The ones
that remain unmonitored indicate that they have this service class set to not monitor at a local level.
71
Core Monitoring
ZenProcess uses a regular expression match to find PIDs matching the expression to see that these processes
are running on the selected device.
72
Core Monitoring
3. Enter the regular expression name of the process you want to monitor in the Processes field, and then click
OK.
The process is added. The Processes window re-appears, showing the process you entered.
Now you are monitoring this process. After the device is remodeled (at the next remodeling interval or
manually), it will show every device (occurrence) where this process is running. As such, the process is now
being monitored wherever it occurs.
Clicking on a specific process will take you to an interface that shows all instances of that process running
across machines that have it monitored. If the process has multiple instances, the system will monitor the
sum of CPU and memory utilization of all processes as well as the count of total processes running. However,
if the process has only a single instance, CPU utilization and memory usage are graphed for the single
process. To perform process monitoring using the zenprocess daemon, the device's SNMP agent must show
the process information through the HOST- RESOURCES MIB.
You can configure the following zProperties for either all processes or the selected process from this tab:
ZAlertOnRestart
73
Core Monitoring
ZCountProcs
ZFailSeverity
zMonitor
For more information about the Services zProperties, see the zProperties Appendix.
Regardless of the monitoring method used, the system stores performance monitoring configuration information
in performance templates.
Before the system can collect performance data for a device or component, it must determine which templates
apply. This process is called template binding.
The Templates page lists all of the performance templates available to a device or device class.
To view available performance templates for a device, select More > All Templates from the Devices page
menu. To view available performance templates for device classes, click the Templates tab from the Devices
area.
The Available Performance Templates page shows the performance templates that are defined for a particular
device or device class, and for those defined further up the device class hierarchy. If more than one template of
the same name is defined, then only the one to which this device or device class can bind appears in the list.
Click a template in the list to view details about defined data sources, thresholds, and to see graph definition
details.
74
Core Monitoring
First, the system determines the list of template names that apply to a device or component. For device compo-
nents, this usually is the meta type of the component (for example, FileSystem, CPU, or HardDisk). For devices,
this list is defined by the zDeviceTemplates zProperty.
After defining the list, the system locates templates that match the names on the list. For each name, it searches
the device and then searches the device class hierarchy. Zenoss uses the lowest template in the hierarchy that
it can locate with the correct name, ignoring others of the same name that might exist further up the device
class hierarchy.
75
Core Monitoring
Note
Alternatively, you can edit the zDeviceTemplates zProperty (from the zProperties page) to change which
templates are bound. You cannot edit the bound name for a device component.
Shell commands used with COMMAND data sources must return data that conforms to the Nagios plug-in output
specification. For more information, see the section titled Monitoring Using ZenCommand.
76
Core Monitoring
You can define data points to data sources with all source types except SNMP and VMware. Because these
data source types each rely on a single data point for performance metrics, additional data point definition is
not needed.
Note
For COMMAND data points, the name should be the same as that used by the shell command when
returning data.
4. Enter information or make selections to define the data point.
Name - Displays the name you entered in the Add a New DataPoint dialog.
Type - Specify the RRD data source type to use for storing data for this data point. (Zenoss uses RRD-
Tool to store performance data.) Available options are:
COUNTER - Saves the rate of change of the value over a step period. This assumes that the value
is always increasing (the difference between the current and the previous value is greater than 0).
Traffic counters on a router are an ideal candidate for using COUNTER.
DERIVED - Same as COUNTER, but additionally allows negative values. If you want to see the rate
of change in free disk space on your server, for example, then you might want to select this value.
ABSOLUTE - Saves the rate of change, but assumes that the previous value is set to 0. The differ-
ence between the current and the previous value is always equal to the current value. Thus, ABSO-
LUTE stores the current value, divided by the step interval.
GAUGE - Does not save the rate of change, but saves the actual value. There are no divisions or
calculations. To see memory consumption in a server, for example, you might want to select this
value.
Note
Rather than COUNTER, you may want to define a data point using DERIVED and with a minimum
of zero. This creates the same conditions as COUNTER, with one exception. Because COUNTER
is a "smart" data type, it can wrap the data when a maximum number of values is reached in the
system. An issue can occur when there is a loss of reporting and the system (when looking at
COUNTER values) thinks it should wrap the data. This creates an artificial spike in the system
and creates statistical anomalies.
RRDMin - Enter a value. Any value received that is less than this number is ignored.
RRDMax - Ener a value. Any value received that is greater than this number is ignored.
Create CMD - Enter an RRD expression used to create the database for this data point. If you do not
enter a value, then the system uses a default applicable to most situations.
http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html
5. Click Save to save the data point.
77
Core Monitoring
To allow for more flexibility in changes, some reports use data point aliases. Data point aliases group data points
so they can be more easily used for reporting. In addition, if the data points return data in different units, then
the plugin can normalize that data into a common unit.
An alias-based report looks up the data points that share a common alias string, and then uses them. This
approach allows you to add data points without changing the report.
78
Core Monitoring
In the simplest cases, data from the target data points are returned in units expected by a report. For cases in
which data are not returned in the same units, an alias can use an associated formula at the data point. For
example, if a data point returns data in kilobytes, but the report expects data in bytes, then the formula multiplies
the value by 1024.
When complete, the alias formula must resolve to a Reverse Polish Notation (RPN) formula that can be used
by RRDtool. For the simple conversion of kilobytes into bytes, the formula is:
1024,*
For more information on RRDtool and RPN formulas, browse to this site:
http://oss.oetiker.ch/rrdtool/doc/rrdgraph_rpn.en.html
For cases in which contextual information is needed, the alias formula can contain a TALES expression that
has access to the device as context (labeled as "here"). The result of the TALES evaluation should be an RRD
formula.
For example, if the desired value is the data point value divided by total memory, the formula is:
${here/hw/totalMemory},/
For more information on TALES, refer to the appendix in this guide titled "TALES Expressions," or to the TALES
Specification 1.3, at:
http://wiki.zope.org/ZPT/TALESSpecification13
You also can embed full Python code in an alias formula for execution. The code must construct a string that
results in a valid RRD formula. To signal the system to evaluate the formula correctly, it must begin with:
79
Core Monitoring
__EVAL:
Using the same example as in the previous section (division by total memory), the formula is:
__EVAL:here.hw.totalMemory + ,/
4. In the Add Data Point Alias dialog, enter the alias name and the formula.
Note
If the data point returns values in the desired units, then leave the value for formula blank.
The following table shows performance reports that use aliases, and the aliases used. To add data points to a
report, add the alias, and then ensure the values return in the expected units.
CPU Utilization
80
Core Monitoring
6.2.7. Thresholds
Thresholds define expected bounds for data points. When the value returned by a data point violates a threshold,
the system creates an event.
Min/Max Threshold
The system provides one built-in threshold type: the Min/Max Threshold. (Other threshold types are provided
through ZenPacks.)
Min/Max thresholds inspect incoming data to determine whether it exceeds a given maximum or falls below a
given minimum. You can use a Min/Max threshold to check for these scenarios:
The current value is less than a minimum value. To do this, you should set only a minimum value for the
threshold. Any value less than this number results in creation of a threshold event.
The current value is greater than a maximum value. To do this, you should set only a maximum value for
the threshold. Any value greater than this number results in creation of a threshold event.
The current value is not a single, pre-defined number. To do this, you should set the minimum and maximum
values for the threshold to the same value. This will be the only "good" number. If the returned value is not
this number, then a threshold event is created.
The current value falls outside a pre-defined range. To do this, you should set the minimum value to the
lowest value within the good range, and the maximum value to the highest value within the good range. If the
returned value is less than the minimum, or greater than the maximum, then a threshold event is created.
The current value falls within a pre-defined range. To do this, you should set the minimum value to the
highest value within the bad range, and the maximum value to the lowest value within the bad range. If the
returned value is greater than the maximum, and less than the minimum, then a threshold event is created.
Adding Thresholds
81
Core Monitoring
When using a Python expression, the variable here references the device or component for which data
is being collected. For example, an 85% threshold on an interface might be specified as:
here.speed * .85/8
The division by 8 is because interface speed frequently is reported in bits/second, where the performance
data is bytes/second.
Max Value - If this field contains a value, then each time one of the selected data points goes above
this value an event is triggered. This field may contain a number or a Python expression.
Event Class - Select the event class of the event that will be triggered when this threshold is breached.
Severity - Select the severity level of the first event triggered when this threshold is breached.
Escalate Count - Enter the number of consecutive times this threshold can be broken before the event
severity is escalated by one step.
Enabled - Select True to enable the threshold, or False to disable it.
4. Click Save to save the threshold.
To define a graph:
1. Navigate to a performance template whose data you want represented in a graph.
82
Core Monitoring
83
Core Monitoring
2. Select values for the graph point, and then click OK.
Note
To re-sequence graph points, enter a sequence number in one or more Seq fields and then select Re-sequence
GraphPoints from the the Graph Points table menu. The graphs points are re-ordered as specified.
DataPoint graph points draw the value of data points from the template on a graph.
Click the name of the graph point to go to its edit page. Enter information or select values to edit the graph point:
Name - This is the name that appears on the Graph Definition page. By default, it appears in the graph
legend.
Consolidation - Specify the RRD function used to graph the data point's data to the size of the graph. Most
of the time, the default value of AVERAGE is appropriate.
RPN - Optionally enter an RPN expression that alters the value of the data being graphed for the data point.
For example, if the data is stored as bits, but you want to graph it as bytes, enter an RPN value of "8,/" to
divide by 8. For more information about RRDTool RPN notation, go to:
http://oss.oetiker.ch/rrdtool/tut/rpntutorial.en.html
Limit - Optionally specify a maximum value for the data being graphed.
Line Type - Select Line to graph the data as a line. Select Area to fill the area between the line and the
horizontal axis with the line color. Select None to use this data point for custom RRD commands and do
not want it to be explicitly drawn.
Line Width - Enter the pixel width of the line.
Stacked - If True, then the line or area is drawn above the previously drawn data. At any point in time on the
graph, the value plotted for this data is the sum of the previously drawn data and the value of this data point
now. You might set this value, for example, to asses total packets if measuring packets in and packets out.
Color - Optionally specify a color for the line or area. Enter a six-digit hexadecimal color value with an optional
two-digit hex value to specify an alpha channel. An alpha channel value is only used if 'stacked' is True.
Format - Specify the RRD format to use when displaying values in the graph summary. For more information
on RRDTool formatting strings, go to:
http://oss.oetiker.ch/rrdtool/doc/rrdgraph_graph.en.html
84
Core Monitoring
Legend - Name to use for the data in the graph legend. By default, this is a TALES expression that specifies
the graph point name. The variables available in this TALES expression are here (the device or component
being graphed) and graphPoint (the graph point itself).
Available RRD Variables - Lists the RRD variables defined in this graph definition. These values can be
used in the RPN field.
Threshold graph points graph the value of thresholds from the template.
Threshold graph points graph the value of thresholds from the template.
You can edit values for Name, Color, and Legend for a threshold graph point. Refer to the definitions in the
section titled Editing DataPoint Graph Points for more information.
Custom graph points allow you to insert specific RRD graph commands into the graph definition.
http://oss.oetiker.ch/rrdtool/doc/rrdgraph_data.en.html
http://oss.oetiker.ch/rrdtool/doc/rrdgraph_graph.en.html
The Custom Graph Definition tab allows you to specify your own set of RRD commands to draw a graph.
The graph points specified on the Custom Graph Definition tab are used to define data that is available to the
commands you specify here; however, the graph points are not drawn unless you explicitly draw them with the
commands you specify here. The Available RRD Variables lists the values defined by the graph points that are
available for use.
The Graph Commands tab shows an approximate representation of the RRD commands that will be used to
draw a graph. This representation provides helpful debugging information when using custom graph points or
the Custom Definition tab.
85
Core Monitoring
The following example procedure shows how to set up a ZenCommand plugin to check specific content. The
steps show how to test the plugin, and then integrate it.
1. As the zenoss user, test the plugin from the command line. Enter the following command to test the product
directory:
$ZENHOME/libexec/check_http -H www.zenoss.com
If the check_http command is correct, the output will look similar to the following.
HTTP OK HTTP/1.0 200 OK - 0.723 second response time |time=0.722758s;;;0.000000 size=7932B;;;0
Note
86
Core Monitoring
The default device template is overridden with the device template specific to this device.
5. In the template, remove the sysUpTime data source. (In this example, SNMP is not used for the device.)
6. Add a new description to the template.
7. Add a new data source called rootWebCheck.
8. In the rootWebCheck data source, set the following variables:
Source Type = COMMAND
Component = rootWebCheck
Cycle Time = 30
9. Debug your ZenCommand by running zencommand in the foreground with debugging on:
zencommand run -d www.website.com -v10
The command template field is a TALES expression. You can make substitutions in the command that will
make it generic for any device added to this class.
10. Set the -H flag to the IP of the device against which this command will be run, as follows:
check_http -H ${here/manageIp}
11. Add a check looking for content on the page. The -r flag will run a regular expression against the Web
page to check for text.
check_http -H ${here/manageIp}-r textstring1
87
Core Monitoring
A template named Device will bind to all devices below the template definition. Within each template is a list of
commands that will run. The commands can be any program that follows the Nagios plug-in standard. Inputs
are command line arguments; output is the first line of stdout, plus a return code.
Note
For complete information about Nagios plugin guidelines, browse to this location:
http://nagiosplug.sourceforge.net/developer-guidelines.html
The command template string is built by using Zope TALES expressions. Several variables are passed
when evaluating the template. They are:
zCommandPath Path to the zencommand plug-ins on a given box it comes from the zProperty zCom-
mandPath. zCommandPath is automatically added to a command if a path is absent from the beginning
of the command.
devname Device name of the device against which the command is being evaluated.
dev Device object against which the command is being evaluated.
here Context of evaluation. For a device, this is equivalent to dev for a component (such as a filesystem
or interface). This is the component object.
compname If this command evaluates against a component, specifies its name as a string.
88
Core Monitoring
Template values are accessed like shell variables. They are the same as the expression syntax used in the
appendix titled TALES Expressions (in this guide).
Examples
Run an http check against all devices by using the URL /zport/dmd:
check_http H ${devname}-u /zport/dmd
In a template named FileSystem, the following command will run against all file systems on a device:
check_disk w 10% -c 5% -p ${compname}
where DeviceName is the device on which you want to run the command, and DataSourceName is the name
of a data source on a template associated with the device.
The zentestcommand script prints the results of the command to standard output.
Password: zenoss
2. Run the command snmp get for one of the OIDs
89
Core Monitoring
The RPM for the plugins is a noarch RPM, which means it can be installed on any architecture (such as i386,
amd64, or ia_64). The only external dependency needed to install the plugins RPM is Python. Most Linux dis-
tributions include Python in their standard loads.
Enter these commands to install the plugins into directories that are accessible to all users:
$ python setup.py build
If you do not have appropriate privileges to install the system software, refer to the following information about
installing the plugins using a non-privileged account, at:
http://dev.zenoss.org/trac/wiki/ZenossPlugins
Alternatively, you can use setuptool's built-in easy_install command to install the plugins. To use easy_install
to download and install the plugins, run the following command:
$ sudo easy_install Zenoss-Plugins
The entry point to the 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.
90
Core Monitoring
The 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 must 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 zenplugin.py with the plugin name as the
argument. The following command line illustrates:
$ zenplugin.py cpu
If you receive a "command not found" error when running the zenplugin.py command, make sure that the
directory into which it was installed is included in your PATH. If you installed by using 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 plugins may not be fully implemented for your particular platform. If you receive
this message, and want to investigate support for your platform, email the output of the following command to
the Support team:
You must edit system properties for the group where you want to collect remote information using SSH.
1. Navigate to the device class path you want to monitor remotely. You can apply this monitoring per device
or per device class path.
2. Change the zProperties value for the group. Click the zProperties tab.
91
Core Monitoring
The following table lists sample values set up for remote devices. These have a pre-shared key (with
no password) set up from the collector to the remote boxes. (It also can 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
92
Core Monitoring
zProperties Value
zTransportPreference command
Two passes are required for full modeling. The first pass obtains the platform type (so that the system
knows which plugins to run). The second pass provides detailed data on interfaces and file systems.
Run the command a second time to use the plugins the command gathered on the first pass.
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 pre-config-
ured templates and zProperties. You will still need to set the zCommandUsername and zCommandPassword
zProperties to the appropriate SSH login information for each device.
Before you can monitor Windows devices, you must ensure that:
DCOM is enabled for WMI connections
The hostname of the system collector does not exceed fifteen characters
If you are using Zenoss Core, you must additionally ensure that an SNMP agent is enabled on Windows devices.
If your system is running Windows Vista, for example, follow these steps to see if the SNMP agent is enabled:
1. From the Start menu list, right-click Computer, and then select Manage from the list of options.
2. From the Computer Management panel navigation area, expand Services and Applications, and then select
Services.
Note
If SNMP Service does not appear in the list, then you may have to enable the SNMP feature (from the
"Turn Windows features on and off" selection in the Control Panel).
TM
Optionally, you can use SNMP Informant to collect CPU, memory, and disk I/O statistics. SNMP Informant
agents collect information from Windows devices via WMI on the server where they are installed, and then con-
vert system, state, and operational data into SNMP OIDs for broadcast. The system can then process the SNMP
OID information and generate events and alerts based on this information. See the section titled Monitoring
Windows Performance with SNMP Informant (in this chapter) for more information.
Note
If you are using Zenoss Enterprise, SNMP Informant is not needed (its functionality is included in these ver-
sions).
93
Core Monitoring
You should set this zProperty at the Server/Windows class level, so that any device placed in this class has
Windows monitoring automatically enabled.
zWinUser - Must be set as the local admin. The format for zWinUser is:
.\Username - The format to use when the account is a local account.
DOMAIN\Username - The format for a Domain account.
zWinPassword - Enter the password used to remotely log in to the Windows machine.
\\HOST\root\cimv2
The WinServiceMap WMI plugin is included in zCollectorPlugins on the /Server/Windows device class. WinSer-
viceMap retrieves all services that can be monitored on a device, regardless of whether it is up or down.
Windows services are (by default) not monitored. To monitor a specific Windows service, follow these steps:
1. Navigate to the Windows device, and then click the OS tab.
2. Click the service you want to monitor, and then set the vale of monitor to True.
Note
If you do not see the service you want to monitor in the list, then you can add it. Select Add WinService
from the WinServices table menu.
94
Core Monitoring
http://www.snmp-informant.com
To make sure SNMP Informant is running and set up correctly, run this command to walk the SNMP Informant
MIB:
snmpwalk -v1 -c<community> <server> 1.3.6.1.4.1.9600
This command will return some performance information if SNMP Informant is configured and running correctly.
Once this is configured properly, the system gathers and uses SNMP information the same as any other device
sending SNMP traps.
Usage:
$ZENHOME/bin/winexe [options] //host [command]
Options Use
--uninstall Uninstall winexe service after remote execution.
--reinstall Reinstall winexe service before remote execution.
--system Use SYSTEM account.
--runas=[DOMAIN\]USERNAME%PASSWORD Run as user (IMPORTANT! password is sent in cleartext over
net).
95
Core Monitoring
96
Chapter 7. Event Management
7.1. About Events
Events, and the graphs generated from performance monitoring, are the primary operational tools for under-
standing the state of your environment. This chapter defines events and describes the event management sys-
tem.
The ipAddress field is a free-form text field that allows up to 15 characters. This field is not required. If the system
cannot successfully locate a device based on the event's device field content, it attempts to find the device based
the event ipAddress field content, if present.
Zenoss automatically adds information to incoming events that match a device in its database. Fields added are:
prodState - Specifies the device's current production state.
Location - Specifies the location (if any) to which the device is assigned.
DeviceClass - Classifies the device.
DeviceGroups - Specifies the groups (if any) to which the device is assigned.
Systems - Systems (if any) to which the device is assigned.
DevicePriority - Priority assigned to the device.
For more information about these fields, refer to the chapters titled "Production States and Maintenance Win-
dows" and "Organizers and Path Navigation."
Number Name
0 New
97
Event Management
Number Name
1 Acknowledged
2 Suppressed
The system handles these fields differently, depending on whether one or both are present on an incoming event:
If only summary is present, then the system copies its contents into message and truncates summary con-
tents to 128 characters.
If only message is present, then the system copies its contents into summary and truncates summary con-
tents to 128 characters.
If summary and message are both present, then the system truncates summary contents to 128 characters.
As a result, data loss is possible only if the message or summary content exceeds 65535 characters, or if both
fields are present and the summary content exceeds 128 characters.
To ensure that enough detail can be contained within the 128-character summary field limit, avoid reproducing
information in the summary that exists on other fields (such as device, component, or severity).
7.1.1.5. evid
The evid field is the event identifier, or event ID. It is a 36-character, unique identifier for every event that comes
into the system. An incoming event should never have an evid assigned to it, because the system creates it
immediately before the event is inserted into the database. If an incoming event does have an assigned evid,
then the system ignores it and replaces it with a generated evid.
Field Description
depuid Dynamically generated fingerprint that allows the system to perform de-duplica-
tion on repeating events that share similar characteristics.
component Free-form text field (maximum 255 characters) that allows additional context to
be given to events (for example, the interface name for an interface threshold
event).
98
Event Management
Field Description
eventClass Name of the event class into which this event has been created or mapped.
eventKey Free-form text field (maximum 128 characters) that allows another specificity
key to be used to drive the de-duplication and auto-clearing correlation process.
eventClassKey Free-form text field (maximum 128 characters) that is used as the first step in
mapping an unknown event into an event class.
eventGroup Free-form text field (maximum 64 characters) that can be used to group similar
types of events. This is primarily an extension point for customization. Currently
not used in a standard system.
stateChange Last time that any information about the event changed.
firstTime First time that the event occurred.
lastTime Most recent time that the event occurred.
count Number of occurrences of the event between the firstTime and lastTime.
prodState Production state of the device when the event occurred. If an event is still active
when a device's production state is changed, the event's prodState will be up-
dated accordingly.
suppid If this event has been suppressed by another event, then suppid contains the
other event's evid.
manager Deprecated. The monitor field replaces this field.
agent Typically the name of the daemon that generated the event. For example, an
SNMP threshold event will have zenperfsnmp as its agent.
DeviceClass Device class of the device that the event is related to.
Location Location of the device that the event is related to.
Systems Pipe-delimited list of systems that the device is contained within.
DeviceGroups Pipe-delimited list of systems that the device is contained within.
facility Only present on events coming from syslog. The syslog facility.
priority Only present on events coming from syslog. The syslog priority.
ntevid Only present on events coming from Windows event log. The NT Event ID.
ownerid Name of the user who acknowledged this event.
clearid Only present on events in history that were auto-cleared. The evid of the event
that cleared this one.
DevicePriority Priority of the device that the event is related to.
eventClassMapping If this event was matched by one of the configured event class mappings, con-
tains the name of that mapping rule.
monitor In a distributed setup, contains the name of the collector from which the event
originated.
7.1.3. Details
In addition to the standard fields, the system also allows events to add an arbitrary number of additional name/
value pairs to events to give them more context. The name and value of these details are limited to 255 characters
in length.
7.1.4. De-Duplication
Zenoss uses an event "de-duplication" feature, based on the concept of an event's fingerprint. Within the system,
this fingerprint is the "depuid." All of the standard events that the system creates as a result of its polling activities
are de-duplicated, with no setup required. However, you can apply de-duplicating to events that arrive from other
sources, such as syslog, SNMP traps, or a Windows event log.
99
Event Management
The most important de-duplication concept is the fingerprint. In all cases, an event's fingerprint (or dedupid) is
composed of a pipe-delimited string that contains these event fields:
device
component (can be blank)
eventClass
eventKey (can be blank)
severity
summary (omitted from the dedupid if eventKey is non-blank)
When the component and eventKey fields are blank, a dedupid appears similar to:
When the component and eventKey fields are present, a dedupid appears similar to:
router1.example.com|FastEthernet0/1|/Perf/Interface|threshName
When a new event comes into the system, the dedupid is constructed. If it matches the dedupid for any active
event, the existing event's count field is incremented by one, and its lastTime field is updated to be the current
time. If it does not match the dedupid of any active events, then it is inserted into the active event table with a
count of 1, and the firstTime and lastTime fields are set to the current time.
The following illustration depicts a de-duplication scenario in which an identical event occurs three times, fol-
lowed by one that is different in a single aspect of the dedupid fingerprint.
If you want to change the way de-duplication behaves, you can use an event transform to alter one of the fields
used to build the dedupid. You also can use a transform to directly modify the dedupid field, for more powerful
cross-device event de-duplication.
100
Event Management
All of the standard events created as a result of polling activities do auto-clearing by themselves. As with de-
duplication, you would invoke auto-clearing manually only to handle events that come from other sources, such
as syslog, a Windows event log, or SNMP traps.
The auto-clear fingerprint for an event is built by using the combination of these fields:
device
component (can be blank)
eventKey (can be blank)
eventClass (including zEventClearClasses from event class zProperties)
When a new event comes into the system with a special 0 (Clear) severity, Zenoss checks all active events
to see if they match the auto-clear fingerprint of the new event. All active events that match the auto-clear
fingerprint are moved from the active events table to history, and their clearid field is set to the evid of the event
that cleared them.
If an event is cleared by the clear event, it is also inserted into the event history; otherwise, it is dropped. This
is done to prevent extraneous clear messages from filling your events database.
The following illustration depicts a standard ping down event and its associated clear event.
If you need to manually invoke the auto-clearing correlation system, you can use an event transform to make
sure that the clear event has the 0 (Clear) severity set. You also need to ensure that the device, component,
and eventClass fields match the events you intend to clear.
Note
Avoid making clear events too generic; otherwise, you may inadvertently clear a wider variety of events that
you intend.
101
Event Management
Custom - Users can create custom event consoles from the Event Views tab within their user preferences.
Each custom event console has access to the same events as the global console, but can be filtered more
specifically (from the Edit tab).
Contextual - Contextual event consoles are found throughout the system. Each time you see an Events
tab on a device, device organizer, component, or event class, you can view event information that has been
automatically filtered to show events specific to the current context.
The master event console is the system's central nervous system, enabling you to view and manage events. It
displays the repository of all events that have been collected by the system.
You can sort events by any column that appears in the event console. To sort events, click a column header.
Clicking the header toggles between ascending and descending sort order.
102
Event Management
You can filter the events that appear in the list in several ways, depending on the field type. Date fields (such
as First Seen and Last Seen) allow you to enter a value or use a date selection tool to limit the list. For other
fields, such as Device, Component, and Event Class, enter a match value to limit the list.
The Count field allows you to filter the list when compared to a value:
n - Displays events with counts greater than or equal to that value.
<n - Displays events with counts less than that value.
<=n - Displays events with counts less than or equal to that value.
=n - Displays events with counts equal to that value.
Tip: You may want to re-title the bookmark, particularly if you choose to save more than one event console
view.
To set up automatic refresh, select one of the time increments from the Refresh list.
103
Event Management
You can view details for any event in the system. To view details, double-click an event row.
Tip: Be sure not to click other links in the row. These go to other pages.
To see more information about the event, click Show more details. To display the event information in a new
window, click the icon located at the top right.
You can use the Log area to add specific information about the event. Enter details, and then click Add.
You may want to mark an event as "acknowledged" to indicate, for example, that you have taken action to
remedy a problem. To mark events as acknowledged:
104
Event Management
You may want to return a previously acknowledged event to "new" status (revoke its "acknowledged" status).
To do this:
1. Select one or more events in the event console view.
2.
Click .
A check mark no longer appears in the event row, and the event is returned to "new" status.
Classifying events lets you associate one or more events with a specific event class. To classify events:
1. Select one or more events in the event console view.
2.
Click .
Note
You can export data from the event console to a comma-separated value (.csv) or XML file. To do this, select
Export > CSV or Export > XML. By default, the exported file is named events.Extension.
When you no longer want to actively monitor event (such as after you acknowledge it, for example), you can
move it to history. To do this:
1. Select one or more events in the event console view.
2.
Click .
To view events in history, click the Event History link (located at the bottom left of the Event Console page).
You can return events that have been moved to history to active status. When you do this, the events reappear
in the event console.
105
Event Management
3.
Click .
The selected events are returned to active status and appear in the event console.
For more information about manual event creation, see the section titled "Creating Events Manually."
There are a number of APIs available for submitting events into the system. For more information, see the
Zenoss Developer's Guide.
Any ZenPacks you install may optionally include their own daemons. For more information, see Zenoss Extended
Monitoring.
106
Event Management
Note
2. Complete the basic event fields. If you want any event class mappings to be applied to the event you are
creating, you must select the blank Event Class (rather than the default /). Event class mappings are applied
only for events that do not already have an event class.
7.1.8.2.1. Example
The following example shows how to use the zensendevent script to simulate a ping down event:
zensendevent -d router1.example.com -s Critical -c /Status/Ping "Router down"
107
Event Management
Following is a subset of the default event classes. You can create additional event classes as needed.
/Status - Used for events affecting availability.
/Status/Ping - Ping up/down events
/Status/Snmp - SNMP up/down events
/Status/Web - Web site or page up/down events
/Perf - Used for performance threshold events.
/Perf/CPU - CPU utilization events
/Perf/Memory - Memory utilization or paging events
/Perf/Interface - Network interface utilization events
/Perf/Filesystem - File system usage events
/App - Application-related events.
/Change - Events created when the system finds changes in your environment.
Just as device classes and devices have zProperties, so do event classes and event class mappings. zProperties
are applied hierarchically, with the most specific zProperty being applied.
The following zProperties are available on event classes and even class mappings.
zEventAction - How and where affected events are stored when they occur.
status - Active events table
history - Historical event table
drop - Events are not stored
zEventClearClasses - Optional list of event class names whose active events will be cleared by clear events
occurring in this class.
zEventSeverity - The severity of affected events is changed to this value unless the Original value is used.
A good example of how the system uses the event class zProperties is found in the /Change event class.
Within the /Change event class' zProperties, zEventAction is set to drop and zEventSeverity is set to Info. This
configuration causes all of the changes in your environment to be stored as info severity events in the history
table.
For more information about event manipulation techniques, see the section titled "Mapping and Transformation."
You cannot alter the following fields through event transformation. (This is because they are set after transfor-
mation has been performed.)
evid
firstTime
lastTime
count
The following illustration shows the path followed by an incoming event in the event mapping system.
108
Event Management
The mapping and transformation process begins with the "eventClass field exists" decision. This also is one of
the more important differentiators in how you must handle a particular type of event.
You can create event class mappings directly from the event classes, but this requires that you know the event-
ClassKey. A simpler way to create event class mappings is through the event console. Find an event that you
want to match, select it, and then click Classify. Choose the event class that you want the event to be mapped
109
Event Management
to, and then click OK. This will automatically create the event class mapping with the correct eventClassKey,
and example text against which you potentially can develop your regular expression.
From the Edit tab of an event class mapping, you can control which events it will match, as well as other prop-
erties:
Name - An identifier for this event class mapping. Not important for matching events.
Event Class Key - Must match the incoming event's eventClassKey field for this mapping to be considered
as a match for events.
Sequence - Sequence number of this mapping, among mappings with an identical event class key property.
Go to the Sequence tab to alter its position.
Rule - Provides a programmatic secondary match requirement. It takes a Python expression. If the expres-
sion evaluates to True for an event, this mapping is applied.
Regex - The regular expression match is used only in cases where the rule property is blank. It takes a Perl
Compatible Regular Expression (PCRE). If the regex matches an event's message field, then this mapping
is applied.
Transform - Takes Python code that will be executed on the event only if it matches this mapping. For more
details on transforms, see the section titled "Event Class Transform."
Explanation - Free-form text field that can be used to add an explanation field to any event that matches
this mapping.
Resolution - Free-form text field that can be used to add a resolution field to any event that matches this
mapping.
The sequence tab of an event class mapping allows you to handle situations where you need to provide more
than one possible mapping for the same eventClassKey. In this case, the sequence is evaluated in ascending
order until a full (rule or regex) match is found.
Mappings have the same zProperties as event classes. Any zProperty set locally on a mapping will override the
same property set on the event class. This works in the same hierarchical, most specific match, concept that
device class and device zProperties work.
When a captured event (see the section titled "Event Sources") occurs, it will not have an event class pre-
defined. For this type of event, you must create an event class mapping if you want to affect the event. If a
captured event occurs and none of the event class mappings in the system match it, its event class will be set
to /Unknown, and it will retain all of the default properties that it began with.
The next step of evaluation for events without an event class is to check on the eventClassKey field. This is the
first and most important field that controls which event class mapping the event will match. If the event has a
blank eventClassKey, or its eventClassKey does not match any event class mappings in the system, the special
defaultmapping eventClassKey is searched for instead. This provides for a way to map events even if they
have a blank or unpredictable eventClassKey.
When a generated event occurs, it has an event class assigned to it. This causes the event class mapping step
to be skipped. The only way to affect the fields of one of these events is through the event class zProperties
and transform.
The objects available in this Python context are evt (the event); and, if the event matches a device that exists
in the system database, a device object.
110
Event Management
Example
The following example shows how you can validate that a device object exists before using it to drop events
from a particular location.
if device and "Hawaii" in device.getLocationName():
evt._action = "drop"
111
Event Management
With the default settings, Debug, Info, and Warning events that do not occur for four hours are automatically
moved into the history table.
The event manager property that controls this behavior is Delete Historical Events Older Than (days).
The event commands that you configure are evaluated and executed by the zenactions daemon once each
minute (just as in alerting rules).
112
Event Management
7.1.13.1. ZenMail
ZenMail serves as an SMTP server that you can bind to a specific TCP port. You can then configure your
embedded system to send mail to the Zenoss server explicitly by using the Zenoss server's IP address as the
relay.
7.1.13.2. ZenPop
ZenPop allows you to retrieve event email from a POP server. ZenPop supports these configuration directives:
-usessl- Issue the STARTTLS command to the POP server and attempt to transfer email messages using
SSL encryption. This is required if retrieving mail from Google.
--nodelete - Do not issue the DELE command after retrieving all messages. Typically this is used during
initial testing so that you do not have to resend test messages to the POP account. Some email systems
(such as Google) do not actually delete messages when the DELE command is issued.
--pophost - The hostname or IP address of the POP server from which to retrieve messages.
--popport - The TCP port the POP server listens on. Defaults to 110. Used in situations where the POP
provider listens on another port (for example, Google on port 995).
--popuser - The user name that contains email messages to retrieve.
--poppass - The password to use for the user name provided.
--cycletime - The time to sleep between polls. After all email is retrieved, ZenPop sleeps for this amount
of time before waking up and attempting to pull new email.
If an SNMP trap enters the system, and Zenoss cannot identify the event (the event is classified as "/Unknown"),
then you can classify the event so that the system handles it consistently.
113
Event Management
The Event Mapper edit page appears. This page contains rules used to map the event to the /App category.
This rule, since it matches the trap by a specific OID, is all that is needed.
In the Transform area, you can enter code to modify the summary. For example, if you want to set the summary
string to "Spam Filter Detects Virus," then you can enter:
A trap has a header with some standard information, followed by a sequence of attribute/values. Click the last
column of the event to see these values as event details.
You have indicated you want the value for the OID ".1.3.6.1.4.1.9789.1500.2.5" as the summary. If you had the
MIB loaded, you could do this:
evt.summary = evt.spamFilterDetectsVirus
However, the OID and the data is still in there. Instead, use the slightly more cryptic:
The "device" object for the event has been made available, as well:
evt.summary = getattr(evt, ".1.3.6.1.4.9789.1500.2.5", "Unexpected missing OID") + " from device " + device.g
Zenoss uses MIBs to translate SNMP traps that contain raw OID values. Loading an MIB into the system allows
it to translate numeric OIDs such as .1.3.6.1.2.1.1.6 into descriptive phrases like sysLocation. It also makes
it easier to manipulate the events in an event mapping.
114
Event Management
Now, load some MIBs into the system so that this OID is translated into a better format:
1. Copy the demonstration MIB into $ZENHOME/share/mibs/site.
2. Run zenmib to load it:
$ zenmib run -v 10 DEBUG:zen.zenmib:TRAP-TEST-MIB.mib INFO:zen.zenmib:Unable to find a file providing \
the MIB UCD-SNMP- MIB ...
115
Event Management
3. The MIB loaded, but is missing some other definitions. Copy them:
$ cp /usr/share/snmp/mibs/SNMPv2-MIB.txt $ZENHOME/share/mibs/site $ cp /usr/share/snmp/mibs/UCD-SNMP-MIB.t
$ZENHOME/share/mibs/site
4. Run zenmib again and load the definitions into the system:
$ zenmib run -v 10
5. Send the trap a second time:
$ snmptrap -v 2c -c public localhost '' 1.3.6.1.4.1.2021.13.991 .1.3.6.1.2.1.1.6 s "Device in Annapolis"
6. Check the event. Make sure the count is 1. If the count is 2, send the event to the history and send the trap
again. Look at the Details tab. Now you should see something like this:
sysLocation Device in Annapolis
You should also see that the event summary changes from:
snmp trap 1.3.6.1.4.1.2021.13.991 from localhost
to:
snmp trap ucdExperimental from localhost
In this case, extract the sysLocation event detail and make it the summary with:
evt.summary = evt.sysLocation
5. Save the event mapping.
If you move the event to history and resend the trap, the summary for the trap should now read the device name
in the location you assigned.
If you encounter problems with the transform, check the zentrap.log file for errors that occurred.
Each event class allows for a short Python script to be executed when an event arrives.
Example
A user may want full file system threshold events on /data to be critical. Add the following Python script in the
Threshold Transform of /Events/Perf/Filesystem:
if evt.component == '/data' and evt.severity != 0:
evt.severity = 5
Like event mappings for Event Class Keys, both "evt" and "device" objects are available within the script of the
transform.
116
Chapter 8. Production States and
Maintenance Windows
8.1. About Production States and Maintenance Windows
Zenoss has the capability to support maintenance windows, or time periods, (scheduled or "on the fly") in which
the monitoring and alerting rules are changed. A set of rules governing monitoring, display, and alerting is
collectively defined as production states. When there are temporary changes in production state, and then a
reversion to the original state, this is a maintenance window.
There are three factors that determine how to choose a production state for a device:
A Maintenance window has a Start Time, Duration, Repeat Cycle, and Start Production State. The Start Pro-
duction State for the Maintenance Window is the state that the monitoring for the device (or group of devices)
is in when the Maintenance window begins or opens. For example, if your devices are running in a production
117
Production States and Maintenance Windows
state of Production (meaning you are monitoring and alerting on the devices normally) and the maintenance
window opening time arrives, the production state changes to the maintenance windows Start Production State.
For example, if the Start Production State is set to Maintenance, this means you want monitoring and data
collection to continue to occur for the device, but you do not want alerts to occur or any warnings to appear on
the dashboard. You can use this time to reboot the machine or make configuration changes that would normally
create alerts and not have them actually send alerts. You can schedule a maintenance window or change the
production state for the device manually at the time you want to make the changes. When the maintenance
window closes, the devices change to the End Production State for the maintenance window. To set up a
Maintenance Window, define the window such that when it's time for the Maintenance Window to occur, the
Start Production State should be Maintenance; and then when the Maintenance Window time frame expires,
the Stop Production State should be production. (This means it returns to monitoring and alerting as normal.)
This would save sending out known alerts as you rebooted or created other, known, alerting events.
When a maintenance window stops, an event is created with the following information:
severity - Clear
summary/message - Maintenance window stopping MaintenanceWindow for Target
prodState - -99 (meaning "unknown.")
Maintenance window event auto-clear, meaning that stop events clear start events.
118
Production States and Maintenance Windows
119
Chapter 9. Organizers and Path Navigation
9.1. About Organizers and Path Navigation
You can group system objects, including devices, sub-systems, zProperties, and templates. A device, for ex-
ample, can belong to multiple groupings, including groups, systems, locations, and device classes.
In the following illustration, the device tilde.zenoss.loc belongs to five different classifications. Any zProperties
and monitoring settings for each of these groups are now applied to this device.
9.2. Classes
The most important organizers are classes, which comprise:
Device classes
Event classes
Service classes
Product classes
Templates and zProperties can be inherited based on class. These attributes can be overwritten further down
the class hierarchy, all the way down to the individual component level. The class hierarchy includes all defined
and standard classes and sub-classes.
The following procedures use device classes and sub-classes, but the same concepts apply to event classes,
service classes, and product classes. When you add a device to the system, you should (after providing the
network name or IP address), at a minimum, specify its device class. Templates and zProperties can be set at
any level in the device class hierarchy.
120
Organizers and Path Navigation
The Device Class tab shows an "event rainbow" for that class level and a summary for the next level of class
hierarchy, along with an indicator of whether there are any devices in any of the classes that have events
associated with them.
1. Navigate to the Device Class tab for the class you where you want to set zProperties, and click the zProp-
erties Tab.
121
Organizers and Path Navigation
2. Define any of the normal Device zProperties. These will apply to all devices in this class or added to this
class unless overridden at a lower level in the hierarchy.
1. Navigate to the Device Class tab for the class you where you want to set Templates, and click the Templates
Tab.
122
Organizers and Path Navigation
2. Now you can define or bind any Device Template and they will apply to all devices in the class or added to
this class unless over-ridden at a lower level in the hierarchy.
9.3. Systems
Systems are intended to follow virtual setups like you would have in a network setup or systems grouped by
functionality.
123
Organizers and Path Navigation
2. Open the Sub-Systems table menu and select the Add New Organizer option. The Add Organizer dialog
appears.
124
Organizers and Path Navigation
The system is moved to the selected system. The attributes page for the newly selected system appears.
9.4. Groups
Using Groups is much like using systems only the intent is to use groups as functional divisions or even moni-
toring organizers to assign attributes to multiple objects with similar function or even among departmental lines.
Note that groups do not appear on the Dashboard. Even though they do not appear on the dashboard, they still
help to create additional organizers for monitoring or alerting.
3. From the pop-up menu, select where you want to move this group.
4. Click Move.
125
Organizers and Path Navigation
The group is moved to the selected group and the attributes page for the group where you moved the group
appear.
9.5. Locations
Using Locations is much like using systems and groups only the intent is to use locations as logical groupings
for physical locations of systems. They can be as general as city and state or as specific as rack or closet. It is
completely customize-able. Note that locations also do not appear on the Dashboard. Even though they do not
appear on the dashboard, they still help to create additional organizers for monitoring or alerting.
The system can map locations by using a Google Maps mashup feature by setting the location's "Address"
property to an address that Google Maps considers valid. The selected Location will appear on the map as a dot.
The color of the dot represents the highest severity of any event on any device under that location. In addition,
network connections that span locations will be represented on the map by lines also color-coordinated to the
appropriate to the status of that connection.
The Network map is also one of the portlets you can add to the dashboard.
Before you can use the Google Maps feature, you must obtain or register for a Google Maps API key.
Branding Note: The following sections will change depending on procedures for obtaining Google map key.
To obtain a Google Maps API key, open a support case through the customer support portal, at:
http://support.zenoss.com
Be sure to provide your Zenoss server key; this is required to generate the Google Maps API key. To find your
server key, select Settings, and then select the Versions tab.
You must register for a Google Maps API key. Free Google Maps API keys are linked to a base URL by which
an application must be accessed for Google Maps to function.
Users accessing the Web interface via a different URL than the one you specify here (for example, by IP
instead of hostname) will not be able to use the Google Maps feature.
3. Agree to the terms and click OK to receive your API key. Copy it to the clipboard.
126
Organizers and Path Navigation
You now have created the address for the location that will appear on the map for this location. You must
add at least one device to the Location for the dot to appear on the map.
Calculating network links on the fly is an expensive procedure. If you have a large number of Devices that have
been assigned Locations, drawing those links on the map may take a long time. In order to save time, you can
tell the system not to attempt to draw links for specific networks (for example, a local network comprising many
devices that you know does not span multiple Locations).
1. Navigate to the Network and click the "zProperties" tab.
2. Set the "zDrawMapLinks" property to "False."
3. Click "Save."
Like all zProperties, this setting will be inherited by all subnetworks. If you have few networks for which links
would be drawn, it might be a good idea to set zDrawMapLinks to False on /Networks, and only set it to True
on a network where you know a Location-spanning WAN connection exists.
127
Organizers and Path Navigation
6. Now navigate to the Network to which both devices are connected. Click the "zProperties" tab and set
"zDrawMapLinks" to True. Save.
7. Navigate back to the "Map" tab of /Locations. Notice that a green line is now drawn between New York
and Los Angeles.
8. Send an event to the device in /Locations/New York, with a severity of "Critical." Do not specify a component.
Now refresh the /Locations "Map" tab. Notice that the New York dot has become red. Also notice that the
link between New York and Los Angeles remains green.
9. Now navigate to the New York device's "OS" tab and determine the id of the component that is connected
to the network shared with the Los Angeles device. Send another test event, but this time specify that
component. Now refresh the /Locations "Map" tab and notice that the line linking the two locations has
become red.
The location is moved to the selected location and the attributes page for the location where you moved
the location appears.
9.6. Inheritance
Inheritance is defined by how many attributes are applied to a device at different points in the device hierarchy.
The following diagram shows an example of how and where zProperties can be set throughout the device class
tree.
128
Organizers and Path Navigation
In this example, you can see that the default properties can be set at the highest level (/), as you go further
down the hierarchy, though, you can see that you can override any of the zProperties set at the root level. The
next two lines show how the device tree further defines properties for Linux servers. If you wanted to set up and
use SNMP monitoring for all Linux servers (inclusive of) build.zenoss.loc, you can change these properties at
the /Server/Linux level. Now if you wanted to change how you collected information for remote Linux servers,
you can create a sub-group within the /Server/Linux group called /Server/Linux/Remote and set these servers
will use SSH monitoring and change the associated properties for that sub-group. Now also within the /Server
group you can create another sub-group for Windows servers that change the zProperties specifically for WMI
monitoring. All of these zProperties and groupings co-exist with any changes made lower in the hierarchy taking
priority. It is very similar to a directory tree only you can place items in multiple organizers.
129
Chapter 10. User Commands
10.1. About User Commands
User commands allow users to execute arbitrary shell commands from within the system. These commands
can then be run manually against a single device or a group of devices. The user commands are executed on
the server, not on the remote device (unless the user command explicitly uses SSH to connect to the remote
device.) User commands can be defined on any device class, system, group or location. They can also be
defined globally from the Settings page under the Manage tab.
3. In the Command Id field, enter a name for the command, and then click OK.
130
User Commands
4. In the Description field, enter a brief description of what the command will do.
5. In the Command section, enter the TALES expression-based command you want to run on the selected
device or devices.
6. Enter your password for confirmation, and then click Save.
The Command is saved and added to the command menu so you can choose to run it at any time.
In a TALES expression here is the object that the expression is executed against. Some TALES expressions
in the system have other variables like evt for event and dev or device for the device. See the TALES
Expression appendix for more information on the syntax of the various TALES expressions.
4. Go to a device and run this command.
5. Now go back to the editing of this command and add some more information to the command.
echo name = ${here/id} ip = ${here/manageIp} hw = ${here/getHWProductName}
6. Now try running the command against a group of devices and see the command outputs.
131
Chapter 11. Managing Users
11.1. About User Accounts
Each user has a unique user ID, which allows you to assign group permissions and alerting rules that are unique
to each user. Unique IDs also help ensure secure access to the system.
To create and manage user accounts, you must be logged in to the system admin account, or as a user with
extended privileges.
132
Managing Users
After creating the account, edit the account to provide a password and additional user details. See the section
titled "Editing User Accounts" for more information about setting user preferences.
133
Managing Users
For more information about user roles, and for a list of available roles and the privileges they provide,
see the section titled Roles in this chapter.
Email - Enter the user's email address. To verify that the address is valid, click the test link.
Pager - Enter the user's pager number.
Default Page Size - Controls how many entries (by default) appear in tables. Enter a value for the
default page size. The default value is 40.
Default Admin Role - Select the default role that this user will have for administered objects associated
with him.
Enter your password, and then click Save to confirm and save your changes.
For more information about object-specific roles, see the section titled Roles in this chapter.
134
Managing Users
2. Select an object type from the Administered Objects table menu. You can add a Device, System, Group,
or Location.
The object appears in the Administered Devices list for the user.
4. Optionally, change the role that is associated for this user on this object.
Note
The default role assigned to the user for an administered object is specified by the Default Admin Role
field on the Edit tab.
5. Click Save to save changes.
You can also set associated an object with a user by adding an administrator to the object. To do this:
1. Navigate to the object you want to add the user's list of administered objects.
2. From the page menu, select More, and then select Administration.
135
Managing Users
3. In the Administrators area, select Add Administrator from the table menu.
The administrator appears in the object's Administrators list. The object is added to the user's Administered
Objects list.
136
Managing Users
4. In the Group field, enter a name for this user group, and then click OK.
7. From the User list of selections, select the users you want to add to the group, and then click OK.
The user or users you select appear in the list of users for this group.
You also can choose administered objects and alerting rules for this user group. These alerting rules will apply
to all users in the group. The user's original alerting rules and objects will also apply.
11.5. Roles
A role is a group of permissions that you can assign to users or groups.
Role Definition
ZenUser Provides global read-only access to system objects.
ZenManager Provides global read-write access to system objects.
137
Managing Users
Role Definition
Manager Provides global read-write access to system objects. Additionally provides read-
write access to the underlying Zope object database.
ZenOperator Installed by the ZenOperatorRole ZenPack. This ZenPack is available only to
Enterprise customers. The ZenOperator role provides users the ability to man-
age events. Combine the ZenOperator role with the ZenUser role to allow users
read-only access to the system, but also allow them to acknowledge events,
move events to history, and add log messages to events.
The Device Access Control List (ACL) Enterprise ZenPack (ZenDeviceACL) adds fine-grained security controls
to the system. For example, this control can be used to give limited access to certain departments within a large
organization or limit a customer to see only his own data. A user with limited access to objects also has a more
limited view of features within the system. As an example, most global views, such as the network map, event
console, and all types of class management, are not available. The Device List is available, as are the device
organizers Systems, Groups, and Locations. A limited set of reports can also be accessed.
138
Managing Users
an object has been added you can assign it a role. Roles can be different for each object so a user or group
might have ZenUser on a particular device but ZenManager on a location organizer. If multiple roles are granted
to a device though direct assignment and organizer assignment the resulting permissions will be additive. In the
example above, if the device was within the organizer the user would inherit the ZenManager role on the device.
Within Zenoss Core, portlet access can be controlled. This is important for Device ACLs.
A user in restricted mode does not have access to the global event console. The available events for the user
can be seen under his organizers.
139
Managing Users
These have content that will be restricted to objects for a given user.
11.6.4.4. Reporting
Reports are limited to device reports and performance reports.
140
Chapter 12. Reporting
12.1. About Reporting
Zenoss aggregates and reports, over time, on the data you set it up to monitor.
To work with reports, select Reports from the navigation area. The Reports list appears.
To export report data, click Export All (located at the bottom of a report).
141
Reporting
<tal:block metal:use-macro="here/reportMacros/macros/exportableReport">
<tal:block metal:fill-slot="report"
</tal:block>
</tal:block>
</tal:block>
142
Reporting
Device Changes - The Device Change report shows information about the history of any changes that the
system detects when modeling each device. This report only shows devices with changes. The information
available in this report includes the device name, device class, the time when the device was first seen, the
last time the system collected data on this device, and any changes made to the configuration at that time.
Ping Status Issues The Ping Status Report shows the device name, the device class, the product name,
the current state of the device, and the ping and SNMP status. The only devices that will show up here are
devices that actually have or have had ping issues.
SNMP Status Issues - The SNMP Status Report shows the device name, the device class, the product
name, the current state of the device, and the ping and SNMP status. The only devices that will show up
here are devices that actually have or have had SNMP issues.
New Devices The New Devices report shows devices that have been recently added. The report shows
the device name, the device class, when the device was first seen, and the model collection age.
This report uses data point aliases. (For more information about data point aliases, see the section titled
"Data Point Aliases" in the chapter Core Monitoring.) To add data points to a report, add the alias, and then
ensure the values return in the expected units.
This report uses data point aliases. (For more information about data point aliases, see the section titled
"Data Point Aliases" in the chapter Core Monitoring.) To add data points to a report, add the alias, and then
ensure the values return in the expected units.
143
Reporting
The value for a date range is calculated by summing the duration of all events of a particular class with a
production state of "Production" and with a severity greater than or equal to a specified severity. This sum
is then divided by the duration of the time range, and then subtracted from 1 and multiplied by 100 to get
the percent available, as in:
Note
Events that occur only once are not used in calculating device availability. Specifically, events whose
firsttime and lasttime fields are the same are not used in the calculation. These could represent an event
that occurs and is subsequently cleared by the next event, or an event that has happened only once in
the specified date range.
Memory Utilization The Memory Utilization Report provides system-wide information about the memo-
ry usage for devices in the system. This report shows Total memory, Available memory, Cache memory,
Buffered memory, and percent of memory utilized.
This report uses data point aliases. (For more information about data point aliases, see the section titled
"Data Point Aliases" in the chapter Core Monitoring.) To add data points to a report, add the alias, and then
ensure the values return in the expected units.
This report uses data point aliases. (For more information about data point aliases, see the section titled
"Data Point Aliases" in the chapter Core Monitoring.) To add data points to a report, add the alias, and then
ensure the values return in the expected units.
144
Reporting
Note that Graph reports can only display graphs that already exist on devices or components within the system.
You cannot define new graphs or alter existing graphs from within a Graph report. If you need this type of
functionality you probably want MultiGraph reports instead.
145
Reporting
146
Reporting
the Filter button and pressing Return or clicking the Filter Button. When you select one or more Devices the
Component list will display the names of all Components defined on at least one of the selected Devices. The
Graph list will list the Graphs available on one or more of the listed Devices. When one or more Components
are selected the Graph list will display Graphs from the selected Components rather than the selected Devices.
At any point you may select one or more Graphs and use the Add Graph to Report button. The system steps
through each selected component (if any are selected) or Device (if no Components are selected) looking for
graphs with the given names. Matching graphs are added to the Graph Report.
Graph Reports maintain a static list of graphs which does not change when graphs are added or deleted from
Performance Templates. For example, take DeviceA which has only one graph called Graph1 and DeviceB
which has two graphs named Graph1 and Graph2. On the Graph Report edit page if you selected DeviceA and
DeviceB the list of graphs would include Graph1 and Graph2. Selecting both graphs and clicking the Add Graph
to Report button would add three graphs to the report: DeviceA's Graph1, DeviceB's Graph1 and DeviceB's
Graph2. If at some later date you created a Graph2 on one of DeviceA's Performance Templates it would not
automatically appear on the Graph Report, you would have to edit the report to specifically add it. Similarly,
if one of the graphs was removed from DeviceB's Template (or if DeviceB was deleted from the system) you
would need to manually remove them from the Graph Report.
147
Reporting
MultiGraph Reports include their own Graph Definitions and thus do not use the Graph Definitions that are
defined within Performance Templates. If you want to create a report that includes graphs defined on Templates
then you may wish to use GraphReports rather than MultiGraph Reports.
148
Reporting
Once you've created the MultiGraph Report there are three steps required to get graphs showing on the report:
1. Create a Collection which contains the Devices and/or Components you want to graph.
2. Create a Graph Definition that describes the graph(s) you want on the report.
3. Create a Graph Group which specifies the Collection and the Graph Definition you just created. The Method
setting in the Graph Group lets you choose to have the graph drawn once for each Device/Component in
the Collection or you can have the data from all the Devices/Components combined into a single graph.
These are just the minimal steps to getting a functional MultiGraph Report. You can create any number of
Collections, Graph Definitions and Graph Groups in a single report. See the sections that follow for details on
creating Collections, Graph Definitions and Graph Groups.
149
Reporting
12.7.2. Collections
A Collection is a group of Devices and/or Components. A MultiGraph Report must have at least one Collection.
Collections are listed in the Collections table on the report's Edit page. You can create a new Collection with the
Add Collection menu item on that table then specifying a name in the dialog that appears.
A Collection consists of one or more Collection Items. A Collection Item is a list of Device Classes, Systems,
Groups, Locations or specific Devices and Components that should be included in this Collection. You can
create as many Collection Items of the various types as you wish within a single Collection. The controls for
creating Collection Items are in the Add To Collection table of the Collection edit page. The Item Type menu
lets you select one of the following:
Device Class/System/Group/Location - Selecting one of these options reveals a list of all organizers of that
type. You can select one or more of the organizers to include in the Collection. By selecting True for the
Include Suborganizers field the Collection will also include all organizers recursively beneath the ones you
selected. These Collection Items are dynamic - when devices are added or removed from these organizers
they will appear or disappear from the report. Clicking the Add to Collection button creates a new Collection
Item for each of the selected organizers.
Specific Device/Component - Selecting this type reveals a list of all devices. You can use the Filter field to
narrow this list by entering a full or partial Device name. Selecting one or more Devices will display a list of
Component names that apply to one or more of the selected Devices. If you do not select any Components
and click the Add to Collection button then a new Collection Item is created for each selected Device.
Once you have specified an Item Type and made your selection click the Add to Collection button to create the
new Collection Item. It will be added to the list of Collection Items at the end of the page. Collection items can be
deleted or reordered within this list. Order of the Collection Items determines the order that the graphs are drawn
in or the order that data is drawn on a combined graph. See the section on Graph Groups for more details.
150
Reporting
The most significant differences between Graph Definitions in the two contexts is how DataPoint Graph Points
and Threshold Graph Points are added. When adding a DataPoint Graph Point to a Graph Definition within a
Performance Template you can select from a list of DataPoints that are defined on that Template. But within
the context of a MultiGraph Report there are no GraphPoint definitions to list. So instead of listing the available
DataPoints, the DataPoint Graph Point dialog has a text field where you enter the name of the DataPoint. To
make things easier the input has an auto-complete feature which knows the names of every DataPoint defined.
This same situation is true with Threshold Graph Points.
151
Reporting
152
Reporting
As with Graph Reports, if you have specified multiple columns for a report then the graphs are drawn left to right
in that number of columns using as many rows as necessary.
To access the ZMI for a report, append the report page URL with "/manage."
here.hw.serialNumber != ""
Sort Column - Specify the column on which you want to sort the report by default.
Sort Sense - Specify the sense that the system uses to sort: asc (ascending sort) or desc (descending
sort).
Columns - Specify the data to be retrieved and displayed in the report.
For example:
getId - Gets the name of any devices.
getManageIp - Gets the IP addresses of the devices.
getHWSerialNumber - Grabs serial numbers for the devices.
153
Reporting
Note
For a complete list of valid options, refer to the information on Device schema in the appendix titled
"TALES Expressions."
Column Names - Optionally specify column names to make the column headers more descriptive.
For the columns shown in the previous example, you could use these column names:
Device
Address
Serial #
6. Click Save.
7. Click the Report tab at the top of the page.
The new device report appears, showing the devices that meet the criteria you specified.
From the Web interface, navigate to Reports. Follow the path to the various reports listed below to see the
reports. The troubleshooting items on the right give you clues as to what to expect to find in the various reports.
The following steps demonstrate how you would set up the standard Availability Report to be emailed to
<[email protected]> every Monday morning at 6 a.m.
1. Find the proper URL to the Availability Report by navigating to it in the Web interface and taking note of
the URL in your browser.
154
Reporting
2. Log in to your Zenoss server and switch to the zenoss user by running the command:
su - zenoss
3. Create a script that will invoke reportmail with the appropriate options with the following commands:
mkdir -p $ZENHOME/scripts
cat <<EOF > $ZENHOME/scripts/emailAvailabilityToJoe.sh
#!/bin/sh
REPORTS_URL="http://zenoss.example.com:8080/zport/dmd/Reports"
$ZENHOME/bin/reportmail \
--user=admin \
--passwd=PASSWD \
--from="[email protected]" \
--address="[email protected]" \
--subject="Zenoss: Availability Report" \
--url="$REPORTS_URL/Performance Reports/Availability Report"
EOF
Note
You can run reportmail --help on your Zenoss server for additional help on reportmail options.
4. Run crontab -e to edit the zenoss user's crontab. You will be presented with an editor that allows you to
set up scheduled commands.
5. Type a capital O to add a new line, and then enter the following job definition:
# Email availability report to Joe every Monday morning at 6am.
0 6 * * 1 bash -lc '$ZENHOME/scripts/emailAvailabilityToJoe.sh'
Note
You can run man 5 crontab on your system server for more help on crontab formatting.
6. Type ESCAPE, and then :wq to save this crontab.
Argument Explanation
-u URL, --url=URL URL of report to send. This can also be the URL of any
other page within Zenoss.
-U USER, --user=USER User to log into Zenoss. This user must have permis-
sion to view the supplied URL.
-p PASSWD, --passwd=PASSWD Password to log into Zenoss.
155
Reporting
Argument Explanation
-a ADDRESS, --address=ADDRESS Email address for report delivery (may be given more
than once.) Default value comes from the user's profile.
-s SUBJECT, --subject=SUBJECT Subject line for email message. Default value is the title
of the page.
-f FROMADDRESS, --from=FROMADDRESS Origination address for the email being sent.
-d DIV, --div=DIV DIV to extract from the HTML at URL. The default value
is contentPane which will work for all default reports.
-c COMMENT, --comment=COMMENT Comment to include in body of CVS reports. This is only
used if the URL returns CSV (comma separated value)
data. Most default reports can return CSV formatted
data by appending ?doExport to the end of the URL.
156
Chapter 13. ZenPacks
13.1. About ZenPacks
A ZenPack is a package that adds new functionality to Zenoss. You can use ZenPacks to add action rules, event
classes, event commands, user commands, service classes, data sources, graphs, performance templates, re-
ports, model extensions, and product definitions. A ZenPack can also add daemons, and user interface features
such as menus.
ZenPacks are a mechanism for extending and modifying the system. This can be as simple as adding new device
classes or performance templates, or as complex as extending the data model and providing new collection
daemons. ZenPacks can be distributed for installation on other Zenoss systems. Simple ZenPacks can be
created completely within the user interface. More complex ZenPacks require development of scripts or daemons
in Python or another programming language.
The guide titled Zenoss Extended Monitoring provides detailed descriptions, installation information, and con-
figuration details for each of the ZenPacks.
You can install ZenPacks from the command line on the Zenoss server, or from the user interface.
If you have the source code for the ZenPack you can install directly from that rather than from a .egg file. The
command is the same, you just specify the directory containing the source code. This copies the source code into
either $ZENHOME/ZenPacks (for newer egg ZenPacks) or $ZENHOME/Products (for older style ZenPacks.)
zenpack --install <directoryname>
zenoss restart
If you are developing a ZenPack you usually will want to maintain your source code outside of $ZENHOME/ZenPacks
or $ZENHOME/Products. This is advisable for two reasons. First, if you issue a zenpack --remove command it
will delete your code from either of those two locations and you would lose your files unless you had them
backed up elsewhere. Second, if you are maintaining your source code in a version control system it is frequently
more convenient to have the files reside elsewhere on the file system. Using the --link option you can install
the ZenPack but have the system use your code from its current location. Instead of installing your code in
$ZENHOME/ZenPacks or $ZENHOME/Products the system will create a link in one of those locations that points to
your source code directory.
zenpack --link --install <directoryname>
zenoss restart
157
ZenPacks
http://community.zenoss.org/community/zenpacks
Also on that page is a link to download an RPM that includes the most popular Core ZenPacks. To install via
the Core ZenPacks RPM follow these steps:
1. Download the appropriate file from the ZenPacks download area specific to your version.
2. Make sure ZEO is running (as the zenoss user):
zeoctl start
3. Install the rpm (as root user):
For another example, say you want to monitor a new piece of software running on one of your servers. You would
like to monitor several performance metrics of this software, but they are available only via a programmatic API
provided with the software. You could develop a new collector daemon to gather data via this API and provide
it back to the system. You might also create a new type of data source to provide configuration data for the
new collector. Obviously this effort would require development skills and intimate knowledge of the system not
necessary for the previous example, but this functionality can be distributed as a ZenPack.
When logged in as an Administrator, click the Setting link and then on the ZenPacks tab. Select the "Create a
ZenPack..." menu item. You will get a dialog asking for a name for your new ZenPack. The name must be of the
form ZenPacks.Organization.Identifier, where Organization is a name that identifies you or your organization and
Identifier is a string that represents the intent of your ZenPack. For example, ZenPacks.zenoss.HttpMonitor was
created to help monitor HTTP sites. Once you have entered a name, click Save. This creates both the ZenPack
object in the database as well as a new directory in the file system $ZENHOME/ZenPacks/YourZenPackID.
Many types of objects can be added to a ZenPack via the user interface. Some examples are:
Device Classes
158
ZenPacks
Event Classes
Event Mappings
User Commands
Event Commands
Service Classes
Device Organizers
Performance Templates
Devices are the conspicuous omission from this list. Any individual Device is usually specific to a particular site
and therefore not likely to be useful to other users.
To add one of these database objects to a ZenPack navigate to that object and use the "Add to ZenPack..."
menu item. The system will present a dialog which lists all installed ZenPacks. Select the ZenPack to which you
want to add this object and click the Add button. To view the objects that are part of a ZenPack navigate to the
Settings page then the ZenPacks tab. Click on the name of the ZenPack and you will see a page that lists both
the files and the objects that are part of this ZenPack. You can remove objects from the ZenPack by selecting
the checkboxes next to them and using the "Delete from ZenPack..." menu item.
ZenPacks can contain items that are not ZEO database items, such as new daemons, Data Source types,
skins, etc. These are added to a ZenPack by placing them in the appropriate subdirectory within the ZenPack's
directory. See the Core ZenPacks at http://community.zenoss.org/community/zenpacks for examples of how to
incorporate such items into your ZenPack. Further information regarding ZenPack development is available in
the Zenoss Developer's Guide.
Discussion regarding development of ZenPacks takes place on the zenoss-dev mailing list and forums:
http://community.zenoss.org/community/forums
http://community.zenoss.org/community/developers/zenpack_development
159
Chapter 14. General Administration and
Settings
Read the following sections to learn more about performing general administration tasks, including:
Sending alerts to email recipients or pagers
Adjusting event manager settings
Setting portlet permissions
Performing backup and recovery tasks
Viewing, starting, and stopping jobs
Tuning and maintaining the system
160
General Administration and Settings
Field Description
SMTP Host Set the SMTP Host value to your corporate email server.
SMTP Port Usually port 25.
SMTP Username Leave this field blank.
SMTP Password Leave this field blank.
From Address for Emails Enter a value if you want email to come from a specific email address.
Use TLS? Select this option if you use transport layer security for your email alerts.
3. Enter a Page Command as necessary if you are using the system to send pages. The pageCommand
variable enables the system to execute the pageCommand when a page is sent, and writes the message
to the standard input of the subshell. The command prints any error messages to standard output. This
enables a wider ranging of paging customization.
161
General Administration and Settings
This uses ZENHOME to send the page from the localhost; however, you can use any page command
customizations you want. In this case $RECIPIENT is actually the paging address for the user, as set in
the settings for each user.
162
General Administration and Settings
Before you can successfully set portlet permissions, you must assign the user a specific Zenoss role. (You
assign roles from the Users tab of the Settings area.) Each user role is mapped to one or more Zope ACL
permissions, which allow you to restrict the portlets a permission level can see.
A user's specific portlet permissions are defined in part by Zope ACL permissions, and in part by the role to
which he is assigned.
163
General Administration and Settings
3. For one or more portlets in the Available Portlets list, select the permission you want to apply.
4. Click Save.
164
General Administration and Settings
If you have the available disk space, tar and zip $ZENHOME before starting any backup or restore operation.
Make sure the system, including all daemons, is stopped before performing a restore operation.
Avoid using these tools to go from a newer version of Zenoss to an older version.
If you use these tools to go from an older version to a newer version, you should run zenmigrate after the
restore operation.
If restoring to a different Zenoss installation (one that differs from the backup version), make sure file paths
in the $ZENHOME/etc/*.conf files are appropriate for the new environment after you restore.
The following sections describe backup and restore scripts, as well as options for controlling their behavior.
If the system is running then you can run zenbackup without any arguments. A backup file will be placed in
$ZENHOME/backups.
Note
Use the zenbackup --help command to see a complete list of zenbackup options.
Option Description
--dbname Specifies the name of the MySQL database the system uses
to hold event data. By default this is "Zenoss" but this can be
specified when the system is installed. This value can be seen
by looking at the database field on the Event Manager page.
If you do not specify --dbname then zenbackup will attempt to
retrieve this information from ZEO unless you specify --dont-
fetch-args.
--dbuser, --dbpass These are the MySQL username/password used to access the
events database. If you do not specify --dbuser or --dbpass
then zenbackup will attempt to retrieve this information from
ZEO unless you specify --dont-fetch-args.
--dont-fetch-args This instructs zenbackup not to attempt to get values for db-
name, dbuser and dbpass from ZEO.
--file=Filename Use --file to specify a location for the backup file. By default it
will be named zenoss_Date.tgz and placed in $ZENHOME/back-
ups.
--stdout This flag tells zenbackup to send the backup information to std-
out instead of to a file. Incompatible with --verbose.
--save-mysql-access This instructs zenbackup to save dbname, dbuser and dbpass
as part of the backup file so that zenrestore will have this in-
formation during a restore operation. Use this with caution as it
means your backup files will contain a MySQL user name and
password.
--no-eventsdb Do not include the MySQL events database as part of the back-
up.
-v, --verbose Print progress messages. Incompatible with --stdout.
165
General Administration and Settings
If you used the --save-mysql-access option when you created the backup file then you only need to specify --
file when you run zenrestore. Otherwise, you need to specify dbname, dbuser and dbpass also.
Note
Use the zenrestore --help command to see a complete list of zenrestore options.
Option Description
--file This is a backup file created with zenbackup You must specify
either --file or --dir.
--dir The path to an unzipped backup file. You must specify either --
file or --dir.
--dbname This is the name of the MySQL database the system uses to
hold event data. This database must exist before zenrestore is
run. If there are any system tables in the database they will be
dropped by zenrestore before it restores the backed up tables
and data. If you use a different dbname than was in use when
the backup was created, then after the restore you must set the
database name on the Event Manager page.
--dbuser, --dbpass These are the MySQL username/password used to access the
events database. If you do not specify --dbuser or --dbpass
then zenrestore will attempt to use values stored in the backup
file if --save-mysql-access was used in creating it.
--no-eventsdb Do not restore the MySQL events database. If the backup file
does not contain MySQL events data then zenrestore will not
166
General Administration and Settings
Option Description
modify your events database even if you do not specify --no-
eventsdb.
-v, --verbose Print progress messages.
Note
Not all jobs run in the Job Manager. When running other jobs (in the foreground), do not navigate away from
the current page until the job completes.
The jobs list shows information about all jobs currently in the system:
Status - Shows the current job status. Status options are Pending (waiting for zenjobs to begin running),
Running, Succeeded, and Failed.
Job Type - Provides a short indicator of the job type.
Description - Provides a longer description of the job. Generally, this includes the shell command run by
the zenjobs daemon.
Started / Finished / Duration - Provide information about the time period in which the job ran.
Actions - Shows actions you can take on the job. These include:
Log - Click to view the real-time output of a running job or final output from a completed job.
Stop - Ask the zenjobs daemon to stop running this job.
Delete - Remove this job from the system.
167
General Administration and Settings
In version 2.4.x, each daemon performs its own log rotation. You can customize rotation parameters by inserting
the following directives in each daemon's configuration file, located in the $ZENHOME/etc file:
Directive Description
--maxlogsize=MAXLOGKILOBYTES Specifies the maximum size of the log file, in kilobytes. By de-
fault, the maximum is 10240 KB.
--maxbackuplogs=MAXBACKUPLOGS Specifies the maximum number of backup log files. By default,
the maximum is 3.
If you do not specify a directive, then the system uses the default values.
168
General Administration and Settings
rotate 2
copytruncate
}
169
Appendix A. Daemon Commands and
Options
Zenoss daemons provide the services that collect and feed data to the data layer. These daemons are divided
among the following categories:
Automated modeling
Availability monitoring
Event collection
Performance monitoring
Automated response
170
Daemon Commands and Options
171
Appendix B. SNMP Device Preparation
This appendix provide information about SNMP support, and lists Net-SNMP configuration settings that are
required by the system.
B.1. Net-SNMP
By default, Net-SNMP does not publish the full SNMP tree. Check to see if that is currently the case on a device
and configure it correctly.
1. Confirm snmpd is running:
> snmpwalk -v1 -cpublic <your device name> system
2. Retrieve the IP table for the device with snmpwalk:
> snmpwalk -v1 -cpublic <your device name> ip
The following zProperties control the authentication and privacy of these requests:
zSnmpAuthType: use either "MD5" or "SHA" signatures to authenticate SNMP requests
zSnmpAuthPassword: the shared private key used for authentication. Must be at least 8 characters long.
zSnmpPrivType: either "DES" or "AES" cryptographic algorithms.
zSnmpPrivKey: the shared private key used for encrypting SNMP requests. Must be at least 8 characters
long.
zSnmpSecurityName: the Security Name (user) to use when making SNMPv3 requests.
If zSnmpPrivType and zSnmpPrivPassword are set, the message is sent with privacy and authentication. If only
the zSnmpAuthType and zSnmpAuthPassword are set, then the message is sent with Authentication but no
Privacy. If neither the Priv or Auth values are set, the message is sent with no authentication or privacy. It is an
error to set the PrivType and PrivPassword without also setting an AuthType and AuthPassword.
SNMPv3 encryption using the AES (Advanced Encryption Standard) algorithm is supported only if the host
platform net-snmp library supports it.
Currently, RedHat 5 and Ubuntu 7.10 do not support AES. OpenSuSE 10.2 and the Zenoss Appliance do.
You can determine if your platform supports AES by using the following test:
then your platform does not support AES encryption for SNMPv3.
172
SNMP Device Preparation
Note
This line will map the security name into a group name:
# groupName securityModel securityName
This line will create a view for you to let the group have rights to:
# Make at least snmpwalk -v 1 localhost -c public system fast again.
This line will grant the group read-only access to the systemview view.
# group context sec.model sec.level prefix read write
notif
access notConfigGroup "" any noauth exact systemview
none none
trapsink default
173
Appendix C. Using an Existing MySQL
Server to Store Events
C.1. About
You can configure the system to store events in an existing, remote MySQL server. You might want to do this
if you think you may generate too many events for a local MySQL server to handle.
C.2. Procedure
The following steps show how an existing installation can be configured to use a specific MySQL server.
1. Initialize the new database.
As a super-privileged user on the MySQL server, create the events database schema. The zenevents.sql
and zenprocs.sql files are located in $ZENHOME/Products/ZenEvents/db on your server. Replace 10.1.2.30
with the IP address of your server, and replace the password with your password.
Note
The installation --help option lists command-line options for setting up a remote MySQL server.
174
Appendix D. Syslog Device Preparation
D.1. Forwarding Syslog Messages from UNIX/Linux Devices
Zenoss has its own syslog server, zensyslog. Managed devices should point their syslog daemons to the system.
To do this, edit the /etc/syslog.conf file and add an entry, where 1.2.3.4 is the zensyslog IP:
1. Log on to the target device (as a super user).
2. Open /etc/syslog.conf file with a text editor (such as vi).
3. Enter *.debug and press the Tab key. Then enter the host name or IP address of the server. For example:
*.debug @192.168.X.X
4. Save the file and exit the file editor program.
5. Restart the Syslog service using the command below:
/etc/init.d/syslog restart
Catalyst
set logging server enable
set logging server 192.168.1.100
set logging level all 5
set logging server severity 6
Local Director
syslog output 20.5
no syslog console
syslog host 192.168.1.100
PIX Firewalls
logging on
logging standby
logging timestamp
logging trap notifications
175
Syslog Device Preparation
logging facility 19
logging host inside 192.168.1.100
FreeBSD:
source src { unix-dgram("/var/run/log"); internal ();};
176
Appendix E. TALES Expressions
E.1. About Tales Expressions
Use TALES syntax to retrieve values and call methods on Zenoss objects. Several fields accept TALES syntax;
these include:
Command templates
User commands
Event commands
zLinks
Commands (those associated with devices and those associated with events) can use TALES expressions to
incorporate data from the related devices or events. TALES is a syntax for specifying expressions that let you
access the attributes of certain objects, such as a device or an event.
For additional documentation on TALES syntax, see the TALES section of the Zope Page Templates Reference:
http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/AppendixC.stx
Depending on context, you may have access to a device, an event, or both. Following is a list of the attributes
and methods you may want to use on device and event objects. The syntax for accessing device attributes
and methods is ${dev/attributename}. For example, to get the manageIp of a device you would use ${dev/
manageIp}. For events, the syntax is ${evt/attributename}.
A command to ping a device might look like this. (The ${..} is a TALES expression to get the manageIp value
for the device.)
ping -c 10 ${device/manageIp}
E.1.1. Examples
DNS Forward Lookup (assumes device/id is a resolvable name)
host ${device/id}
DNS Reverse Lookup
host ${device/manageIp}
SNMP Walk
snmpwalk -v1 -c${device/zSnmpCommunity} ${device/manageIp} system
To use these expressions effectively, you must know which objects, attributes, and methods are available, and
in which contexts. Usually there is a device that allows you to access the device in a particular context. Contexts
related to a particular event usually have event defined.
Attribute Description
getId The primary means of identifying a device within the system
getManageIp The IP address used to contact the device in most situations
productionState The production status of the device: Production, Pre-Production, Test, Mainte-
nance or Decommisioned. This attribute is a numeric value, use getProduction-
StateString for a textual representation.
177
TALES Expressions
Attribute Description
getProductionStateString Returns a textual representation of the productionState
snmpAgent The agent returned from SNMP collection
snmpDescr The description returned by the SNMP agent
snmpOid The oid returned by the SNMP agent
snmpContact The contact returned by the SNMP agent
snmpSysName The system name returned by the SNMP agent
snmpLocation The location returned by the SNMP agent
snmpLastCollection When SNMP collection was last performed on the device. This is a DateTime
object.
getSnmpLastCollectionString Textual representation of snmpLastCollection
rackSlot The slot name/number in the rack where this physical device is installed
comments User entered comments regarding the device
priority A numeric value: 0 (Trivial), 1 (Lowest), 2 (Low), 3 (Normal), 4 (High), 5 (High-
est)
getPriorityString A textual representation of the priority
getHWManufacturerName Name of the manufacturer of this hardware
getHWProductName Name of this physical product
getHWProductKey Used to associate this device with a hardware product class
getOSManufacturerName Name of the manufacturer of this device's operating system.
getOSProductName Name of the operating system running on this device.
getOSProductKey Used to associate the operating system with a software product class
getHWSerialNumber Serial number for this physical device
getLocationName Name of the Location assigned to this device
getLocationLink Link to the system page for the assigned Location
getSystemNames A list of names of the Systems this device is associated with
getDeviceGroupNames A list of names of the Groups this device is associated with
getOsVersion Version of the operating system running on this device
getLastChangeString When the last change was made to this device
getLastPollSnmpUpTime Uptime returned from SNMP
uptimeStr Textual representation of the SNMP uptime for this device
getPingStatusString Textual representation of the ping status of the device
getSnmpStatusString Textual representation of the SNMP status of the device
Attribute Description
agent Collector name from which the event came (such as zensyslog or zentrap).
component Component of the associated device, if applicable. (Examples: eth0, httpd.)
count Number of times this event has been seen.
dedupid Key used to correlate duplicate events. By default, this is: device, component,
eventClass, eventKey, severity.
178
TALES Expressions
Attribute Description
device ID of the associated device, if applicable.
DeviceClass Device class from device context.
DeviceGroups Device systems from device context, separated by |.
eventClass Event class associated with this device. If not specified, may be added by the
rule process. If this fails, then will be /Unknown.
eventClassKey Key by which rules processing begins. Often equal to component.
eventGroup Logical group of event source (such as syslog, ping, or nteventlog).
eventKey Primary criteria for mapping events into event classes. Use if a component
needs further de-duplication specification.
eventState State of event. 0 = new, 1 = acknowledged, 2 = suppressed.
evid Unique ID for the event.
facility syslog facility, if this is a syslog event.
firstTime UNIX timestamp when event is received.
ipAddress IP Address of the associated device, if applicable.
lastTime Last time this event was seen and its count incremented.
Location Device location from device context.
manager Fully qualified domain name of the collector from which this event came.
message Full message text.
ntevid nt event ID, if this is an nt eventlog event.
priority syslog priority, if this is a syslog event.
prodState prodState of the device context.
severity One of 0 (Clear), 1 (Debug), 2 (Info), 3 (Warning), 4 (Error) or 5 (Critical).
stateChange Time the MySQLrecord for this event was last modified.
summary Text description of the event. Limited to 150 characters.
suppid ID of the event that suppressed this event.
Systems Device systems from device context, separated by |.
179
Glossary
alert Email or page sent as a result of an event.
data point Data returned from a data source. In many cases, there is only one data point
for a data source (such as in SNMP); but there may also be many data points
for a data source (such as when a command results in the output of several
variables).
data source Method used by the system to collect monitoring information. Example data
sources include SNMP OIDs, SSH commands, and perfmon paths.
device class Special type of organizer used to manage how the system models and monitors
devices (through zProperties and monitoring templates).
discovery Process by which the system gathers detailed information about devices in the
infrastructure. Results of discovery are used to populate the model.
event Manifestation of important occurrence within the system. Events are generated
internally (such as when a threshold is exceeded) or externally (such as through
a syslog message or SNMP trap).
event rules Controls how events are manipulated as they enter the system (for example,
changing the severity of an event). zProperties configure event rules.
model Representation of the IT infrastructure. The model tells the system "what is out
there" and how to monitor it.
organizer Hierarchical system used to describe locations and groups. Also includes spe-
cial organizers, which are classes that control system configuration.
resource component Interfaces, services and processes, and installed software in the IT environ-
ment.
threshold Defines a value beyond which a data point should not go. When a threshold is
reached, the system generates an event. Typically, threshold events use the /
Perf event class.
180