Book Image

Zenoss Core 3.x Network and System Monitoring

By : Michael Badger
Book Image

Zenoss Core 3.x Network and System Monitoring

By: Michael Badger

Overview of this book

For system administrators, network engineers, and security analysts, it is essential to keep a track of network traffic. Zenoss Core is an enterprise-level systems and network monitoring solution that can be as complex as you need it to be. And while just about anyone can install it, turn it on, and monitor "something", Zenoss Core has a complicated interface packed with features. The interface has been drastically improved over version 2, but it's still not the type of software you can use intuitively – in other words, a bit of guidance is in order. The role of this book is to serve as your Zenoss Core tour guide and save you hours, days, maybe weeks of time. This book will show you how to work with Zenoss and effectively adapt Zenoss for System and Network monitoring. Starting with the Zenoss basics, it requires no existing knowledge of systems management, 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. 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. The book covers the monitoring basics: adding devices, monitoring for availability and performance, processing events, and reviewing reports. It also dives into more advanced customizations, such as custom device reports, external event handling (for example, syslog server, zensendevent, and Windows Event Logs), custom monitoring templates using SNMP data sources, along with Nagios, and Cacti plugins. An example of a Nagios-style plugin is included and the book shows you where to get an example of a Cacti-compatible plugin for use as a command data source in monitoring templates. In Zenoss Core, ZenPacks are modules that add monitoring functionality. Using the Nagios plugin example, you will learn how to create, package, and distribute a ZenPack. You also learn how to explore Zenoss Core's data model using zendmd so that you can more effectively write event transformations and custom device reports.
Table of Contents (21 chapters)
Zenoss Core 3.x Network and System Monitoring
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Event Attributes
Device Attributes
Example snmpd.conf
Index

Appendix B. Device Attributes

Device attributes describe each device, and like the event attributes in Appendix A, Event Attributes not all attributes will apply to every device. We use device attributes to extract bits of information in the following places:

  • User commands

  • Event commands

  • Monitoring template commands

  • Event transformations

  • ZenPack programming

  • Custom device reports

Your programming context determines how you access the device attributes. For example, we can substitute the device attributes in our Python statements via TALES expressions.

An example of a TALES expression to access a device attribute looks like this:

${dev/attribute}

So if we wanted to write a TALES expression to access the name of the device, the expression would look like this: ${dev/getId}. Python evaluates the expression and substitutes the value into the current Python statement.

In other programming contexts where you might not use TALES, you would use the following syntax to access the event attribute:

device.attribute

The following table includes a list of the attributes that we may use when working with our devices. If you recall our work with custom device reports in Chapter 11, Writing Custom Device Reports, you know this is not an exhaustive list of device attributes that we access. In Chapter 11, Writing Custom Device Reports, we used zendmd to explore and find device attributes. However, the attributes listed correspond closely to the fields found on the device's Configuration Properties:

Device Attribute

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.