Installing Nagios On Debian Lenny And Monitoring A Debian Lenny Server
Installing Nagios On Debian Lenny And Monitoring A Debian Lenny ServerIntroductionNagios is a monitoring solution for complex IT infrastructures, Nagios is easy to implement and can be extended by custom-modules, called plugins. In this howto I explain howto install Nagios on a Debian Lenny host and make the configuration for it. Furthermore we are going to install a second Debian machine which we monitor with remote and local plugins.
1. Installation Of Two Default Debian MachinesPrepare two Debian Lenny machines with a minimal setup. Build yourself a good working environment. In this howto I will refer to the following default configuration:
2. Install Nagiosmonitor:~# apt-get install nagios3 nagios-plugins nagios-nrpe-plugin In the process of installing you get asked for samba workgroup and WINS Settings just let these set on default.
3. Putting Up A Basic Nagios Configuration On The Monitoring HostTo get access to the Nagios Configuration Page we have to set the password for the nagiosadmin user: monitor:~# htpasswd -c /etc/nagios3/htpasswd.users nagiosadmin After this you should be able to login to: http://10.10.10.105/nagios3/ with the username nagiosadmin and the password you just set before. If you go to the service detail site you will see that Nagios provides already a basic configuration for the localhost.
4. Install A Webserver On The Example Serverserver1:~# apt-get install apache2
5. Create A New Config File On The Nagios Hostmonitor:~# nano /etc/nagios3/conf.d/server1_nagios2.cfg define host{
use generic-host
host_name server1
alias server1
address 10.10.10.100
}
define service{
use generic-service
host_name server1
service_description HTTP-Server
check_command check_http
}
Restart the nagios service with: monitor:~# /etc/init.d/nagios3 restart The 'use' variable in every object here indicates which template is used. The generic-host object can be found in the file /etc/nagios3/generic-host_nagios2.cfg, while the generic-service is determined in the file /etc/nagios3/generic-service_nagios2.cfg. You should now be able to see the server1 and http service on the Service Detail Site of Nagios.
6. Prepare nrpe Client On server1 To Submit More Data To NagiosWe have to change the nrpe config of the server we want to overwatch, first change the line for the allowed host (line 79 by default): server1:~# nano /etc/nagios/nrpe.cfg From allowed_hosts=127.0.0.1 to allowed_hosts=10.10.10.105 Restart the nrpe service on server1: server1:~# /etc/init.d/nagios-nrpe-server restart Check the nrpe-service by hand before we continue to change the config. We do this from our Nagios host. monitor:~# cd /usr/lib/nagios/plugins/ The output should be something like this: USERS OK - 2 users currently logged in |users=2;5;10;0
|



Recent comments
16 hours 2 min ago
18 hours 57 min ago
20 hours 11 min ago
21 hours 34 min ago
23 hours 12 min ago
1 day 41 min ago
1 day 1 hour ago
1 day 17 hours ago
1 day 18 hours ago
1 day 22 hours ago