Halaman

Jumat, 11 Juli 2014

Installing Nagios Core monitoring system (client and server)


The monitoring server
1. Install Nagios Core and dependancies
apt-get install nagios3 nagios-nrpe-plugin

2. Create the admin user
htpasswd -c /etc/nagios3/htpasswd.users nagiosadmin

3. Create a host to monitor (pico /etc/nagios3/conf.d/server1.cfg)
define host {
use generic-host
host_name server1
alias server1
address 192.168.1.3
}
define service {
use generic-service
host_name server1
service_description Disk Space
check_command check_all_disks!20%!10%
}
define service {
use generic-service
host_name server1
service_description Current Users
check_command check_users!20!50
}
define service {
use generic-service
host_name server1
service_description Total Processes
check_command check_procs!250!400
}
define service {
use generic-service
host_name server1
service_description Current Load
check_command check_load!5.0!4.0!3.0!10.0!6.0!4.0
}

Replace server1 with the actual hostname of the server being monitored and the IP address to correct one.
This configuration will allow you to monitor the disk usage, active users, number of processes and the cpu load of a single server. Configuring host groups and other services are outside the scope of this article.
4. Restart Nagios
/etc/init.d/nagios3 restart

4. Enter the webadmin by opening this location in a web browser: http://yourserver/nagios3
Clients monitored by the monitoring server
1. Install the Nagios NRPE (Nagios Remote Plugin Executor)
apt-get install nagios-nrpe-server

2. Allow the monitoring server to connect to this NRPE (pico /etc/nagios/nrpe.cfg)
allowed_hosts=192.168.1.2

Replace 192.168.1.2 with the IP address of the monitoring server.
NRPE listens for connections on TCP port 5666 so make sure your firewall allows connections to that port from the monitoring server.
3. Restart NRPE
/etc/init.d/nagios-nrpe-server restart

Source : http://www.debiantutorials.com/installing-nagios-core-monitoring-system-client-and-server/

Tidak ada komentar:

Posting Komentar