Setting Up A Nagios Monitoring System Warren Block, May 2005



Similar documents
While are you still in Nagios working directory, create a new file for DNS servers monitoring

Network Monitoring Systems / Nagios. 2/19/08 Michael Miller e mail: mike.mikemiller@gmail.com

Monitoring Systems and Services. Alwin Brokmann DESY-IT March 24 28,2003 CHEP 2003 San Diego

NETWORK MONITOR. Some high-end network monitoring. Watching your systems with Nagios COVER STORY. What Is Nagios? Installing the Server and Plugins

DEPLOYMENT GUIDE Version 1.0. Deploying the BIG-IP LTM with the Nagios Open Source Network Monitoring System


How To Install Nagios Network Monitoring Program On A Pc Or Macbook Or Ipad (For Mac) With A Web Browser (For A Mac)

Research Report Security Management with Open Source Tools

Availability Management Nagios overview. TEIN2 training Bangkok September 2005

Document d'installation FAN 2.1

Présentation de Nagios

Setting up an Apache Web Server for Greenstone 2 Walkthrough

wget

Apache & Virtual Hosts & mod_rewrite

How To Monitor A Network With Nagios And Other Tools

APACHE HTTP SERVER 2.2.8

NRPE Documentation CONTENTS. 1. Introduction... a) Purpose... b) Design Overview Example Uses... a) Direct Checks... b) Indirect Checks...

How To Run Nrpe On Nagios On Windows 7.5 (Windows) On A Linux Computer On A Windows 7 (Windows 7) On An Ubuntu Computer On An Ipad Or Ipad (Windows 8) On Your Pc

Redatam+SP REtrieval of DATa for Small Areas by Microcomputer

Monitoring Your Enterprise PACS With Nagios, Cacti And Smokeping

Nagios. cooler than it looks. Wednesday, 31 October 2007

VANITHASHRREE RAJA 21 ST OCTOBER 1988 SERVER, CPU & HARDISK NETWORK MONITORING SYSTEM 2011/2012 EN. ALIAS MOHD

AfNOG Monitoring of IP Services. Ayitey Bulley Material generously borrowed from the NSRC NME course

Comparison table for an idea on features and differences between most famous statistics tools (AWStats, Analog, Webalizer,...).

MONITORING EMC GREENPLUM DCA WITH NAGIOS

WEB2CS INSTALLATION GUIDE

Installing SQL-Ledger on Windows

Management, Logging and Troubleshooting

orrelog Apache TLS / Crypto Enhanced Encryption Software

Managing Monitoring in Distributed Environments

Monitoring MySQL. Geert Vanderkelen MySQL Senior Support Engineer Sun Microsystems

Plugin for Cisco NAC (Network Admission Control) Installation Guide

Network Monitoring with Nagios. Matt Gracie, Information Security Administrator Canisius College, Buffalo, NY

Livezilla How to Install on Shared Hosting By: Jon Manning

OpenEyes - Windows Server Setup. OpenEyes - Windows Server Setup

Robust & Reliable DNS Operations Logging & Monitoring

Nagios introduction. Dhruba Raj Bhandari (CCNA) Additions by Phil Regnauld.

Setting Up SSL From Client to Web Server and Plugin to WAS

GroundWork Monitor Open Source Installation Guide

Open Source Management Options

Real Vision Software, Inc.

Greenstone Documentation

1. When will an IP process drop a datagram? 2. When will an IP process fragment a datagram? 3. When will a TCP process drop a segment?

SVNManager Installation. Documentation. Department of Public Health Erasmus MC University Medical Center

Install and configure Apache, MySQL, PHP on OSX 10.8 Mountain Lion

Installation von des Netzwerküberwachungssystems Nagios 1.1 auf einem Debian-Rechner

Installing Apache Software

APACHE WEB SERVER. Andri Mirzal, PhD N

How To Monitor A Network With Nagios And Rt Software On Linux On A Microsoft Ipad (A2) On A Pc Or Macbook Or Ipad Or Ipa (A3) On An Ipa Or Ipo (

Nagios Core Version 3.x Documentation

Installation Guide for WebSphere Application Server (WAS) and its Fix Packs on AIX V5.3L

AXIGEN Mail Server. Quick Installation and Configuration Guide. Product version: 6.1 Document version: 1.0

dotdefender v5.12 for Apache Installation Guide Applicure Web Application Firewall Applicure Technologies Ltd. 1 of 11 support@applicure.

Tibbr Installation Addendum for Amazon Web Services

IBM TRIRIGA Application Platform Version 3 Release 4.1. Single Sign-On Setup User Guide

Server Installation/Upgrade Guide

The course will be run on a Linux platform, but it is suitable for all UNIX based deployments.

Kollaborate Server Installation Guide!! 1. Kollaborate Server! Installation Guide!

Installing Oracle 12c Enterprise on Windows 7 64-Bit

Monitoring the World with NetBSD

HELP DOCUMENTATION SSRPM WEB INTERFACE GUIDE

Using Nessus In Web Application Vulnerability Assessments

There are numerous ways to access monitors:

Knowledge is Power. He who gets wisdom loves his own soul; he who cherishes understanding prospers. (Proverbs 19:8)

Single sign-on websites with Apache httpd: Integrating with Active Directory for authentication and authorization

September 21 st, Ethan Galstad.

Dragonframe License Manager User Guide Version 1.2.2

Jive Connects for Microsoft SharePoint: Troubleshooting Tips

Contents: 1. Preparation/download files 2. Apache HTTPD Web Server MySQL PHP PHPMyAdmin Ruby On Rails 1.8.

CloudBackup Installer Guide Linux. System Requirements. Get Started - Linux

The road to lazy monitoring with Icinga2 & Puppet. Tom De

CC ICT-SUD. Setting up and integrate Apache, MySQL and PHP on a Linux system

Exercises: FreeBSD: Apache and SSL: SANOG VI IP Services Workshop

TECHNICAL NOTE Stormshield Network Firewall AUTOMATIC BACKUPS. Document version: 1.0 Reference: snentno_autobackup

Secure Messaging Server Console... 2

Construction of a Web Server with a Database Facility Using Open Source Software

Transform TM. Content Center. Getting Started

SELF SERVICE RESET PASSWORD MANAGEMENT WEB INTERFACE GUIDE

How to Configure Active Directory based User Authentication

U S E R D O C U M E N TA T I O N ( A L E P H I N O

JMETER - MONITOR TEST PLAN

Monitoring Software Services registered with science.canarie.ca

INSTALLATION GUIDE VERSION

MassTransit 6.0 Enterprise Web Configuration for Macintosh OS 10.5 Server

Install Apache on windows 8 Create your own server

Active Directory Integration. Documentation. v1.02. making your facilities work for you!

Back Up Linux And Windows Systems With BackupPC

Talk Internet User Guides Controlgate Administrative User Guide

An Introduction to Monitoring with Nagios

Installing Ameos for Windows Platforms

NSi Mobile Installation Guide. Version 6.2

Transcription:

Setting Up A Nagios Monitoring System Warren Block, May 2005 What Is Nagios? NAGIOS (na gee ose) is a system that will monitor the status of other network computers or components. It can watch your network and alert you when things happen. If a computer stops responding or fails somehow, Nagios can send an email, page or let you know in some other way. At the same time, it will create a web page that shows the current status of all the systems being monitored. Because Nagios has so many capabilities, it can be complex to set up. Here, we'll have it monitor itself and only one other computer. FreeBSD is used for the Nagios system, so we can take advantage of the Ports Collection to make things easier. Setting Up FreeBSD Not much of a computer is needed for Nagios. A P166 system could easily handle a hundred monitored machines. 32M of RAM and 4G of disk is adequate, so this can be a good use for old computers. Nagios could also be added to an existing system without adding much load. A plain-vanilla FreeBSD installation from the FreeBSD 5.3-Release CD is the starting point. Update the ports so all the latest versions are available: # cp /usr/share/examples/cvsup/ports supfile /root (edit ports supfile to point to the closest cvsup mirror) # pkg_add r cvsup without gui # rehash # cvsup /root/ports supfile Install Nagios The Ports Collection makes installing Nagios easy: # cd /usr/ports/net mgmt/nagios # make install clean To enable Nagios, add this line to /etc/rc.conf: nagios_enable= YES

Configure Nagios Configuration is the biggest part of setting up Nagios. Fortunately, much of it is one-time, and making later additions is easier. On FreeBSD, the configuration files for added software are stored in the /usr/local/etc directory. Because Nagios has many config files, it keeps them all there in a subdirectory called nagios. # cd /usr/local/etc/nagios Nagios includes samples of most of the conf files, so they can be copied and modified. First we'll do this with the main config file, nagios.cfg: # cp nagios.cfg sample nagios.cfg There are two changes we need to make in this file. The first is to set cfg_file to tell Nagios where our site configuration file is located. This file will contain the list of all the computers and services we want to monitor, and will be called mysite.cfg: cfg_file=/usr/local/etc/nagios/mysite.cfg The second change is to comment out all other cfg_file lines by prefixing them with a # sign. In the minimal install shown here, those other files will not be needed. To set up the local plugins that will be used on the Nagios machine itself, we also need to copy the resource config file. No internal changes are needed, though: # cp resource.cfg sample resource.cfg Now we will create that mysite.cfg file mentioned earlier. It's based on the minimal sample configuration provided with Nagios: # cp minimal.cfg sample mysite.cfg The example minimal configuration has Nagios just monitoring itself. This is not greatly useful, so we will add one other computer, or host, to be watched. First, we need another entry in the Hosts section. This is easiest made by copying the existing localhost entry and just changing the name and address: define host{ use generic host host_name alias Being Watched address 10.0.0.7 check_command check host alive max_check_attempts 10 notification_interval 120 notification_period 24x7 notification_options d,r contact_groups admins

In a similar fashion, we'll add another group: define hostgroup{ hostgroup_name alias members watched Monitored Machines If you have multiple hosts being monitored, they would be entered as a comma-separated list on the members line. Finally, we'll add a service. Each service is one thing that is monitored on an individual host. A check for HTTP would be a service, as would a free disk space check. Our single service will be a simple ping to see if the host is up. define service{ use generic service host_name service_description PING is_volatile 0 check_period 24x7 max_check_attempts 4 normal_check_interval 5 retry_check_interval 1 contact_groups admins notification_interval 960 notification_period 24x7 check_command check_ping!100.0,20%!500.0,60% That's it for mysite.cfg. Now we'll set up the last Nagios config file, cgi.cfg. As you might expect, it sets up CGI parameters, controlling what can be done by users on the Nagios web page. # cp cgi.cfg sample cgi.cfg Editing cgi.cfg, we'll uncomment the long line that says: nagios_check_command=/usr/local/libexec/nagios/check_nagios \ /var/spool/nagios/status.log 5 '/usr/local/bin/nagios' We'll also add a line to let our authorized user (guest) see information on all hosts being monitored: authorized_for_all_hosts=guest Finally, we'll have Nagios check the configuration for problems: # nagios v /usr/local/etc/nagios/nagios.cfg Problems are usually caused by path or punctuation errors. Fix them and try again until Nagios reports that things look okay.

Install Apache Again, an easy FreeBSD port: # cd /usr/ports/www/apache2 # make install clean # rehash Enable Apache2 in /etc/rc.conf: apache2_enable= YES Configure Apache A few settings need to made in the Apache config file, httpd.conf. As usual, FreeBSD places these files in /usr/local/etc, and the file we need is in a subdirectory called apache2: # cd /usr/local/etc/apache2 We need to tell Apache where the Nagios CGI programs and files live. Adding this section to httpd.conf just after the first ScriptAlias already in that file will do it: # Nagios ScriptAlias /nagios/cgi bin /usr/local/share/nagios/cgi bin <Directory "/usr/local/share/nagios/cgi bin"> AllowOverride AuthConfig Options ExecCGI Order allow,deny Allow from all </Directory> Alias /nagios /usr/local/share/nagios <Directory "/usr/local/share/nagios"> Options None AllowOverride AuthConfig Order allow,deny Allow from all </Directory> # end of Nagios section Now we will set up the files to get Apache to authenticate our guest user. Create a file called /usr/local/share/nagios/cgi bin/.htaccesswith these contents: AuthName "Nagios Access" AuthType Basic AuthUserFile /usr/local/etc/nagios/htpasswd.users require valid user And finally, create a password for that web user: # htpasswd c /usr/local/etc/nagios/htpasswd.users guest (enter password for guest user)

Start Nagios And Apache # /usr/local/etc/rc.d/nagios.sh start # /usr/local/etc/rc.d/apache2.sh start If your Nagios computer has a DNS hostname of naggy, you should now be able to see the Nagios screen at http://naggy/nagios Click on Service Detail on the left, and Apache will ask for a username and password. Use the username guest and enter the password you defined above. The status of each host's services should start out as unknown. After a few minutes, they will update as they are tested. More Information http://www.freebsd.org http://www.nagios.org