O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Zabbix: Enterprise Network Monitoring Made Easy

Book Description

Learn how to gather detailed statistics and data with this one-stop, comprehensive course along with hands-on recipes to get your infrastructure up and running with Zabbix.

About This Book

  • Monitor your network and deploy impressive business solutions with Zabbix
  • Get practical recipes to automate your Zabbix infrastructure and create impressive graphs
  • Integrate, customize, and extend your monitoring solutions with external components and software.

Who This Book Is For

This course is for System Administrators who have been managing and monitoring infrastructure. You do not need any knowledge about Zabbix.

What You Will Learn

  • Efficiently collect data from a large variety of monitoring objects
  • Organize your data in graphs, charts, maps, and slide shows
  • Write your own custom probes and monitoring scripts to extend Zabbix
  • Configure Zabbix and its database to be high available and fault-tolerant
  • Automate repetitive procedures using Zabbix's API
  • FInd out how to monitor SNMP devices
  • Manage hosts, users, and permissions while acting upon monitored conditions
  • Set up your Zabbix infrastructure efficiently
  • Customize the Zabbix interface to suit your system needs
  • Monitor your VMware infrastructure in a quick and easy way with Zabbix

In Detail

Nowadays, monitoring systems play a crucial role in any IT environment. They are extensively used to not only measure your system's performance, but also to forecast capacity issues. This is where Zabbix, one of the most popular monitoring solutions for networks and applications, comes into the picture. With an efficient monitoring system in place, you'll be able to foresee when your infrastructure runs under capacity and react accordingly. Due to the critical role a monitoring system plays, it is fundamental to implement it in the best way from its initial setup. This avoids misleading, confusing, or, even worse, false alarms that can disrupt an efficient and healthy IT department.

This course is for administrators who are looking for an end-to-end monitoring solution. It will get you accustomed with the powerful monitoring solution, starting with installation and explaining the fundamentals of Zabbix. Moving on, we explore the complex functionalities of Zabbix in the form of enticing recipes. These recipes will help you to gain control of your infrastructure.

You will be able to organize your data in the form of graphs and charts along with building intelligent triggers for monitoring your network proactively. Toward the end, you will gain expertise in monitoring your networks and applications using Zabbix.

This Learning Path combines some of the best that Packt has to offer in one complete, curated package. It includes content from the following Packt products:

  • Zabbix Network Monitoring-Second Edition
  • Zabbix Cookbook
  • Mastering Zabbix-Second Edition

Style and approach

This course is a compact practical guide that starts from the fundamentals of Zabbix and takes you all the way to building a monitoring solution that gathers data from a large variety of systems. Along the way, we will discuss the low-level operational details that should benefit you even if you have used Zabbix for a while. It also follows a step-by-step approach that is easy to follow, full of engaging examples, and will help you apply the theory to practice.

Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the code file.

Table of Contents

  1. Zabbix: Enterprise Network Monitoring Made Easy
    1. Table of Contents
    2. Zabbix: Enterprise Network Monitoring Made Easy
    3. Zabbix: Enterprise Network Monitoring Made Easy
    4. Credits
    5. Preface
      1. What this learning path covers
      2. What you need for this learning path
      3. Who this learning path is for
      4. Reader feedback
      5. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    6. I. Module 1
      1. 1. Getting Started with Zabbix
        1. The first steps in monitoring
        2. Zabbix features and architecture
        3. Installation
          1. Choosing the version and repository
          2. Hardware requirements
          3. Installing from the packages
            1. RHEL/CentOS
              1. EPEL
              2. The Zabbix repository
            2. OpenSUSE
          4. Installing from source
            1. The server and agent
              1. Software requirements
            2. Downloading the source
            3. Compilation
          5. Dash or underscore?
          6. Initial configuration
          7. Creating and populating the database
          8. Starting up
            1. Using systemd
            2. Verifying the service's state
          9. The web frontend
            1. Prerequisites and setting up the environment
          10. Using the web frontend configuration wizard
            1. Step 1 – welcome
            2. Step 2 – PHP prerequisites
            3. Step 3 – database access
            4. Step 4 – Zabbix server details
            5. Step 5 – summary
            6. Step 6 – writing the configuration file
            7. Step 7 – finishing the wizard
            8. Step 8 – logging in
        4. Summary
      2. 2. Getting Your First Notification
        1. Exploring the frontend
          1. The user profile
        2. Monitoring quickstart
          1. Creating a host
          2. Creating an item
          3. Introducing simple graphs
          4. Creating triggers
          5. Configuring e-mail parameters
          6. Creating an action
        3. Information flow in Zabbix
        4. Let's create some load
        5. Basic item configuration
          1. Monitoring categories
            1. Availability
            2. Performance
            3. Security
            4. Management
            5. Efficiency
          2. Item types
          3. How items can be monitored
        6. Using global search
        7. Summary
      3. 3. Monitoring with Zabbix Agents and Basic Protocols
        1. Using the Zabbix agent
          1. Passive items
            1. Cloning items
            2. Manually querying items
          2. Active items
          3. An active agent with multiple servers
          4. Supported items
          5. Choosing between active and passive items
            1. Item scheduling
        2. Simple checks
          1. Setting up ICMP checks
        3. Tying it all together
          1. Key parameter quoting
          2. Positional parameters for item names
          3. Using mass update
          4. Value mapping
          5. Units
          6. Custom intervals
            1. Flexible intervals
            2. Custom scheduling
          7. Copying items
        4. Summary
      4. 4. Monitoring SNMP Devices
        1. Using Net-SNMP
          1. Using SNMPv3 with Net-SNMP
            1. The engine ID
              1. Authentication, encryption, and context
        2. Adding new MIBs
        3. Polling SNMP items in Zabbix
          1. Translating SNMP OIDs
          2. Dynamic indexes
          3. SNMP bulk requests
        4. Receiving SNMP traps
          1. Using embedded Perl code
            1. Filtering values by received data
            2. Filtering values by originating host
            3. Debugging
            4. Handling the temporary file
            5. SNMP Trap Translator
          2. Using a custom script
            1. Filtering the traps
            2. Custom mapping
            3. Database lookups
        5. Summary
      5. 5. Managing Hosts, Users, and Permissions
        1. Hosts and host groups
          1. Host inventory
            1. Editing inventory data manually
            2. Populating inventory data automatically
          2. Host maintenance
            1. Creating maintenance periods
              1. Collecting data during maintenance
              2. Not collecting data during maintenance
            2. Maintenance period options
              1. One-time only maintenance
              2. Daily maintenance
              3. Weekly maintenance
              4. Monthly maintenance
            3. Ad-hoc maintenance
        2. Users, user groups, and permissions
          1. Authentication methods
          2. Creating a user
          3. Creating user groups
          4. Permissions and maintenance
        3. Summary
      6. 6. Detecting Problems with Triggers
        1. Triggers
          1. The trigger-and-item relationship
          2. Trigger dependencies
          3. Constructing trigger expressions
            1. Preventing trigger flapping
            2. Checking for missing data
            3. Triggers that time out
            4. Triggers with adaptable thresholds
            5. Triggers with a limited period
            6. Relative thresholds or time shift
            7. Verifying system time
            8. Human-readable constants
            9. Customizing trigger display
              1. Trigger severities
              2. Trigger display options
          4. Event details
          5. Event generation and hysteresis
        2. Summary
      7. 7. Acting upon Monitored Conditions
        1. Actions
          1. Limiting conditions when alerts are sent
            1. Additional action conditions
              1. Complex conditions
            2. Dependencies and actions
            3. Media limits for users
          2. Sending out notifications
            1. Using macros
            2. Sending recovery messages
          3. Escalating things
            1. Runner analogy
          4. Using scripts as media
          5. Integration with issue management systems
            1. Bugzilla
            2. Computer Associates Unicenter Service Desk Manager
            3. Atlassian JIRA
          6. Remote commands
        2. Global scripts
          1. Configuring global scripts
          2. Reusing global scripts in actions
        3. Summary
      8. 8. Simplifying Complex Configurations with Templates
        1. Identifying template candidates
        2. Creating a template
        3. Linking templates to hosts
          1. Handling default templates
          2. Changing the configuration in a template
          3. Macro usage
            1. User macros
        4. Using multiple templates
          1. Unlinking templates from hosts
        5. Using mass update
        6. Nested templates
        7. Summary
      9. 9. Visualizing Data with Graphs and Maps
        1. Visualize what?
        2. Individual elements
          1. Graphs
            1. Simple graphs
            2. Ad hoc graphs
            3. Custom graphs
              1. Working time and trigger line
              2. Graph item function
              3. Two y axes
              4. Item sort order
              5. Gradient line and other draw styles
              6. Custom y axis scale
              7. Percentile line
              8. Stacked graphs
              9. Pie graphs
          2. Maps
            1. Creating a map
            2. Linking map elements
              1. Selecting links
              2. Routed and invisible links
            3. Further map customization
              1. Macros in labels
              2. Link labels
              3. Reflecting problems on map elements
              4. Available map elements
              5. Map filtering
              6. Custom icons and background images
              7. Icon mapping
              8. Other global map options
              9. Displaying host group elements
              10. Numbers as icons
            4. Sharing the maps
        3. Summary
      10. 10. Visualizing Data with Screens and Slideshows
        1. Screens
          1. Dynamic screens
          2. Additional screen elements
          3. Templated screens
        2. Slide shows
        3. Showing data on a big display
          1. Challenges
            1. Non-interactive display
            2. Information overload
            3. Displaying a specific section automatically
        4. Summary
      11. 11. Advanced Item Monitoring
        1. Log file monitoring
          1. Monitoring a single file
          2. Filtering for specific strings
          3. Monitoring rotated files
          4. Alerting on log data
          5. Extracting part of the line
          6. Parsing timestamps
          7. Viewing log data
        2. Reusing data on the server
          1. Calculated items
            1. Quoting in calculated items
            2. Referencing items from multiple hosts
          2. Aggregate items
            1. Aggregating across multiple groups
        3. User parameters
          1. Just getting it to work
          2. Querying data that the Zabbix agent does not support
          3. Flexible user parameters
          4. Level of the details monitored
          5. Environment trap
          6. Things to remember about user parameters
            1. Wrapper scripts
          7. When not to use user parameters
        4. External checks
          1. Finding a certificate expiry time
          2. Determining certificate validity
        5. Sending in the data
          1. Using an agent daemon configuration file
          2. Sending values from a file
          3. Sending timestamped values
        6. SSH and Telnet items
          1. SSH items
          2. Telnet items
        7. Custom modules
        8. Summary
      12. 12. Automating Configuration
        1. Low-level discovery
          1. Network interface discovery
            1. Automatically creating calculated items
            2. Automatically creating triggers
            3. Automatically creating graphs
            4. Filtering discovery results
          2. Filesystem discovery
            1. Introducing the LLD JSON format
            2. Including discovered graphs in screens
            3. Custom thresholds with user macro context
          3. CPU discovery
          4. SNMP discovery
          5. Creating custom LLD rules
            1. Re-implementing CPU discovery
            2. Discovering MySQL databases
        2. Global regular expressions
          1. Testing global regexps
          2. Usage in the default templates
        3. Network discovery
          1. Configuring a discovery rule
          2. Viewing the results
          3. Reacting to the discovery results
          4. Uniqueness criteria
        4. Active agent autoregistration
          1. Auto-registration metadata
        5. Summary
      13. 13. Monitoring Web Pages
        1. Monitoring a simple web page
          1. Creating a web-monitoring scenario
          2. Other scenarios and step properties
          3. Alerting on web scenarios
        2. Logging in to the Zabbix interface
          1. Step 1: check the first page
          2. Step 2: log in
          3. Step 3: check login
          4. Step 4: log out
          5. Step 5: check logout
        3. Authentication options
        4. Using agent items
          1. Getting the page
          2. Checking page performance
          3. Extracting content from web pages
        5. Summary
      14. 14. Monitoring Windows
        1. Installing the Zabbix agent for Windows
        2. Querying performance counters
          1. Using numeric references to performance counters
          2. Using aliases for performance counters
          3. Averaging performance counters over time
        3. Querying WMI
        4. Monitoring Windows services
          1. Checking automatic services
          2. Service discovery
        5. Windows event log monitoring
        6. Summary
      15. 15. High-Level Business Service Monitoring
        1. Deciding on the service tree
        2. Setting up IT services
          1. Creating test items and triggers
          2. Configuring IT services
          3. Sending in the data
        3. Viewing reports
        4. Specifying uptime and downtime
        5. Summary
      16. 16. Monitoring IPMI Devices
        1. Getting an IPMI device
        2. Preparing for IPMI monitoring
        3. Setting up IPMI items
          1. Creating an IPMI item
        4. Monitoring discrete sensors
          1. Using the bitwise trigger function
        5. Summary
      17. 17. Monitoring Java Applications
        1. Setting up the Zabbix Java gateway
        2. Monitoring JMX items
          1. Querying JMX items manually
          2. What to monitor?
        3. Summary
      18. 18. Monitoring VMware
        1. Preparing for VMware monitoring
        2. Automatic discovery
        3. Available metrics
        4. The underlying operation
          1. VMware LLD configuration
            1. Host prototypes
            2. Summarizing default template interaction
            3. Server operation and configuration details
        5. Summary
      19. 19. Using Proxies to Monitor Remote Locations
        1. Active proxy, passive proxy
        2. Setting up an active proxy
          1. Monitoring a host through a proxy
        3. Proxy benefits
        4. Proxy limitations
          1. Proxy operation
        5. Proxies and availability monitoring
          1. Method 1 – Last access item
          2. Method 2 – Internal proxy buffer item
          3. Method 3 – Custom proxy buffer item
        6. Setting up a passive proxy
        7. Tweaking the proxy configuration
        8. Summary
      20. 20. Encrypting Zabbix Traffic
        1. Overview
          1. Backend libraries
        2. Pre-shared key encryption
        3. Certificate-based encryption
          1. Being our own authority
          2. Setting up Zabbix with certificates
        4. Concerns and further reading
        5. Summary
      21. 21. Working Closely with Data
        1. Getting raw data
          1. Extracting from the frontend
          2. Querying the database
            1. Using data in a remote site
        2. Diving further into the database
          1. Managing users
          2. Changing existing data
            1. Finding out when
            2. The when in computer language
            3. Finding out what
            4. Performing the change
        3. Using XML import/export for configuration
          1. Exporting the initial configuration
          2. Modifying the configuration
            1. The XML export format
            2. Scripting around the export
          3. Importing modified configuration
          4. Generating hosts
          5. Importing images
        4. Starting with the Zabbix API
          1. Simple operations
            1. Obtaining the API version
            2. Logging in
            3. Enabling and disabling hosts
            4. Creating a host
            5. Deleting a host
            6. Creating a value map
            7. Obtaining history and trends
          2. Issues with the Zabbix API
          3. Using API libraries
          4. Further reading
        5. Summary
      22. 22. Zabbix Maintenance
        1. Internal monitoring
          1. New values per second
          2. Zabbix server uptime
          3. Cache usage
          4. Internal process busy rate
          5. Unsupported items and more problems
            1. Counting unsupported items
            2. Reviewing unsupported items
            3. Internal events and unknown triggers
        2. Backing things up
          1. Backing up the database
          2. Restoring from a backup
          3. Separating configuration and data backups
        3. Upgrading Zabbix
          1. General version policy
          2. Long-term support and short-term support
          3. The upgrade process
            1. Minor version upgrade
              1. Upgrading binaries
            2. Upgrading the frontend
            3. Major-level upgrades
            4. Database versioning
            5. Gathering data during the upgrade
            6. The frontend configuration file
          4. Compatibility
        4. Performance considerations
        5. Who did that?
        6. Exploring configuration file parameters
          1. Zabbix agent daemon and common parameters
          2. Zabbix server daemon parameters
        7. Summary
      23. A. Troubleshooting
        1. Chapter introduction
        2. Common issues
          1. Installation
            1. Compilation
            2. Frontend
            3. Backend
            4. Locked out of the frontend
          2. Monitoring
            1. General monitoring
            2. Monitoring with the Zabbix agent
              1. User parameters
            3. SNMP devices
            4. IPMI monitoring
            5. ICMP checks
            6. Problems with simple checks
            7. Problems with zabbix_sender and trapper items
            8. General issues
          3. Triggers
          4. Actions
          5. Discoveries and autoregistration
        3. Troubleshooting Zabbix
          1. The Zabbix log file format
          2. Reloading the configuration cache
          3. Controlling running daemons
          4. Runtime process status
          5. Further debugging
      24. B. Being Part of the Community
        1. Community and support
          1. Chatting on IRC
          2. Using the Zabbix wiki
          3. Using the Zabbix forum
          4. Filing issues on the tracker
          5. Meeting in person
            1. The Zabbix conference
            2. Local communities
        2. Following the development
          1. Getting the source
            1. Daily snapshots
            2. Accessing the version control system
              1. Looking at the changesets
        3. Translating Zabbix
        4. Commercial support options
    7. II. Module 2
      1. 1. Zabbix Configuration
        1. Introduction
        2. Server installation and configuration
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        3. Agent installation and configuration
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        4. Frontend installation and configuration
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        5. Installing Zabbix from source
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        6. Installing the server in a distributed setup
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
      2. 2. Getting Around in Zabbix
        1. Introduction
        2. Exploring the frontend
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        3. Zabbix definitions
          1. Getting ready
          2. How to do it...
          3. How it works...
        4. Acknowledging triggers
          1. Getting ready
          2. How to do it...
          3. How it works...
        5. Zabbix architecture
          1. Getting ready
          2. How to do it...
          3. How it works...
        6. Getting an overview of the latest data
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There is more ...
      3. 3. Groups, Users, and Permissions
        1. Introduction
        2. Creating hosts
          1. Getting ready...
          2. How to do it...
          3. How it works...
          4. See also
        3. Creating host groups
          1. Getting ready...
          2. How to do it...
          3. How it works...
          4. See also
        4. Creating users
          1. Getting ready...
          2. How to do it...
          3. How it works...
          4. See also...
        5. Creating user groups
          1. Getting ready...
          2. How to do it...
          3. How it works...
          4. See also
        6. General administration
          1. Getting ready...
          2. How to do it...
          3. GUI
          4. Housekeeping
          5. Images
          6. Icon mapping
          7. Regular expressions
          8. Macros
          9. Value mapping
          10. Working time
          11. Trigger severities
          12. Trigger displaying options
          13. Other parameters
          14. How it works...
          15. See also
        7. Authenticating users
          1. Getting ready...
          2. How to do it...
          3. How it works...
      4. 4. Monitoring with Zabbix
        1. Introduction
        2. Active agents
          1. Getting ready
          2. How to do it ...
          3. How it works
          4. There's more
          5. See also
        3. Passive agents
          1. Getting ready
          2. How to do it …
          3. How it works
          4. There's more...
        4. Extending agents
          1. Getting ready
          2. How to do it …
          3. How it works
          4. There's more...
          5. See also
          6. Simple checks
          7. Getting ready
          8. How to do it …
          9. How it works
          10. There's more...
          11. See also
        5. SNMP checks
          1. Getting ready
          2. How to do it …
          3. How it works
          4. There's more...
          5. See also
        6. Internal checks
          1. Getting ready
          2. How to do it …
          3. How it works
          4. There's more
          5. See also
        7. Zabbix trapper
          1. Getting ready
          2. How to do it…
          3. How it works
          4. There's more...
          5. See also
        8. IPMI checks
          1. Getting ready
          2. How to do it …
          3. How it works
          4. There's more...
          5. See also
        9. JMX checks
          1. Getting ready
          2. How to do it…
          3. There's more...
          4. See also
        10. Aggregate checks
          1. Getting ready
          2. How to do it …
          3. How it works
          4. There's more...
          5. See also
        11. External checks
          1. Getting ready
          2. How to do it …
          3. How it works
          4. There's more...
          5. See also
        12. Database monitoring
          1. Getting ready
          2. How to do it…
          3. How it works
          4. There's more...
          5. See also
        13. Checks with SSH
          1. Getting ready
          2. How to do it…
          3. How it works
          4. There's more
          5. See also
        14. Checks with Telnet
          1. Getting ready
          2. How to do it…
          3. How it works
          4. There's more...
          5. See also
        15. Calculated checks
          1. Getting ready
          2. How to do it…
          3. How it works
          4. There's more...
          5. See also
        16. Building web scenarios
          1. Getting ready
          2. How to do it…
          3. How it works
          4. There's more...
          5. See also
        17. Monitoring web scenarios
          1. Getting ready
          2. How to do it…
          3. How it works...
          4. See also
        18. Some advanced monitoring tricks
          1. Getting ready
          2. How to do it …
          3. How it works...
          4. See also
        19. Autoinventory
          1. Getting ready
          2. How to do it ...
          3. How it works...
          4. There's more...
          5. See also
      5. 5. Testing with Triggers in Zabbix
        1. Introduction
        2. Creating triggers
          1. Getting ready
          2. How to do it...
          3. How it works
          4. There's more...
          5. See also
        3. Testing log files
          1. Getting ready
          2. How to do it ...
          3. There's more...
          4. How it works
          5. See also
        4. Trigger constructor
          1. Getting ready
          2. How to do it...
          3. How it works
          4. There's more
          5. See also
        5. More advanced triggers
          1. Getting ready
          2. How to do it ...
          3. How it works
          4. There's more...
          5. See also
        6. Testing our trigger expressions
          1. Getting ready
          2. How to do it ...
          3. How it works
          4. There's more...
      6. 6. Working with Templates
        1. Introduction
        2. Creating templates
          1. Getting ready
          2. How to do it ...
          3. How it works
          4. There's more...
          5. See also
        3. Importing and exporting templates
          1. Getting ready
          2. How to do it...
          3. How it works
          4. There's more...
          5. See also
        4. Linking templates
          1. Getting ready
          2. How to do it ...
          3. How it works
          4. See also
        5. Nesting templates
          1. Getting ready
          2. How to do it...
          3. How it works
          4. There's more...
          5. See also
        6. Macros in templates
          1. Getting ready
          2. How to do it ...
          3. How it works
          4. See also
      7. 7. Data Visualization and Reporting in Zabbix
        1. Introduction
        2. Creating graphs
          1. Getting ready
          2. How to do it…
          3. How it works
          4. There's more...
          5. See also
        3. Creating screens
          1. Getting ready
          2. How to do it...
          3. How it works
          4. There's more...
          5. See also
        4. Creating slideshows
          1. Getting ready
          2. How to do it...
          3. How it works
          4. There's more...
          5. See also
        5. Building maps in Zabbix
          1. Getting ready
          2. How to do it...
          3. How it works
          4. There's more...
          5. See also
        6. Creating reports
          1. Getting ready
          2. How to do it...
          3. How it works
          4. See also
        7. Generating SLA reports
          1. Getting ready
          2. How to do it...
          3. How it works
          4. There's more...
          5. See also
      8. 8. Monitoring VMware and Proxies
        1. Introduction
        2. Configuring Zabbix for VMware
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        3. Monitoring VMware
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        4. Installing a proxy
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        5. Setting up an active proxy
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        6. Setting up a passive proxy
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        7. Monitoring hosts through a proxy
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        8. Monitoring the proxy
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
      9. 9. Autodiscovery
        1. Introduction
        2. Configuring network discovery
          1. Getting ready
          2. How to do it...
          3. How it works
          4. There is more…
          5. See also
        3. Automation after discovery
          1. Getting ready
          2. How to do it...
          3. How it works
          4. There is more…
          5. See also
        4. Active agent autoregistration
          1. Getting ready
          2. How to do it ...
          3. How it works
          4. There is more…
          5. See also
        5. Low-level discovery
          1. Getting ready
          2. How to do it ...
          3. How it works
          4. There's more…
          5. See also
      10. 10. Zabbix Maintenance and API
        1. Introduction
        2. Maintenance periods
          1. Getting ready
          2. How to do it...
          3. How it works…
          4. There's more…
          5. See also
        3. Monitoring Zabbix
          1. Getting ready
          2. How to do it
          3. See also
        4. Backups
          1. Getting ready
          2. How to do it...
          3. How it works…
          4. There's more…
          5. See also
        5. Avoiding performance issues
          1. Getting ready
          2. How to do it...
          3. See also
        6. Zabbix API
          1. Getting ready
          2. How to do it...
          3. How it works…
          4. There's more…
          5. See also
        7. API by example
          1. Getting ready
          2. How to do it...
          3. How it works…
          4. See also
      11. C. Upgrading and Troubleshooting Zabbix
        1. Introduction
        2. Some guidelines to upgrade Zabbix
        3. Upgrading your Zabbix installation
        4. Troubleshooting in Zabbix
        5. Zabbix best practices
        6. What to expect in Zabbix 3.0
        7. Zabbix community
    8. III. Module 3
      1. 1. Deploying Zabbix
        1. Defining the environment size
        2. Zabbix architectures
          1. Installing Zabbix
            1. Prerequisites
          2. Setting up the server
            1. Setting up the agent
            2. Installing and creating the package
            3. Installing from packages
            4. Configuring the server
          3. Installing the database
          4. Some considerations about the database
          5. Sizing the database
          6. Some considerations about housekeeping
          7. The web interface
            1. The web wizard – frontend configuration
          8. Capacity planning with Zabbix
            1. The observer effect
            2. Deciding what to monitor
            3. Defining a baseline
            4. Load testing
            5. Forecasting the trends
        3. Summary
      2. 2. Distributed Monitoring
        1. Zabbix proxies
          1. Deploying a Zabbix proxy
            1. Zabbix's runtime proxy commands
            2. Deploying a Zabbix proxy using RPMs
            3. Considering a different Zabbix proxy database
          2. Understanding the Zabbix monitoring data flow
          3. Understanding the monitoring data flow with proxies
          4. Monitoring Zabbix proxies
        2. Security considerations
          1. No network configuration
          2. Network isolation
          3. Simple tunnels
            1. Secure Shell
            2. Stunnel
          4. A full-blown VPN
        3. Summary
      3. 3. High Availability and Failover
        1. Understanding high availability
        2. Understanding the levels of IT service
        3. Some considerations about high availability
          1. Automating switchover/failover with a resource manager
          2. Replicating the filesystem with DRBD
        4. Implementing high availability on a web server
          1. Configuring HTTPD HA
            1. Understanding Pacemaker and STONITH
            2. Pacemaker – is Quorum really needed?
            3. Pacemaker – the stickiness concept
            4. Pacemaker – configuring Apache/HTTPD
        5. Configuring the Zabbix server for high availability
        6. Implementing high availability for a database
          1. Clustering of PostgreSQL
          2. Mirrored logical volume with LVM and DRDB
            1. Prerequisite tasks to start with DRBD on LVM
            2. Creating a DRBD device on top of the LVM partition
            3. Enabling resources in DRBD
            4. Defining a primary device in DRDB
            5. Creating a filesystem on a DRBD device
          3. Pacemaker clusters – integrating DRBD
            1. Enabling the DRBD configuration
            2. Pacemaker – the LVM configuration
            3. Pacemaker – configuring PostgreSQL
            4. Pacemaker – the network configuration
            5. Pacemaker – the final configuration
            6. Cluster configuration – the final test
          4. DRBD performance and optimization
            1. DRBD efficient synchronization
            2. Enabling DRBD online verification
            3. DRBD – some networking considerations
        7. Summary
      4. 4. Collecting Data
        1. Gathering items as raw data
        2. Understanding the data flow for Zabbix items
          1. Understanding Zabbix trapper items
          2. The data flow overview
        3. Database monitoring with Zabbix
          1. Delving into ODBC
            1. Installing database drivers
            2. MySQL ODBC drivers
            3. PostgreSQL ODBC drivers
            4. Oracle ODBC drivers
            5. unixODBC configuration files
            6. Compiling Zabbix with ODBC
            7. Database monitor items
            8. Some considerations about the ODBC SQL query
        4. Zabbix JMX monitoring
          1. Considering JMX security aspects
          2. Installing a Zabbix Java gateway
          3. Configuring Zabbix JMX
            1. JMX keys in detail
            2. Issues and considerations about JMX
        5. Zabbix SNMP monitoring
          1. SNMP queries
          2. SNMP traps
            1. The snmptrapd process
            2. The perl trap handler
        6. Monitoring Zabbix SSH
          1. Configuring the SSH key authentication
        7. Monitoring Zabbix IPMI
          1. The first steps with IPMI
          2. Configuring IPMI accounts
          3. Configuring Zabbix IPMI items
        8. Monitoring the web page
          1. Authenticating web pages
          2. Logging out
        9. Aggregated and calculated items
          1. Aggregated items
          2. Calculated items
        10. Summary
      5. 5. Visualizing Data
        1. Graphs
          1. Analyzing simple graphs
          2. Analyzing ad hoc graphs
            1. Hacking ad hoc graphs
          3. Analyzing custom graphs
            1. Reviewing all the combinations of graph properties
        2. Visualizing the data through maps
          1. Creating your first Zabbix map
          2. Important considerations about macros and URLs
          3. Finally, inside the map
          4. Selecting elements
          5. Playing with macros inside maps
        3. Visualizing through screens
          1. Creating a screen
          2. Dynamic elements
        4. Visualizing the date through a slide show
        5. Controlling center slides and the big display challenge
          1. Considerations about slides on a big display
          2. Automated slide show
        6. IT services
          1. Configuring an IT service
        7. Summary
      6. 6. Managing Alerts
        1. Understanding trigger expressions
          1. Selecting items and functions
            1. Choosing between seconds and a number of measurements
            2. The date and time functions
            3. Trigger severity
            4. Choosing between absolute values and percentages
          2. Understanding operations as correlations
        2. Managing trigger dependencies
        3. Taking an action
          1. Defining an action
            1. The {EVENT.DATE} and {EVENT.TIME} macros
            2. The {INVENTORY.SERIALNO.A} and friends macros
          2. Defining the action conditions
          3. Choosing the action operations
            1. Steps and escalations
            2. Messages and media
            3. Remote commands
        4. Summary
      7. 7. Managing Templates
        1. Creating templates
        2. Adding entities to a template
          1. Using macros
            1. User-defined macros
        3. Importing and exporting templates
        4. Linking templates to hosts
          1. Nesting templates

          2. Combining templates
        5. Discovering hosts
        6. The active agent auto-registration
          1. Configuring the auto-registration
          2. The real-case scenario
        7. Low-level discovery
        8. Summary
      8. 8. Handling External Scripts
        1. External checks
          1. The script's placement
          2. Going deep into external checks
          3. Going inside the script
          4. General rules for writing scripts
            1. Considerations about external checks
        2. The user parameter
          1. The flexible user parameter
          2. Considerations about user parameters
        3. Sending data using zabbix_sender
          1. The new script
          2. Writing a wrapper script for check_ora_sendtrap
          3. The pros and cons of the dedicated script server
        4. Working with Zabbix protocols
          1. The Zabbix get protocol
          2. The Zabbix sender protocol
            1. An interesting undocumented feature
            2. Using the clock properties in JSON items
          3. The Zabbix agent protocol
            1. Some more possible responses
        5. The low-level discovery protocol
        6. Communicating with Zabbix
          1. Implementing the Zabbix_sender protocol in Java
          2. Implementing the Zabbix sender protocol in Python
          3. Some considerations about agent development
        7. Summary
      9. 9. Extending Zabbix
        1. Exploring the Zabbix API
          1. First steps through the API
          2. Authenticating through the API
          3. Using the PyZabbix library
        2. Exploring the Zabbix API with JQuery
        3. Mass operations
          1. Redistributing hosts to proxies
          2. Adding or updating users
        4. Exporting data
          1. Extracting tabular data
          2. Creating graphs from data
            1. The Graphviz suite of programs
            2. Creating a trigger dependency graph
          3. Generating Zabbix maps from dot files
        5. Summary
      10. 10. Integrating Zabbix
        1. Stepping into WhatsApp
          1. Getting ready to send messages
          2. Registering the yowsup client
          3. Sending the first WhatsApp message
          4. Securing the yowsup setup
          5. Creating our first Zabbix alert group
          6. Integrating yowsup with Zabbix
        2. An overview of Request Tracker
        3. Setting up RT to better integrate with Zabbix
          1. Creating a custom queue for Zabbix
          2. Customizing tickets – the links section
          3. Customizing tickets – ticket priority
          4. Customizing tickets – the custom fields
          5. Connecting to the Request Tracker API
        4. Setting up Zabbix to integrate with Request Tracker
        5. Creating RT tickets from the Zabbix events
        6. Summary
      11. D. Bibliography
    9. Index