Zenoss Core 3.x Network and System Monitoring A step-by-step guide to configuring, using, and adapting this free Open Source network monitoring system Michael Badger TPAf KTl Pen source I I flli\ I I community experience distilled PUBLISHING BIRMINGHAM - MUMBAI
Preface 1 Chapter 1: Network and System Monitoring with Zenoss Core 7 Device management 9 Availability and performance monitors 10 Event management 11 Plugin architecture 12 System reports 13 Custom device reports 14 System architecture 14 User layer 15 Data layer 16 Collection layer 17 Device management daemons 18 Performance and availability daemons 18 Event daemons 19 Summary 20 Chapter 2: Discovering Devices 21 Zenoss Core installation 22 Preparing devices for monitoring 22 SNMP 23 SNMP versions 24 Configuring SNMP on Linux 25 Configuring SNMP and WMI on Windows 26 Zenoss Plugins 28 Installing Zenoss Plugins 29 Port scan 30 Opening monitoring-specific ports 30 Configuring Linux firewalls 31 Configuring Windows firewall 32
Zenoss Core setup wizard Step 1: Setting up users 34 Step 2: Specify or discover devices to monitor ^ Adding devices 35 Manually find devices 3-7 Autodiscover devices 38 Our device inventory: A job well done 40 Reviewing device creation job log 42 Adding a single device 43 Entering device attributes Importing a list of devices 46 with zenbatchload 48 Command line discovery with zendisc 40 H3 Summary 51 Chapter 3: Device Setup and Administration Organizing devices in Zenoss Core Locations Systems and Groups Organizer details Editing organizers Moving organizers Classes Viewing a list of device classes 57 Assigning devices to a class 58 Modeling devices 59 Modeler plugins gather device information 60 Assigning modeler plugins 62 Troubleshooting data collection 62 Troubleshooting SNMP problems 62 Running snmpwalk 63 Is the SNMP daemon running on Linux servers? 64 SNMP problems on Windows 64 Troubleshooting WMI problems 64 Zeneventlog unable to connect to Windows 65 Zenoss Core does not collect WMI data 65 Troubleshooting Zenoss Plugins 66 A class of its own g@ Device administration 67 Locking or unlocking a device 67 Renaming a device g3 Resetting the IP address 59 Push changes jq Deleting devices jq 33 23 52 52 54 54 56 56 56 ["]
zproperties defined Summary Table of Contents Chapter 4: Monitor Status and Performance^^ 75 Collectors collect Configuring the performance collector Monitoring components Interfaces OS Processes Add Process Viewing or editing the process details 32 Configuration properties 32 Monitoring OS Processes 83 Services 85 Enable monitoring for a service 35 Configuration properties 37 Monitoring exceptions for services 37 Interactively monitor IP services 88 File Systems 89 Ignoring File Systems with zproperties 89 Network Routes 90 Networks Add Components 92 Viewing and editing component details for a device 93 Performance Graphs 94 Interface template 95 Performance Graphs 96 Working with graphs 97 Monitoring performance thresholds 98 Summary 98 Chapter 5: Custom Monitoring Templates 99 Monitoring Templates 99 Monitoring SNMP data sources 101 Overriding templates 101 Editing the /Server/Linux template 103 Find OlDs for SNMP monitoring 105 Monitoring with Nagios plugins 108 Working with Nagios plugins 111 Nagios return codes 111 Nagios performance data 111 Adding the Nagios plugin to Monitoring Templates 112 Adding a Data Source Adding a Data Point 116 RRDtool Data Point configurations 117 71 74 76 77 79 qq 3^ 81 91
Defining monitoring thresholds Graph definitions 1 ^8 12^ RRDtool Graph Point configurations 123 Binding templates to the device class 125 Adding a device to monitor using the Bogo template 126 Monitoring with Cacti plugins Data Source parser 128 1 ^ Summary 129 Chapter 6: Core Event Management I3-! Event Console 132 Event severities defined 133 Event statuses defined 134 Acknowledging an event 134 Viewing an event log 135 Events consoles are everywhere 137 Closing events 137 Displaying historical events 138 Event Manager 138 Event Fields 141 Event commands 143 Creating a command 143 Working with events 145 Simulating an event 145 Clearing the event 147 Event mapping 148 Event Classes 148 Event class zproperties 149 Mapping an event 150 Event mapping sequence 154 Event de-duplication 154 Turning off event de-duplication 155 Summary 156 Chapter 7: Collecting Events 157 Routing syslog messages to Zenoss Core 157 Collecting Cisco router syslogs 159 Testing syslog configuration with Logger 160 Monitoring Windows event logs 161 Windows event log severities 162 Testing the event log configuration with Eventcreate 163
Incorporating event reporting into third-party scripts via zensendevent 163 Simple backup script with zensendevent 165 Creating events by e-mail 166 Zenmail 167 Zenpop3 169 Configuring alerting rules 170 Alert filters 172 Alert escalations 173 Schedule 174 Alert messages 176 Event transformations 177 Some event transformation examples 178 Programming in zendmd, an interactive shell 180 Summary 182 Chapter 8: Settings and Administration 183 Managing Zenoss Core users 183 Administered Objects 185 Event Views 187 Groups 189 Creating custom User Commands 189 Adding a User Command 192 System settings 193 Configuring Zenoss Core's Monitoring Dashboard 194 Locations portlet with Google Maps 196 Device Issues portlet 197 Zenoss Issues portlet 198 Watch List portlet 198 Root Organizers portlet 199 Production States portlet 199 Portlet permissions 200 Meet the Zenoss Daemons 200 Maintenance Windows 202 Adding MIBs 204 Backing up and restoring monitoring data 205 Automating backups with zenbackup 206 Restoring backups with zenrestore 207 Updating Zenoss Core 208 Summary 209
Chapter 9: Extending Zenoss Core with ZenPacks 211 Installing community ZenPacks 211 Monitoring websites with HttpMonitor 212 Viewing a list of installed ZenPack objects 215 Configuring HttpMonitor 216 Configuring HttpMonitor settings 217 Creating a ZenPack 218 Adding files and objects to the ZenPack 221 Adding a new data source to the monitoring template 222 Adding objects to a ZenPack 223 Packaging the ZenPack 224 ZenPack development mode 225 Developer resources 226 Summary 226 Chapter 10: Reviewing Built-in Reports 227 Report overview 227 Device Reports 228 New Devices 229 Device Changes 229 Model Collection Age 229 Software Inventory 230 Manufacturers and Products 230 SNMP Status Issues 231 Ping Status Issues 232 All Devices 232 All Monitored Components 232 Event Reports 233 All Event Classes 233 All Event Mappings 234 All Heartbeats 234 Graph Reports 234 Multi-Graph Reports 237 Adding Collections 238 Adding Graph Definitions 240 Adding Graph Groups 241 Performance Reports 243 Aggregate Report 244 Availability 245 CPU Utilization 246 Filesystem Utilization 246 Interface Utilization 247
Memory Utilization 248 Threshold Summary 248 User Reports 249 Notification Schedules 249 Summary 249 Chapter 11: Writing Custom Device Reports 251 Creating Custom Device Reports 251 Custom Device Report fields 253 Building Custom Device Report queries 254 Using zendmd to test report queries 255 Exploring data in Zope 258 Using Python expressions in the columns 260 Convenience functions 261 convtounits 261 Scheduling reports for e-mail delivery 262 Sending a CSV report 263 Scheduling a cron job 263 Summary 263 Appendix A: Event Attributes 265 Appendix B: Device Attributes 269 Appendix C: Example snmpd.conf 273 Index 277