NagiosServer SelfMonitoringThere are two methods for implementation, which can be simple!
Figure-Nagios
Self-monitoring implementation of Nagios Server
To monitor resources and services, you must configure the nagios server and the NRPE-nagios remote plugin
Executor). In order to smoothly and methodically deploy the nagios monitoring platform, a good working style is in nagios
Server monitors services and resources, and then deploys nrpe on other monitoring terminals, from nagios
After the server passes the check_nrpe test
Add monitoring items one by one in the server configuration file. Of course, if you only monitor the service without monitoring host resources, the monitored end will not install any nrpe. To make it easier for beginners to get started and succeed,
Let's start with a simple step.
Self-monitoring implementation: configure the mail sending function because after an alarm email is sent to the user's mailbox, the monitoring system itself does not need to accept emails sent by other email servers, therefore, you only need to use sendmail provided by the server to send alarm messages. Another purpose of sendmail is convenience.
If the system is redhat or centos, you only need to execute service sendmail start
Start the daemon process, and then use the dns server to give it A valid domain name (that is, A record). Now you can use the mail command to send the test email to A certain email address. If you receive the test email
It indicates that the email system configuration is complete. Is it easy? Here is an example of sending an email:
Mail-s "This is sery's nagios test mail" sery@163.com