Main Page/Nagios Server Tetra: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
[[category:Tetra Local]] | [[category:Tetra Local]] | ||
==Nagios Server Deployment at Tetra office for Remote Monitoring of Clients == | |||
'''Downloading The Latest Version :-''' | '''Downloading The Latest Version :-''' | ||
You can check for new versions of Nagios 3.x.x at http://www.nagios.org/download/ | You can check for new versions of Nagios 3.x.x at http://www.nagios.org/download/ | ||
Latest revision as of 03:27, 5 January 2013
Nagios Server Deployment at Tetra office for Remote Monitoring of Clients[edit]
Downloading The Latest Version :- You can check for new versions of Nagios 3.x.x at http://www.nagios.org/download/
Pre-list activity in terms of packages for Nagios
# yum install httpd php # yum install gcc glibc glibc-common # yum install gd gd-devel
Pre-list activity in terms of compiling Nagios:-
# useradd -m nagios # # passwd nagios ( we have give a password nagios) # groupadd nagcmd # usermod -a -G nagcmd nagios # usermod -a -G nagcmd apache
# mkdir /downloads # cd /downlaods # wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.2.x.tar.gz # wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.16.tar.gz
Run the Nagios configure script, passing the name of the group you created earlier like so:
# tar xzf nagios-3.x.tar.gz # cd nagios-3.x # ./configure --with-command-group=nagcmd # make all # make install # make install-init # make install-config # make install-commandmode # make install-webconf
Don’t start Nagios yet - there’s still more that needs to be done...
Create a nagiosadmin account for logging into the Nagios web interface. Remember the password you assign to this account - you’ll need it later.
# htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin (Note:- admin is the password we are using)
Restart Apache to make the new settings take effect.
# service httpd restart
Restart Nagios. Linux users should use
# /etc/init.d/nagios restart.
Compile and Configure Nagios Plugins
# yum install openssl-devel
Extract the Nagios plugins source code tarball. # cd /downloads # tar xzf nagios-plugins-1.4.11.tar.gz # cd nagios-plugins-1.4.11
Install the plugins.
# ./configure --with-nagios-user=nagios –with-nagios-group=nagios
OR if you get some error in the above command go with this command
# ./configure --with-nagios-user=nagios --with-nagios-group=nagios --enable-redhat-pthread-workaround # make # make install
Add Nagios to the list of system services and have it automatically start when the system boots.
# chkconfig --add nagios # chkconfig nagios on
Verify the sample Nagios configuration files.
# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg ( This is a test command to Verify your configuration files. Correct any errors shown here before proceeding with the next step.)
If there are no errors, start Nagios. # service nagios start
Login to the Web Interface (You should now be able to access the Nagios web interface at the URL below. You’ll be prompted for the username (nagiosadmin) and password you specified earlier. )
http://192.168.1.14
To Install check_nrpe service on the nagios server
Install xinetd # yum install xinetd If Alredy install not need to follow following process.
Install the NRPE daemon
# cd /downloads # wget http://osdn.dl.sourceforge.net/sourceforge/nagios/nrpe-2.8.tar.gz Extract the NRPE source code tarball. # tar xzf nrpe-2.14.tar.gz # cd nrpe-2.14 # Compile the NRPE addon. #./configure # make all Install the NRPE plugin (for testing), daemon, and sample daemon config file. # make install-plugin # make install-daemon # make install-daemon-config Install the NRPE daemon as a service under xinetd. # make install-xinetd Edit the /etc/xinetd.d/nrpe file and add the IP address of the monitoring server to the only_from directive. only_from = 127.0.0.1 <nagios_server_ip_address>
Add the following entry for the NRPE daemon to the /etc/services file. # vim /etc/services nrpe 5666/tcp Restart the xinetd service. # service xinetd restart Go to location # cd /usr/local/nagios/libexec/ run the command # ./check_nrpe -H localhost it will show the version of the nrpe NRPE v2.14