In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Nagios is an open source free network monitoring tool, which can effectively monitor the host status of Windows, Linux and Unix, network devices such as switches and routers, printers and so on. When the system or service status is abnormal, send an email or SMS alarm to notify the website operation and maintenance personnel as soon as possible, and send out a normal email or SMS notification after the status is restored.
NSClient:Windows 7 Monitoring plug-in
NRPE is an extension of the monitoring software nagios, which is used on the monitored server to provide some local information about the server to the nagios monitoring platform. For example, cpu load, memory usage, hard disk usage, and so on. NRPE can be called the for linux client of nagios.
1. Install the software:
Yum install-y gcc*
Yum install-y httpd mysql mysql-server mysql-devel php php-mysql glibc glibc-common * gd*
two。 Add a user:
3. Compile and install nagios:
The package used for this installation is nagios.iso
Tar-xvf nagios-3.3.1.tar.gz-C / root/
Then go to the nagios directory
. / configure-with-command-group=nagcmd-enable-event-broker
Make all
Make install
Make install-init
Make install-commandmode
Make install-config
Make install-webconf
4. Generate a password profile:
Enable the Apache service
5. Browsers view:
6. Install the plug-in Manager nagios-plugins:
Tar-xvf nagios-plugins-1.4.14.tar.gz-C / root/
Go to the directory to compile and install (nagios-plugins-1.4.14)
. / configure-with-nagios-user=nagios-with-nagios-group=nagios-with-mysql-enable-perl-modules
Make & & make install
Check the configuration file for errors:
/ usr/local/nagios/bin/nagios-v / usr/local/nagios/etc/nagios.cfg
Restart the nagios service
At this time, go to the browser to check:
Monitoring of Windows hosts:
7.Windows installation NSClient:
Server Settings Monitoring Windows:
Detect and restart nagios
/ usr/local/nagios/bin/nagios-v / usr/local/nagios/etc/nagios.cfg
Service nagios restart
The browser then looks at:
Linux client monitoring:
Monitoring of 8.Linux clients:
On top of the Linux customer:
Installation environment support:
Yum install-y gcc* openssl openssl-devel
Compile and install nagios-plugins
Tar-xvf nagios-plugins-1.4.14.tar.gz
You need to create a user
Useradd nagios
. / configure-with-nagios-user=nagios-with-nagios-group=nagios
Make all
Make install
Compile and install nrpe-2.8.1.tar.gz
. / configure-enable-ssl-with-ssl-lib=/usr/lib
Back to the server side:
Install nagios-plugins (installed)
Install nrpe
Tar-xvf nrpe-2.8.1.tar.gz-C / root/
. / configure-enable-ssl-with-ssl-lib=/usr/lib
Make all
Make install-plugin
Do not enable daemon and daemon-config
Define host {
Use linux-server
Host_name nagios
Address 192.168.115.174
}
Define service {
Use generic-service
Host_name nagios
Service_description check-load
Check_command check_nrpe!check_load
}
Define service {
Use generic-service
Host_name nagios
Service_description check-users
Check_command check_nrpe!check_users
}
/ usr/local/nagios/bin/nagios-v / usr/local/nagios/etc/nagios.cfg
Service nagios restart
Check the browser again:
9. Monitoring of services:
Linux client:
Install the software:
Yum install-y mysql mysql-server
Service mysqld start
Mysqladmin-uroot password '123456'
Server side:
Test the connection:
/ usr/local/nagios/libexec/check_mysql-H 192.168.115.174-u nagios-d nagios-p 123456
Define host {
Use linux-server
Host_name Mysql
Address 192.168.115.174
}
Define service {
Host_name Mysql
Check_period 24x7
Max_check_attempts 2
Normal_check_interval 1
Retry_check_interval 1
Contact_groups admins
Notification_interval 5
Notification_period 24x7
Notification_options w,u,c,r
Check_command check_mysql
}
Service nagios restart
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.