Nagios Study Notes
Nagios is an open-source monitoring software that monitors linux, unix, windows, and network devices and printers.
Nagios monitors different objects through various plug-ins, and manages Nagios Based on the web interface.
Nagios installation directory: nagios/bin stores the main running program of nagios, and nagios/sbin stores the cgi program called externally,
Nagios/etc stores the main configuration file nagios. cfg CGI configuration file cgi. cfg and resource. cfg of nagios.
Nagios/etc/objects stores the nagios service and host configuration files. Nagios/var stores cached files, log files, and lock files.
Nagios/share stores webpage files for web-based management. Nagios/libexec stores plug-ins
Nagios monitoring principles:
The Nagios kernel processes call the plug-ins stored in the libexec directory to obtain the monitoring parameters of each Monitored object, and then place the parameters
The parameter queue processes data in sequence and then displays the data in the web interface using the configured file host template.
Monitors the cpu memory and services of Linux Hosts using the nrpe service, and installs the nrpe non-independent service on the remote monitored host,
The remote host's nrpe service then calls the check_nrpe plug-in to obtain 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. The monitoring network device uses the check_snmp plug-in and uses the snmp
Protocol, monitors the window host, and installs the clientx plug-in on the window end.
Configuration File: nagios. cfg mainly sets the global configuration of nagios. concat. cfg terplate. cfg services. cfg, command. cfg
Define service host commands.
Compile nagios: Add nagios users and groups, and add apache users to nagios group usermod-a-G nagios apache.
Add directory/usr/local/nagios chown-R nagios: nagios/usr/local/nagios
Compile nagios -- with-command-group = nagios -- prefix =/usr/local/nagios
Make install-init make-config make-
Add the/etc/httpd/conf. d/nagios. conf file
Create directory alias/nagios "/usr/local/nagios/share"
Scriptalias/nagios/cgi-bin "/usr/local/nagios/sbin"
Install the plug-in./configure -- prefix =/usr/local/nagios