Nagios Installation Guide

Source: Internet
Author: User

Introduction

This are intended to provide if you have a simple instructions on how to install Nagios from source (code) on Fedora and H Ave It monitoring your local machine inside of minutes. No Advanced installation Options is discussed here-just the basics that would work for 95% of the users who want to get star Re ".

These instructions were written based on a standard CENTOS6 Linux distribution.

What are you ' ll End up with

If you follow these instructions, here's what you'll end up with:

    • Nagios and the plugins would be installed Underneath/usr/local/nagios
    • Nagios would be configured to monitor a few aspects of your local system (CPU load, disk usage, etc)
    • The Nagios Web interface is accessible at http://localhost/nagios/

Prerequisites

During portions of the installation you'll need to has root access to your machine.

Make sure you ' ve installed the following packages on your Fedora installation before continuing.

    • Apache
    • Php
    • GCC compiler
    • GD Development Libraries

You can use yum to install these packages by running the following commands (as root):

1) Create account information

Become the root user.

Create a new nagios user account and give it a password.

Create a new nagcmd Group for allowing external commands to be submitted through the Web interface. Add both the Nagios user and the Apache user to the group.

2) Download Nagios and the Plugins

Create a directory for storing the downloads.

Download the source code tarballs of both Nagios and the Nagios plugins (visit https://www.nagios.org/download/for links To the latest versions). These directions were tested with Nagios 3.1.1 and Nagios Plugins 1.4.11.

3) Compile and Install Nagios

Extract the Nagios source code tarball.

Run The Nagios configure script, passing the name of the group you created earlier:

Compile the Nagios source code.

Install binaries, init script, sample config files and set permissions on the external command directory.

Don ' t start Nagios yet-there ' s still more this needs to being done ...

4) Customize Configuration

Sample configuration files has now been installed in the /usr/local/nagios/etc directory. These sample files should work fine for getting started with Nagios. You'll need just one change before you proceed ...

Edit the /usr/local/nagios/etc/objects/contacts.cfg config file with your favorite editor and change the email ad Dress associated with the nagiosadmin contact definition to the address of you ' d like to use for receiving alerts.

5) Configure the Web Interface

Install the Nagios Web Config file in the Apache conf.d directory.

Create a nagiosadmin account for logging into the Nagios Web interface. Remember The password you assign to this account-you ' ll need it later.

Restart Apache to make the new settings take effect.

Note:consider implementing the Ehanced CGI security measures described here to ensure that your Web authentication Creden Tials is not compromised.

6) Compile and Install the Nagios Plugins

Extract the Nagios plugins source code tarball.

Compile and install the plugins.

7) Start Nagios

Add Nagios to the list of system services and has it automatically start when the system boots.

Verify The sample Nagios configuration files.

If There is no errors, start Nagios.

8) Modify SELinux Settings

Fedora ships with SELinux (Security enhanced Linux) installed and in enforcing mode by default. This can result in "Internal Server Error" messages if you attempt to access the Nagios CGIs.

See if SELinux are in enforcing mode.

Put SELinux into Permissive mode.

To make this change permanent, you'll have to modify the settings in /etc/selinux/config and reboot.

Instead of disabling SELinux or setting it to permissive mode, you can use the following command to run the CGIs under SEL Inux enforcing/targeted Mode:

For information on running the Nagios CGIs under enforcing mode with a targeted policy, visit the Nagios support Portal or Nagios Community Wiki.

9) Login to the Web Interface

You should now is able to access the Nagios Web interface at the URL below. You'll be prompted to the username (nagiosadmin) and password you specified earlier.

Click on the "Service Detail" NavBar link to see details of the "s being monitored on your local machine. It'll take a few minutes for Nagios to check all the services associated with your machine, as the checks is spread out Over time.

Other modifications

Make sure your machine ' s firewall rules is configured to allow access to the Web server if you want to access the Nagios interface remotely.

Configuring email Notifications is out of the scope of this documentation. While Nagios was currently configured to send your email notifications, your system may not yet has a mail program properly Installed or configured. Refer to your system documentation, search the Web, or look to the Nagios support Portal or Nagios Community Wiki for spec IFIC instructions on configuring your system to send mail messages to external addresses. More information on notifications can be foundhere.

One) you ' re done

congratulations! You sucessfully installed Nagios. Your journey to monitoring is just beginning. You'll no doubt want to monitor more than just your local machine, so check out the following docs ...

    • Monitoring Windows Machines
    • Monitoring Linux/unix Machines
    • Monitoring Netware Servers
    • Monitoring Routers/switches
    • Monitoring publicly available services (HTTP, FTP, SSH, etc)  

Nagios Installation Guide

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.