Steps for installing nagios and pnp4nagios in centos

Source: Internet
Author: User
Tags centos


I. INTRODUCTION

Nagios is an open-source computer system and network monitoring tool that can effectively monitor the status of Windows, Linux and Unix hosts, network settings such as vswitches and routers, and printers. It's a powerful O & M tool, but not nagios. How can you say that you are an O & M engineer?

II. Install nagios

1. Download nagios: Download Address: http://sourceforge.net/projects/nagios-cn? Source = typ_redirect

2. Install nagios

(Prerequisite: install httpd and php)

New user decompress, compile, and install


Useradd nagios-G nagcmd
Tar jxvf nagios-cn-3.2.3.tar.bz2
Cd nagios-cn-3.2.3
./Configure -- prefix =/nagios -- with-command-group = nagcmd

Install nagios and its configuration file


Make all
Make install
Make install-init
Make install-commandmode
Make install-config
Cp sample-config/httpd. conf/etc/httpd/conf. d/nagios. conf

Create a logon password:

Htpasswd-c/nagios/etc/htpasswd. users nagios

Start the test:


Service nagios start
Service httpd start


It should be enabled by default:


I have no problem. If there is an error, most of them will be missing some packages. Check it online.

By now, more than half of the success has been achieved.

Install nagios-plugins and nrpe

Download nagios-plugins: http://nagios-plugins.org/download/nagios-plugins-2.0.3.tar.gz

Download nrpe: http://sourceforge.net/projects/nagios/files/nrpe-2.x/nrpe-2.15/nrpe-2.15.tar.gz/download

The installation is simple, and then the configuration will not be detailed below.

Then let's talk about how to install pnp4nagios:

1. Download https://sourceforge.net/projects/pnp4nagios/files/latest

2. Compile and install:

Tar zxvf pnp4nagios-0.6.14.tar.gz
Cd pnp4nagios-0.6.14
./Configure & make all & make install
Enable nagios. cfg configuration:
Host_perfdata_command = process-host-perfdata
Service_perfdata_command = process-service-perfdat

Modify commands. cfg configuration:


Define command {
Command_name process-host-perfdata
Command_line/pnp4nagios/libexec/process_perfdata.pl-d HOSTPERFDATA
        }
 
 
# 'Process-service-perfdata' command definition
Define command {
Command_name process-service-perfdata
Command_line/pnp4nagios/libexec/process_perfdata.pl
        }


Add the corresponding action_url in templates. cfg:


Host Template

Action_url/pnp4nagios/index. php/graph? Host = $ HOSTNAME $ & srv = _ HOST _

Service Template
Action_url/pnp4nagios/index. php/graph? Host = $ HOSTNAME $ & srv = $ SERVICEDESC $


Well, little sun is coming.

Related Article

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.