sudo apt-get install nagios3
Add Admin
#sudo htpasswd -c /etc/nagios3/htpasswd.cfg nagiosadmin
Add User
#sudo htpasswd /etc/nagios3/htpasswd.cfg user1
Setup Contact
#sudo vi /etc/nagios3/conf.d/contacts_nagios2.cfg
define contact{
contact_name it
alias IT
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,r
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
email user@email.com
}
Monitor Linux Server
Postfix server
Postfix# sudo apt-get install nagios-nrpe-server
postfix# sudo vi /etc/nagios/nrpe.cfg
allowed_hosts=?
command[check_mailqq]=/usr/lib/nagios/plugins/check_mailq -w 100 -c 200 -M postfix
postfix# sudo /etc/init.d/nagios-nrpe-server restart
#sudo apt-get install nagios-nrpe-plugin
#sudo vi /etc/nagios3/host.cfg
check_command check_nrpe_1arg!check_mailqq
#sudo /etc/init.d/nagios3 reload
Linux Client ping other server
linux client#sudo vi /etc/nagios/nrpe.cfg
command[check_ping_other]=/usr/lib/nagios/plugins/check_ping -H 8.8.8.8 -w 600,10% -c 800,50%
沒有留言:
張貼留言