Book Image

Zabbix 1.8 Network Monitoring

By : Rihards Olups
Book Image

Zabbix 1.8 Network Monitoring

By: Rihards Olups

Overview of this book

Imagine you're celebrating the start of the weekend with Friday-night drinks with a few friends. And then suddenly your phone rings -- one of the servers you administer has gone down, and it needs to be back up before tomorrow morning. So you drag yourself back to the office, only to discover that some log files have been growing more than usual over the past few weeks and have filled up the hard drive. While the scenario above is very simplistic, something similar has happened to most IT workers at one or another point in their careers. To avoid such situations this book will teach you to monitor your network hardware, servers, and web performance using Zabbix- an open source system monitoring and reporting solution.The versatility of Zabbix allows monitoring virtually anything, but getting started with the new concepts can take some time. This book will take you through the most common tasks in a hands-on, step by step manner.Zabbix is a very flexible IT monitoring suite, but not every part of it is immediately clear to new users. Following the instructions in this book should allow you to set up monitoring of various metrics on various devices, including Linux and Windows machines, SNMP devices, IPMI enabled server,s and other network attached equipment. You will learn to define conditions – such a temperature being too high or service being down – and act upon them by notifying user by email, SMS, or even restarting service. You will learn to visualize the gathered data with graphs and the various tips and tricks that are provided will help to use Zabbix more efficiently and avoid common pitfalls.This book covers setting up Zabbix from the scratch and gradually introduces basic components of Zabbix, moving to more advanced topics later. Book's scope is based on the author's experience of working with Zabbix for many years, as well as on the questions users have asked on the Zabbix IRC channel and forums.
Table of Contents (22 chapters)
Zabbix 1.8 Network Monitoring
Credits
About the Author
About the Reviewers
Preface
6
Acting Upon Monitored Conditions

Installation


Alright, enough with the dry-talk, what will we get? Let's look at dashboard screen of Zabbix web frontend, showing only a very basic configuration.

As we can see, Zabbix dashboard shows a high level overview of overall monitored system status, status of Zabbix, some of the most recent problems, and a few more things. This particular dashboard shows a very tiny Zabbix setup. Eventually your Zabbix installation will grow and provide monitoring of different devices, including servers of various operating systems, different services and hardware state on those servers, network devices, UPSes, web pages, other components of IT, and other infrastructure.

The frontend will provide various options for visualizing data, starting from problem lists and simple graphs ending with network maps and reports, while backend will work hard to provide information that this visualization is based on and send out alerts. All of this will require some configuration that we will learn to perform along the course of this book.

Before we can configure Zabbix, we need to install it. Usually you'll have two choices - either installing from distribution packages, or setting it up from the source code. Unless you highly value distribution packaging and are not ready to roll your own packages, it is suggested to set up the latest version from sources, because Zabbix is being developed at a relatively noticeable pace and there's always some neat feature in the next version that makes life easier.

At first we will set up Zabbix server, database, and frontend, all running on the same machine and using a MySQL database.

If you decide to install Zabbix from your distribution packages, installation procedure and package naming schemes will differ. Refer to your distribution's documentation for that information.

There are a few benefits to using distribution packages. These include:

  • Automated installation and updating

  • Dependencies usually sorted out

Compiling from source also has its share of benefits. They are:

  • Newer versions with more features and improvements

  • More fine-grained control over compiled-in functionality

Server and agent

The most widely-used Zabbix architecture is a server that queries agents. That's what we will learn to set up so that we can monitor our test system.

As with most software, there are some prerequisites that we will need to run Zabbix components. That includes requirements for hardware and other software that the Zabbix server and agent depend on. For the purpose of these instructions, we will settle on running Zabbix on Linux, using a MySQL database. The specific Linux distribution does not matter much it's best to choose the one you are most familiar with.

Software requirements

Now we should get to compiling the various components of Zabbix, so make sure to install the minimum required packages to get Zabbix working with MySQL. They are:

Depending on your distribution and the desired functionality you might also need some or all of the following packages:

  • zlib-devel

  • mysql-devel (for MySQL support)

  • glibc-devel

  • curl-devel (for web monitoring)

  • libidn-devel (curl-devel might depend on it)

  • openssl-devel (curl-devel might depend on it)

  • net-snmp-devel (for SNMP support)

  • popt-devel (net-snmp-devel might depend on it)

  • rpm-devel (net-snmp-devel might depend on it)

  • OpenIPMI-devel (for IPMI support)

  • libssh2-devel (for direct SSH checks)

Hardware requirements

Hardware requirements vary wildly depending on the configuration. It is impossible to give definite requirements, so any production installation should evaluate them individually. For our test environment, though, even as little RAM as 128 MB should be enough. CPU power in general won't play a huge role; Pentium II class hardware should be perfectly capable of dealing with it, although generating graphs with many elements or other complex views can require more powerful hardware to operate at an acceptable speed. You can take these as a starting point as well when installing in a virtual machine.

Of course, the more resources you give to Zabbix, the snappier and happier it will be.