Book Image

Zenoss Core Network and System Monitoring

By : Michael Badger
Book Image

Zenoss Core Network and System Monitoring

By: Michael Badger

Overview of this book

<p>For system administrators, network engineers, and security analysts, it is essential to keep a track of network traffic. At some point it will be necessary to read the network traffic directly instead of monitoring application level details. Network security audits, debug network configurations, and usage patterns analyzing can all require network traffic monitoring. This task can be achieved by using network monitoring software, or network sniffers, that sniff the traffic and display it on your computer on the network. <br /><br />Zenoss is an enterprise network and systems management application written in Python/Zope that provides an integrated product for monitoring availability, performance, events and configuration across layers and across platforms. Zenoss provides an AJAX-enabled web interface that allows system administrators to monitor availability, inventory/configuration, performance, and events. Whether you monitor five devices or a thousand devices, Zenoss provides a scalable solution for you.<br /><br />This book will show you how to work with Zenoss and effectively adapt Zenoss for a System and Network monitoring.&nbsp; Starting with the Zenoss basics, it requires no existing systems management knowledge, and whether or not you can recite MIB trees and OIDs from memory is irrelevant. Advanced users will be able to identify ways in which they can customize the system to do more, while less advanced users will appreciate the ease of use Zenoss provides.<br /><br />The book contains step-by-step examples to demonstrate Zenoss Core’s capabilities. The best approach to using this book is to sit down with Zenoss and apply the examples found in these pages to your system.</p>
Table of Contents (20 chapters)
Zenoss Core Network and System Monitoring
Credits
Foreword
About the Author
Acknowledgement
About the Reviewers
Preface
Free Chapter
1
Introduction
Event Attributes
TALES and Device Attributes

Appendix B. TALES and Device Attributes

Throughout the book, we encounter many fields that accept TALES expressions including user commands, event commands, performance templates, zProperties, event mappings, and event transformations. Zenoss uses the Template Attribute Language Expression Syntax (TALES) to retrieve device and event attributes for Zenoss objects within any valid Python statement.

If we want to access device attributes, we use the syntax:

${device/attribute}

For example, Zenoss includes the following user command:

traceroute -q 1 -w 2 ${device/manageIp}

The TALES expression substitutes the device IP address that we normally expect to enter when we run the traceroute command manually. This makes sure that the same command can be run for any device and that the correct device IP will be substituted into the command.

If we want to access event attributes, we use the following syntax:

${evt/attribute}

For example, we create a custom event command in Chapter 7 to write some event information to a file:

echo "The Event with ID ${evt/evit} is on fire!" >> /tmp/SampleEventCommand

In this command, we use TALES to substitute the event ID. When the event runs, we get the following line in our file:

The Event with ID 7f000001365df722fffe960 is on fire!

The following table includes a list of the attributes that we may use when working with our devices. We can find many of these attributes on display on an individual device's Status page.

For a list of event specific attributes, see the list of event fields in Appendix A.

Device Attributes

Description

id

The device name, which is not necessarily the fully qualified domain name..

manageIp

The IP address of the device.

productionState

The numeric value of the device's production state:

1000 = Production

500 = Pre-Production

400 = Test

300 = Maintenance

-1 = Decommissioned

productionStateString

The device's production state as a human-readable string.

priority

The numeric priority value:

5 = Highest

4 = High

3 = Normal

2 = Low

1 = Lowest

0 = Trivial

priorityString

The device's priority as a human-readable string.

locationName

The location organizer assigned to the device.

systemNames

The list of system organizers assigned to the device.

groupNames

The list of group organizers assigned to the device.

snmpDescr

The SNMP Description.

snmpOID

The OID from SNMP.

snmpContact

The SNMP contact value.

snmpSysName

The system name from SNMP.

snmpLastCollection

The last time Zenoss collected SNMP data for the device.

comments

User-entered comments on the device.

uptimeStr

The uptime values for the device.

pingStatusString

The device's ping status:

0 = Up

1 = Down

2 = None

snmpStatusString

The device's SNMP status:

0 = Up

1 = Down

2 = None.

osVersion

The operating system version .

osProductName

The software product name defined on the device's edit page.

osManufactureName

The operating system manufacturer name defined on the device's edit page.

hwProductName

The hardware product name defined on the device's edit page.

hwManufacturerName

The hardware manufacturer name defined on the device's edit page.