NagiosYou can use snmp, nrpe, and nsclient to obtain information. More importantly, you can use the latter and use its powerful plug-in module. Cacti Uses snmp and does not need to install an agent. It is generally used to monitor network traffic. Nagios is generally used to monitor processes and services.
Nagios installation environment:
Host |
Operating System |
IP |
Remarks |
Nagios-server |
RHEL 4 |
192.168.112.30 |
Monitoring Server |
Server |
RHEL 4 |
192.168.112.112 |
Monitored LINUX host |
Win2003-server |
Windows 2003 |
192.168.112.113 |
Monitored Windows Host |
Monitoring status defined by Nagios
Nagios defines the monitoring status in 4, which indicates different severity levels. Besides OK, it indicates that the monitoring status is normal and does not need to be concerned.
Status |
Code |
Color |
Normal |
OK |
Green, |
Warning |
WARNING |
Yellow, |
Severe |
CRITICAL |
Red, |
Unknown error |
UNKOWN |
Dark yellow |
Software Used
Nagios-3.0.2.tar.gz (Nagios Main Program)
Nagios-plugins-1.4.13.tar.gz Nagios plug-in)
Nrpe-2.8.1.tar.gz Nix client communication program)
NSClient ++-Win32-0.3.5 Win client communication program)
Apache (httpd-2.2.10.tar) Web Service)
Install nagios-server
- Useradd nagios
-
- Mkdir/usr/local/nagios
-
- Chown nagios. nagios/usr/local/nagios
-
- Tar zxvf nagios-3.0.2.tar.gz
-
- Cd nagios-3.0.2
-
- ./Configure -- prefix =/usr/local/nagios -- with-gd-lib =/usr/local/lib -- with-gd-inc =/usr/local/include/
-
- Make all
-
- Make install (install the main program, CGI and HTML files)
-
- Make install-init (install the startup script in/etc/rc. d/init. d)
-
- Make install-commandmode (configure directory permissions for external command files)
-
- Make install-config (installation sample configuration file)
-
- # Make install-webconf (install the Nagios interface configuration file template. This template must be manually added to httpd. conf to take effect. Default installation path: before installing/etc/httpd/conf. d, run mkdir/etc/httpd/conf. d-p)
Then verify that the program is correctly installed. Switch the directory to the installation path:/usr/local/nagios. check whether there are five directories, including etc, bin, sbin, share, and var, if yes, it indicates that the program has been correctly installed to the system. The following table provides a brief description of the five directory functions:
Bin |
The directory where the Nagios executable program is located. The nagios file is the main program. |
Etc |
Location of the Nagios configuration file. After the initial installation, there are only a few *. cfg files. |
Sbin |
The directory where the Nagios Cgi file is located, that is, the directory where the file needed to execute External commands is located |
Share |
Nagios webpage file directory |
Var |
Directory where Nagios log files, spids, and other files are located |
Var/archives |
Empty directory created for archived logs |
Var/rw |
Empty directory created for external command file |
The initial installation and configuration of nagios is so much. If you are interested, you can continue to read nagios-related articles:
Install and configure nagios, modify Apache configurations, monitor Linux servers, monitor Windows servers, and solve ten Nagios faults