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.