Nagios is an open-source monitoring software that monitors linux,unix,windows as well as network devices and printers.
Nagios monitors different objects through a variety of plugins, or manages Nagios based on a web interface.
Nagios installation directory: Nagios/bin holds Nagios's main running program, Nagios/sbin a CGI program that stores external calls,
NAGIOS/ETC holds Nagios's master Profile nagios.cfg CGI profile cgi.cfg and resource profile resource.cfg
Nagios/etc/objects a configuration file that stores Nagios's services and hosts. Nagios/var store cache files, log files and lock files, etc.
Nagios/share store Web pages files for Web-based management. Nagios/libexec Store Plugin Program
Nagios's monitoring principle:
Nagios's kernel process calls the plug-in stored in the Libexec directory to obtain monitoring parameters for each monitoring object, and then places the parameters
The parameter queue processes the data sequentially and then displays it in the Web interface through the configured file host template.
Monitor the CPU memory and services of Linux hosts using the Nrpe service to install Nrpe non-standalone services on remote monitored hosts,
then the remote host's The Nrpe service then calls the Check_nrpe plug-in to obtain the host monitoring data and then returns the data to the monitoring host through the service
The monitoring host calls the Check_nrpe plug-in to communicate with the Nrpe service, monitoring network devices using CHECK_SNMP plug-ins, via SNMP
Protocol, monitor the window host and install the Clientx plugin on the window side.
Configuration file: Nagios.cfg is primarily set up for Nagios globally, concat.cfg terplate.cfg services.cfg,command.cfg
The Service host command is defined in the
Compile Nagios: Add Nagios Users and groups to join the Apache user to the Nagios group Usermod-a-G Nagios Apache.
Add Directory/usr/local/nagios chown-r Nagios:nagios/usr/local/nagios
Compiling Nagios--with-command-group=nagios--prefix=/usr/local/nagios
Make make and install make Install-init make-config make-
Add/etc/httpd/conf.d/nagios.conf File
Create a directory alias Alias/nagios "/usr/local/nagios/share"
Scriptalias/nagios/cgi-bin "/usr/local/nagios/sbin"
Install the plugin./configure--prefix=/usr/local/nagios