≡ Menu

network monitoring

Nagios: System and Network Monitoring Book

Nagios is a popular open source computer system and network monitoring application software. You can easily monitor all your hosts, network equipment and services. It can send alert when things go wrong and again when they get better.

The convenience and reliability that monitoring programs offer system administrators is astounding. Whether at home, commuting, or on vacation, admins can continuously monitor their networks, learning of issues long before they become catastrophes.

Nagios, the most popular open source solution for system and network monitoring, is extremely robust, but it's also intensely complex. This eagerly anticipated revision of the highly acclaimed Nagios: System and Network Monitoring, has been updated to address Nagios 3.0 and will help readers take full advantage of the many powerful features of the new version. Ethan Galstad, the main developer of Nagios, called the first edition of Nagios "incredibly detailed." He went on to say, "I don't think I could have gone into that much detail if I wrote a book myself."

Nagios, which runs on Linux and most *nix variants, can be configured to continuously monitor network services such as SMTP, POP3, HTTP, NNTP, SSH, and FTP. It can also supervise host resources (processor load, disk and memory usage, running processes, log files, and so on) and environmental factors, such as temperature and humidity. Readers of Nagios learn how to:

  • Install and configure the Nagios core, all standard plugins, and selected third-party plugins
  • Configure the notification system
  • Program event handlers to take automatic action when trouble occurs
  • Write Perl plugins to customize Nagios for unique system needs
  • Quickly understand Nagios data using graphing and visualization tools
  • Monitor Windows servers, SAP systems, and databases

This dense, all-inclusive guide to Nagios also contains a chapter that highlights the differences between Nagios versions 2 and 3 and gives practical migration and compatibility tips. Nagios, 2nd Edition is a key resource for any system and network administrator and will ease the pain of network monitoring migraines in no time.

Wolfgang Barth has written several books for professional network administrators, including The Firewall Book (Suse Press), Network Analysis (Suse Press), and Backup Solutions with Linux (Open Source Press). He is a professional system administrator with considerable experience using Nagios.

Book Info

  • Title: Nagios: System and Network Monitoring, 2nd Edition
  • Author: Wolfgang Barth
  • Pub Date: October 2008, 720 pp
  • ISBN 9781593271794, $59.95 USD
  • Download free chapter 18: "NagVis" (PDF)
  • Order info: order@oreilly.com // 1-800-998-9938 // 1-707-827-7000
  • Support nixCraft: Order Nagios: System and Network Monitoring from Amazon.

How To Monitor Linux and Windows Server And Network Using Nagios

This is a user contributed tutorial.

Nagios is free, open source host, service and network monitoring services. Nagios provides an extensible framework, that can monitor pretty much anything using plugins. Some of the items that can be monitored using Nagios plugins are listed below.

=> Disk space usage of remote Linux and Windows server
=> CPU Usage
=> Memory usage
=> Hardware Temperature
=> VPN tunnels
=> Router and Switches
=> Databases
=> Network services (DHCP, DNS, LDAP, SMTP etc.)

Nagios Configurations are very granular and managed using following three different category of configuration files:

  • Nagios server and web console configuration files can be used to configure the Nagios server itself. For e.g. Use the nagios.cfg and cgi.cfg
  • Resource files can be used to store user defined macros and sensitive configuration informations such as passwords.
  • Object definition configuration files are used to store information about the hosts, services, commands, contacts, notification period etc.

Nagios has a web front end to display the status. Apart from getting the notification about the hosts and service status through email, SMS etc., you can also see the hosts, services, status through nagios web front end. You can project is on the NOC (Network Operation Center) to view the current status of your whole data center. You can also perform few actions on the web console such as disable and enable notification for a specific service. If you have defined the relationship between your hosts properly in the nagios configuration files, you can use the 3D display view to see a graphical representation of the whole data center visually. This also provides reporting feature where you can view the historic data such as availability of a particular service on a specific host over a period of time.

(Fig. 01 – Nagios web UI displaying status of various services on a Linux host)

Notification process on the Nagios is defined at a very granular level that it covers a wide range of possible scenarios on the notification including escalation process where a specific contact group can be notified if an issues has not been fixed after certain number of initial notifications. This is very helpful to automatically notify the management team about a critical service that was not fixed immediately.

Nagios can also be configured in a distributed setup, where datacenters from different parts of the world can be monitored using local nagios server that can report the status back to a central nagios server. This is achieved by NSCA (Nagios Service Check Acceptor) sending monitoring results from the local nagios server to the central server.

Following articles from The Geek Stuff blog, explains about everything that is required to get a jumpstart on the Nagios installation, configuration on Linux. This also explains about how to monitor Linux and Windows host.

Suse Linux: Nagios Basic Installation and Configuration

Nagios is my favorite open source server and network monitoring application software. It watches hosts and services that you specify, alerting you when things go bad and again when they get better.

If you're planning on installing Nagios, check out this installation guide from Rainer Brunold that gives you step-by-step instructions on how to set it up:

Nagios is a popular host and service monitoring tool used by many administrators to keep an eye on their systems.

Since I wrote a basic installation guide in Jan 2006 on Cool Solutions many new versions were published and many Nagios plugins are now available. Because of that I think it's time to write a series of articles here that show you some very interesting solutions. I hope that you find them helpful and that you can use them in your environment. If you are not yet and nagios user I hope that I can inspire you and you give it a try.

I don't want to write here a full documentation about Nagios, I prefer to give you a basic installation guide so you can set it up very easy and play with it yourself. The installation guide will show you how to install Nagios as well as some interesting extensions and how they integrate into each other. During this installation you will make many modifications to the installation that will help to understand how it works, how you can integrate systems and different services. I will also provide some articles about monitoring special services where I describe what they do and what configuration changes are needed. All together should give you a very good overview and documentation on how you can enhance the Nagios installation yourself.

=> Nagios 3.0 - A Extensible Host and Service Monitoring

Keeping a Log Of Daily Network Traffic for ADSL or Dedicated Remote Linux Server

Almost a year ago, I wrote about Linux MRTG configuration how-to. However, some user seems to confused with MRTG, most users would like to know - how much traffic actually generated by ADSL/Cable service provider on daily and monthly basis.

MRTG is for network monitoring and it can be use to see how much traffic your server or ADSL router actually generated, however it will not tell you how much megabytes or gigabytes the daily traffic was. For all such home user and people having dedicated single Linux box hosted somewhere remote at IDC/ISP there is a tool called vnStat:

  • It is a console-base network traffic monitor for Linux (perfect tool for remote Linux box hosted at ISP)
  • It keeps a log of daily and monthly network traffic for the selected network interface(s).
  • It collects all data from /proc file system it means normal user can monitor traffic (no need to run vnstat as a root user)
  • Easy to setup & configure
  • Ease of use

Step # 1: Install vnstat

Debian / Ubuntu Linux user can install vnstat using apt-get command, enter:

# apt-get install vnstat 

Step # 2: Enable vnstat

Once installed, you need to create a database with the following command:

# vnstat -u -i eth0


  • -u :forces a database update for interface or creates the database if it doesn’t exist
  • -i eth0 : use to specify interface

Please note that it will start to collect data via cronjob:

0-55/5 * * * *   root    /usr/bin/vnstat -u

You do not have to install cronjob yourself; it should be automatically configure by apt-get.

Step # 3 View statistics

Display default traffic statistics

$ vnstat

Display daily traffic statistics

$ vnstat -d

Display monthly traffic statistics:

$ vnstat -m

Display all time top10 traffic days:

$ vnstat -t 

Try help option to get all query options:

$ vnstat --help

Read man page of vnstat for complete options and more information and download vnstat here