0%

Book Description

Gather detailed statistics and deploy impressive business solutions with Zabbix 4.0

Key Features

  • Experience the full impact of Zabbix 4.0, a useful and increasingly popular tool
  • Enhance your network's performance and manage hosts and systems
  • A step-by-step guide to smarter network monitoring

Book Description

Zabbix 4 Network Monitoring is the perfect starting point for monitoring the performance of your network devices and applications with Zabbix. Even if you've never used a monitoring solution before, this book will get you up and running quickly. You'll learn to monitor more sophisticated operations with ease and soon feel in complete control of your network, ready to meet any challenges you might face.

Starting with the installation, you will discover the new features in Zabbix 4.0. You will then get to grips with native Zabbix agents and Simple Network Management Protocol (SNMP) devices. You will also explore Zabbix's integrated functionality for monitoring Java application servers and VMware. This book also covers notifications, permission management, system maintenance, and troubleshooting, so you can be confident that every potential challenge and task is under your control. If you're working with larger environments, you'll also be able to find out more about distributed data collection using Zabbix proxies. Once you're confident and ready to put these concepts into practice, you will understand how to optimize and improve performance. Troubleshooting network issues is vital for anyone working with Zabbix, so the book also helps you work through any technical snags and glitches you might face.

By the end of this book, you will have learned more advanced techniques to fine-tune your system and make sure it is in a healthy state.

What you will learn

  • Install Zabbix server and an agent from source
  • Manage hosts, users, and permissions while acting upon monitored conditions
  • Visualize data with the help of ad hoc graphs, custom graphs, and maps
  • Simplify complex configurations and learn to automate them
  • Monitor everything from web pages to IPMI devices and Java applications to VMware stats
  • Configure Zabbix to send alerts including problem severity and time periods
  • Troubleshoot any network issue

Who this book is for

If you're new to Zabbix look no further than this book. Zabbix 4 Network Monitoring is for system and network administrators who are looking to put their knowledge to work with Zabbix 4.0.

Table of Contents

  1. Title Page
  2. Copyright and Credits
    1. Zabbix 4 Network Monitoring Third Edition
  3. About Packt
    1. Why subscribe?
    2. Packt.com
  4. Contributors
    1. About the authors
    2. About the reviewers
    3. Packt is searching for authors like you
  5. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
      1. Download the example code files
      2. Download the color images
      3. Conventions used
    4. Get in touch
      1. Reviews
  6. Getting Started with Zabbix
    1. Technical requirements
    2. The first steps in monitoring
    3. Zabbix features and architecture
      1. Installation
      2. Choosing the version and repository
      3. Hardware requirements
    4. Installing from the packages
      1. Red Hat Enterprise Linux (RHEL)/CentOS
        1. EPEL
        2. The Zabbix repository
      2. Ubuntu/Debian
    5. Installing from source
      1. The server and agent
      2. Software requirements
      3. Downloading the source
        1. Compilation
      4. Dash or underscore
      5. Initial configuration
      6. Creating and populating the database
      7. Starting up
        1. Verifying the service's state
        2. The web frontend
        3. Prerequisites and setting up the environment
    6. 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
    7. Summary
    8. Questions
    9. Further reading
  7. 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 email 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
    8. Questions
    9. Further reading
  8. 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
    2. Item scheduling
    3. Simple checks
      1. Setting up ICMP checks
    4. Connecting all of the pieces
      1. Key parameter quoting
      2. Positional parameters for item names
      3. Using mass update
    5. Value mapping
    6. Units
      1. Custom intervals
        1. Flexible intervals
        2. Custom scheduling
      2. Copying items
    7. Summary
    8. Questions
    9. Further reading
  9. 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 (SNMPTT)
      2. Using a custom script
        1. Filtering the traps
        2. Custom mapping
        3. Database lookups
    5. Summary
    6. Questions
    7. Further reading
  10. 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
        3. Maintenance period options
          1. One-time only maintenance
          2. Daily maintenance
          3. Weekly maintenance
          4. Monthly maintenance
        4. Ad hoc maintenance
    3. Users, user groups, and permissions
      1. Authentication methods
      2. Creating a user
      3. Creating user groups
      4. Permissions and maintenance
    4. Summary
    5. Questions
    6. Further reading
  11. Detecting Problems with Triggers
    1. Triggers
      1. The trigger-and-item relationship
    2. Trigger dependencies
      1. Constructing trigger expressions
    3. Preventing trigger flapping
    4. Checking for missing data
      1. Triggers that time out
        1. Triggers with adaptable thresholds
        2. Triggers with a limited period
        3. Relative thresholds or time shift
        4. Verifying system time
        5. Human-readable constants
        6. Customizing how triggers are displayed
          1. Triggering severities
          2. Triggering display options
      2. Event details
      3. Event generation and recovery expression
    5. Using event tags for correlation
    6. Summary
    7. Questions
    8. Further reading
  12. 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 once a threshold is reached
        1. Runner analogy
      4. Using scripts as media
      5. Integrating 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
    4. Questions
    5. Further reading
  13. Simplifying Complex Configurations with Templates
    1. Creating a template
    2. Linking templates to hosts
      1. Handling default templates
      2. Changing the configuration in a template
      3. Macro usage
        1. User macros
    3. Using multiple templates
      1. Unlinking templates from hosts
    4. Using mass update
    5. Nested templates
    6. Summary
    7. Questions
    8. Further reading
  14. Visualizing Data with Screens and Slideshows
    1. Configuring and sharing dashboards
      1. Configuring the dashboard
      2. Sharing our dashboard
    2. Screens
      1. Dynamic screens
      2. Additional screen elements
      3. Templated screens
    3. Slide shows
    4. Showing data on a big display
      1. Challenges
        1. Non-interactive display
        2. Information overload
        3. Displaying a specific section automatically
    5. Summary
    6. Questions
    7. Further reading
  15. 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
    2. Event tags
      1. Extracting part of the line
      2. Parsing timestamps
      3. Viewing log data
    3. 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
    4. User parameters
      1. Just getting it to work
      2. Querying data that the Zabbix agent doesn't 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
    5. External checks
      1. Finding a certificate expiry time
      2. Determining certificate validity
    6. Sending in the data
      1. Using an agent daemon configuration file
      2. Sending values from a file
      3. Sending timestamped values
    7. SSH and Telnet items
      1. SSH items
      2. Telnet items
    8. Custom modules
    9. Value preprocessing and dependent items
    10. Summary
    11. Questions
    12. Further reading
  16. Automating Configuration
    1. LLD
      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. Reimplementing 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 auto-registration
      1. Auto-registration metadata
    5. Summary
    6. Further reading
  17. 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 into the Zabbix interface
      1. Step 1 – checking the first page
      2. Step 2 – logging in
      3. Step 3 – checking login
      4. Step 4 – logging out
      5. Step 5 – checking logout
    3. Authentication options
    4. Using agent items
      1. Getting the page
      2. Checking page performance
      3. Extracting content from web pages
        1. Extracting content using the HTTP agent
    5. Summary
    6. Questions
    7. Further reading
  18. 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
    6. Questions
    7. Further reading
  19. 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
    6. Questions
    7. Further reading
  20. Monitoring Java Applications
    1. Setting up the Zabbix Java gateway
    2. Monitoring JMX items
      1. Querying JMX items manually
      2. What to monitor?
      3. JMX discovery
    3. Summary
    4. Questions
    5. Further reading
  21. Monitoring VMware
    1. Technical requirements
    2. Preparing for VMware monitoring
    3. Automatic discovery
    4. Available metrics
    5. The underlying operation
      1. VMware LLD configuration
        1. Host prototypes
        2. Summarizing default template interaction
        3. Server operation and configuration details
    6. Summary
    7. Questions
    8. Further reading
  22. Using Proxies to Monitor Remote Locations
    1. Active proxies and passive proxies
    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
    9. Questions
    10. Further reading
  23. Encrypting Zabbix Traffic
    1. Overview
    2. Backend libraries
    3. PSK encryption
    4. Certificate-based encryption
      1. Being our own authority
      2. Setting up Zabbix with certificates
    5. Concerns and further reading
    6. Summary
    7. Questions
    8. Further reading
  24. 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
    5. Summary
    6. Questions
    7. Further reading
  25. 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
    8. Questions
    9. Further reading
  26. Troubleshooting
    1. 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
        1. 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
    4. Further debugging
  27. 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 summit
        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
  28. Assessment
    1. Chapter 1: Getting Started with Zabbix
    2. Chapter 2: Getting Your First Notification
    3. Chapter 3: Monitoring with Zabbix Agents and Basic Protocols
    4. Chapter 4: Monitoring SNMP Devices
    5. Chapter 5: Managing Hosts, Users, and Permissions
    6. Chapter 6: Detecting Problems with Triggers
    7. Chapter 7: Acting upon Monitored Conditions
    8. Chapter 8: Simplifying Complex Configurations with Templates
    9. Chapter 9: Visualizing Data with Screens and Slideshows
    10. Chapter 10: Advanced Item Monitoring
    11. Chapter 12: Monitoring Web Pages
    12. Chapter 13: High-Level Business Service Monitoring
    13. Chapter 14: Monitoring IPMI Devices
    14. Chapter 15: Monitoring Java Applications
    15. Chapter 16: Monitoring VMware
    16. Chapter 17: Using Proxies to Monitor Remote Locations
    17. Chapter 18: Encrypting Zabbix Traffic
    18. Chapter 19: Working Closely with Data
    19. Chapter 20: Zabbix Maintenance
  29. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think
3.135.190.232