<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Unix Surgeon &#187; Monitoring Tool</title>
	<atom:link href="http://www.unixsurgeon.com/kb/category/monitoring-tool/feed" rel="self" type="application/rss+xml" />
	<link>http://www.unixsurgeon.com/kb</link>
	<description>Linux Hosting Solution, Linux Web Hosting Solution, Learn Linux, How to, Server Management , Web Hosting Solution , Linux Solution , KnowledgeBase , Linux Tutorial</description>
	<lastBuildDate>Mon, 06 Feb 2012 10:42:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to install MRTG (Multi Router Traffic Grapher).</title>
		<link>http://www.unixsurgeon.com/kb/how-to-install-mrtg-multi-router-traffic-grapher.html</link>
		<comments>http://www.unixsurgeon.com/kb/how-to-install-mrtg-multi-router-traffic-grapher.html#comments</comments>
		<pubDate>Fri, 30 Dec 2011 12:55:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux tutorials]]></category>
		<category><![CDATA[Monitoring Tool]]></category>
		<category><![CDATA[Open Source Applications]]></category>
		<category><![CDATA[MRTG]]></category>

		<guid isPermaLink="false">http://www.unixsurgeon.com/kb/?p=306</guid>
		<description><![CDATA[Most of the times people probably wonder how much traffic is flowing through servers. At this point, you probably want to monitor how much bandwidth you are using. One of the best tools you can use is MRTG (Multi Router Traffic Grapher). It is not very hard to setup MRTG and requires only few packages [...]]]></description>
			<content:encoded><![CDATA[<p>Most of the times people probably wonder how much traffic is flowing through servers. At this point, you probably want to monitor how much bandwidth you are using. One of the best tools you can use is<strong> MRTG (Multi Router Traffic Grapher)</strong>. It is not very hard to setup MRTG and requires only few packages to be installed.</p>
<p>First of all we have to install SNMP service.</p>
<p><strong>[root@p-root /opt]# rpm -qa | grep snmp</strong></p>
<p><strong>[root@p-root /opt]# yum install net-snmp net-snmp-utils</strong></p>
<p><strong>[root@p-root /opt]# service snmpd start</strong></p>
<p><strong>[root@p-root /opt]# chkconfig –add snmpd</strong></p>
<p><strong>[root@p-root /opt]# chkconfig –levels 2345 snmpd on</strong></p>
<p>Run this command,whether is&#8217;t working or not,if you get the below output means it&#8217;s working:</p>
<p><strong>[root@p-root /opt]# snmpwalk -v 1 -c public localhost IP-MIB::ipAdEntIfIndex<br />
</strong><br />
IP-MIB::ipAdEntIfIndex.127.0.0.1 = INTEGER: 1</p>
<p>IP-MIB::ipAdEntIfIndex.192.168.0.128 = INTEGER: 2</p>
<p>Now configure snmpd.conf file. Please take backup of default snmpd.conf file and create new one.</p>
<p><strong>[root@p-root /opt]# mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.bak</strong></p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-7877248176171699";
google_ad_slot = "4635030684";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p><strong><br />
[root@p-root /opt]# vi /etc/snmp/snmpd.conf</strong></p>
<p>Replace the content in there with following:-</p>
<p><strong>com2sec local localhost public<br />
com2sec mynetwork 192.168.0.0/24 public<br />
group MyRWGroup v1 local<br />
group MyRWGroup v2c local<br />
group MyRWGroup usm local<br />
group MyROGroup v1 mynetwork<br />
group MyROGroup v2c mynetwork<br />
group MyROGroup usm mynetwork<br />
view all included .1 80<br />
access MyROGroup &#8220;&#8221; any noauth exact all none none<br />
access MyRWGroup &#8220;&#8221; any noauth exact all all none<br />
syslocation &#8220;Some place out there&#8221;<br />
syscontact Admin &lt;admin@unixsurgeon.com&gt;</strong></p>
<p><strong>Here i am sharing my configuration file  :-</strong></p>
<p>##########################################################</p>
<p>#</p>
<p># snmpd.conf</p>
<p>#</p>
<p># – created by the snmpconf configuration program</p>
<p>#</p>
<p>##########################################################</p>
<p># SECTION: Access Control Setup</p>
<p>#</p>
<p># This section defines who is allowed to talk to your running</p>
<p># snmp agent.</p>
<p># rocommunity: a SNMPv1/SNMPv2c read-only access community name</p>
<p># arguments: community [default|hostname|network/bits] [oid]</p>
<p>com2sec local localhost private</p>
<p>com2sec mynetwork 192.168.0.0/24 public</p>
<p>com2sec mynetwork 115.110.x.x/32 public</p>
<p>group MyRWGroup v1 local</p>
<p>group MyRWGroup v2c local</p>
<p>group MyRWGroup usm local</p>
<p>group MyROGroup v1 mynetwork</p>
<p>group MyROGroup v2c mynetwork</p>
<p>group MyROGroup usm mynetwork</p>
<p>view     all        included         .1         80</p>
<p>access MyROGroup  ” “  any noauth exact all none none</p>
<p>access MyRWGroup  ” “  any noauth exact all all none</p>
<p>syslocation Linux (RH3_UP2), Linux Router.</p>
<p><strong>[root@p-root /opt]# service snmpd restart</strong></p>
<p>Now test your SNMP server.</p>
<p><strong>[root@p-root /opt]# snmpwalk -v 1 -c public localhost IP-MIB::ipAdEntIfIndex</strong></p>
<p>IP-MIB::ipAdEntIfIndex.127.0.0.1 = INTEGER: 1</p>
<p>IP-MIB::ipAdEntIfIndex.192.168.0.128 = INTEGER: 2</p>
<p>Ok. That is all we will do with SNMP. Let us continue MRTG installation.</p>
<p><strong>[root@p-root /opt]# rpm -qa | grep mrtg</strong></p>
<p><strong>[root@p-root /opt]# yum install mrtg</strong></p>
<p>Let us set up data directory to store html files:</p>
<p><strong>[root@p-root /opt]# mkdir /var/www/html/mrtg</strong></p>
<p>Now let us set up mrtg.conf to use for monitoring bandwidth usage:</p>
<p><strong>[root@p-root /opt]# cfgmaker public@192.168.0.128 –global “WorkDir: /var/www/html/mrtg” –output=/etc/mrtg/mrtg.cfg</strong></p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-7877248176171699";
google_ad_slot = "4635030684";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p>Let us create index file for MRTG page:</p>
<p><strong>[root@p-root /opt]# indexmaker –output=/var/www/html/mrtg/index.html /etc/mrtg/mrtg.cfg<br />
</strong><br />
It is time for us to tell Apache to serve these pages</p>
<p><strong>[root@p-root /opt]# vi /usr/local/apache2/conf/httpd.conf</strong></p>
<p><strong>Alias /mrtg /var/www/html/mrtg<br />
&lt;location /mrtg&gt;<br />
Order deny,allow<br />
Deny from all<br />
Allow from 127.0.0.1 192.168.0.0/24<br />
&lt;/location&gt;</strong></p>
<p><strong>[root@p-root /opt]# snmpwalk -v 1 -c public 192.168.0.128 interface</strong></p>
<p><strong>[root@p-root /opt]# env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg</strong></p>
<p><strong>[root@p-root /opt]# crontab -e</strong></p>
<p><strong>*/5 * * * * /usr/bin/mrtg /etc/mrtg/mrtg.cfg –logging /var/log/mrtg.log<br />
</strong><br />
Open this link in your browser and it will show like this.</p>
<p>http://192.168.0.128/mrtg</p>
<p><img src="http://www.unixsurgeon.com/images/mrtg.png" alt="mrtg" /><br />
<strong>Protect your MRTG graphs with password protected directory :-</strong></p>
<p>To restrict access to your MRTG reports. This can easily accomplished with Apache webserver&#8217;s .htaccess file.</p>
<p>Below is process to protect graphs using apache&#8217;s .htaccess file and htpasswd command:</p>
<p>Step # 1: Create .htaccess file in /var/www/html/mymrtg/ directory (add text as follows):</p>
<p>[root@p-root /]# vi /var/www/html/mymrtg/.htaccess</p>
<p>Then Add following text to file:-</p>
<p><strong>AuthName &#8220;MRTG Graphs Restricted Access&#8221;<br />
AuthType Basic<br />
AuthUserFile /var/members/.htpasswd<br />
require user unixsurgeon</strong></p>
<p>Step # 2: Create a user and password name (-c assumes first time you are using .htpasswd file):-</p>
<p><strong>[root@p-root /]# htpasswd -c /var/members/.htpasswd unixsurgeon</strong></p>
<p>=============================================================================================</p>
<p>Enjoy Linux !!!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixsurgeon.com/kb/how-to-install-mrtg-multi-router-traffic-grapher.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to setup Zabbix on fedora/Centos.</title>
		<link>http://www.unixsurgeon.com/kb/how-to-setup-zabbix-on-fedoracentos.html</link>
		<comments>http://www.unixsurgeon.com/kb/how-to-setup-zabbix-on-fedoracentos.html#comments</comments>
		<pubDate>Thu, 14 Oct 2010 10:19:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux tutorials]]></category>
		<category><![CDATA[Monitoring Tool]]></category>
		<category><![CDATA[Open Source Applications]]></category>
		<category><![CDATA[monotorning tool]]></category>
		<category><![CDATA[open sources monitoring tool]]></category>
		<category><![CDATA[zabbix]]></category>

		<guid isPermaLink="false">http://www.unixsurgeon.com/kb/?p=181</guid>
		<description><![CDATA[The Ultimate Open Source Monitoring Solution:-
ZABBIX is software that monitors numerous parameters of a network and the health and integrity of servers. ZABBIX uses a flexible notification mechanism that allows users to configure e-mail based alerts for virtually any event. This allows a fast reaction to server problems. ZABBIX offers excellent reporting and data visualisation [...]]]></description>
			<content:encoded><![CDATA[<p>The Ultimate Open Source Monitoring Solution:-</p>
<p>ZABBIX is software that monitors numerous parameters of a network and the health and integrity of servers. ZABBIX uses a flexible notification mechanism that allows users to configure e-mail based alerts for virtually any event. This allows a fast reaction to server problems. ZABBIX offers excellent reporting and data visualisation features based on the stored data. This makes ZABBIX ideal for capacity planning.</p>
<p>ZABBIX supports both polling and trapping. All ZABBIX reports and statistics, as well as configuration parameters are accessed through a web-based front end. A web-based front end ensures that the status of your network and the health of your servers can be assessed from any location. Properly configured, ZABBIX can play an important role in monitoring IT infrastructure. This is equally true for small organisations with a few servers and for large companies with a multitude of servers.</p>
<p>Setup Zabbix with mysql support only in 15 minutes.</p>
<p>Step 1 :-</p>
<p>Install Apache and MSSQL server through Yum :-</p>
<p># yum install mysql-server httpd</p>
<p># service mysqld start</p>
<p># service httpd start</p>
<p>Set Mysql root password (Default root password is null)</p>
<p># mysqladmin –u root password NEWPASSWORD</p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-7877248176171699";
google_ad_slot = "4635030684";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p>Step 2 :-</p>
<p>Install Zabbix server , web, agent packages through yum repository.</p>
<p># yum install zabbix (It will install zabbix,zabbix-web-mysql.noarch,zabbix-agent &amp; zabbix-server)</p>
<p># cd /usr/share/doc/zabbix</p>
<p># mysql -uroot -p password</p>
<p>mysql &gt; create database zabbix;</p>
<p>mysql &gt; quit;</p>
<p># cd create/schema</p>
<p># cat mysql.sql | mysql -u root -p password  zabbix</p>
<p># cd ../data</p>
<p># cat data.sql | mysql -u root -p password  zabbix</p>
<p># cat images_mysql.sql | mysql -u root -p password  zabbix</p>
<p>Edit the below mentioned files</p>
<p>Configure /etc/zabbix/zabbix_agent.conf</p>
<p>Configure /etc/zabbix/zabbix_agentd.conf</p>
<p>Configure /etc/zabbix/zabbix_server.conf</p>
<p># service zabbix-server start</p>
<p># service zabbix-agent start</p>
<p># service httpd restart</p>
<p>Step 3 :-</p>
<p>Go to web interface and  http://localhost/zabbix or http://ipaddress/zabbix</p>
<p>And follow the instructions mentioned there</p>
<p>Zabbix frontend is ready! Default user name is Admin, password null.</p>
<p><img class="aligncenter" title="zab1" src="http://www.unixsurgeon.com/kb/zab1.png" alt="" width="800" height="580" /></p>
<p><a title="&quot;1.8:manual:installation:installation_01_introduction.png&quot; " href="http://www.zabbix.com/documentation/_detail/1.8/manual/installation/installation_01_introduction.png?id=1.8%3Amanual%3Ainstallation"></a></p>
<p><strong>Step 2</strong><strong> </strong></p>
<p>Read and accept GPL v2.</p>
<p><a title="&quot;1.8:manual:installation:installation_2_licence.png&quot; " href="http://www.zabbix.com/documentation/_detail/1.8/manual/installation/installation_2_licence.png?id=1.8%3Amanual%3Ainstallation"></a><img class="aligncenter" title="zab2" src="http://www.unixsurgeon.com/kb/zab2.png" alt="" width="800" height="580" /></p>
<p><strong>Step 3</strong><strong> </strong></p>
<p>Make sure that all software pre-requisites are met.</p>
<p><a title="&quot;1.8:manual:installation:installation_3_prereq.png&quot; " href="http://www.zabbix.com/documentation/_detail/1.8/manual/installation/installation_3_prereq.png?id=1.8%3Amanual%3Ainstallation"></a><img class="aligncenter" title="zab3" src="http://www.unixsurgeon.com/kb/zab3.png" alt="" width="800" height="580" /></p>
<table border="0" cellpadding="0">
<tbody>
<tr>
<td>
<p align="center"><strong>Pre-requisite</strong></p>
</td>
<td>
<p align="center"><strong>Minimum   value</strong></p>
</td>
<td>
<p align="center"><strong>Description</strong></p>
</td>
</tr>
<tr>
<td><strong>PHP version</strong></td>
<td>5.0</td>
<td></td>
</tr>
<tr>
<td><strong>PHP Memory limit</strong></td>
<td>8MB</td>
<td>In php.ini:<br />
memory_limit = 128M</td>
</tr>
<tr>
<td><strong>PHP post max size</strong></td>
<td>8MB</td>
<td>In php.ini:<br />
post_max_size = 8M</td>
</tr>
<tr>
<td><strong>PHP max execution time</strong></td>
<td>300 seconds</td>
<td>In php.ini:<br />
max_execution_time = 300</td>
</tr>
<tr>
<td><strong>PHP database support</strong></td>
<td>One of: MySQL, Oracle, PostgreSQL,   SQLite</td>
<td>One of the following modules must   be installed:<br />
php-mysql, php-sqlora8, php-pgsql, php-sqlite3</td>
</tr>
<tr>
<td><strong>PHP BC math </strong></td>
<td>Any</td>
<td>Compiled in PHP5.</td>
</tr>
<tr>
<td><strong>GD Version</strong></td>
<td>2.0 or higher</td>
<td>Module php-gd.</td>
</tr>
<tr>
<td><strong>Image formats</strong></td>
<td>At least PNG</td>
<td>Module php-gd.</td>
</tr>
</tbody>
</table>
<p><strong>Step 4</strong><strong> </strong></p>
<p>Configure database settings. Zabbix database must already be created.</p>
<p><a title="&quot;1.8:manual:installation:installation_4_db.png&quot; " href="http://www.zabbix.com/documentation/_detail/1.8/manual/installation/installation_4_db.png?id=1.8%3Amanual%3Ainstallation"></a><img class="aligncenter" title="zab4" src="http://www.unixsurgeon.com/kb/zab4.png" alt="" width="800" height="580" /></p>
<p><strong>Step 5</strong><strong> </strong></p>
<p>Enter Zabbix Server details.</p>
<p><a title="&quot;1.8:manual:installation:installation_5_server.png&quot; " href="http://www.zabbix.com/documentation/_detail/1.8/manual/installation/installation_5_server.png?id=1.8%3Amanual%3Ainstallation"></a><img class="aligncenter" title="zab5" src="http://www.unixsurgeon.com/kb/zab5.png" alt="" width="800" height="580" /></p>
<p><strong>Step 6</strong><strong> </strong></p>
<p>See summary of settings.</p>
<p><a title="&quot;1.8:manual:installation:installation_6_summary.png&quot; " href="http://www.zabbix.com/documentation/_detail/1.8/manual/installation/installation_6_summary.png?id=1.8%3Amanual%3Ainstallation"></a><img class="aligncenter" title="zab6" src="http://www.unixsurgeon.com/kb/zab6.png" alt="" width="800" height="580" /></p>
<p><strong>Step 7</strong><strong> </strong></p>
<p>Download configuration file and place it under conf/.</p>
<p><a title="&quot;1.8:manual:installation:installation_7_install.png&quot; " href="http://www.zabbix.com/documentation/_detail/1.8/manual/installation/installation_7_install.png?id=1.8%3Amanual%3Ainstallation"></a><img class="aligncenter" title="zab7" src="http://www.unixsurgeon.com/kb/zab7.png" alt="" width="800" height="580" /></p>
<p><img class="aligncenter" title="zab8" src="http://www.unixsurgeon.com/kb/zab8.png" alt="" width="381" height="292" /></p>
<p><strong>Step 8</strong><strong> </strong></p>
<p>Finishing installation.</p>
<p><a title="&quot;1.8:manual:installation:installation_7_install2.png&quot; " href="http://www.zabbix.com/documentation/_detail/1.8/manual/installation/installation_7_install2.png?id=1.8%3Amanual%3Ainstallation"></a><img class="aligncenter" title="zab9" src="http://www.unixsurgeon.com/kb/zab9.png" alt="" width="800" height="580" /></p>
<p><img class="aligncenter" title="zab10" src="http://www.unixsurgeon.com/kb/zab10.png" alt="" width="800" height="580" /></p>
<p><strong>Step 9</strong><strong> </strong></p>
<p>For distributed monitoring only!</p>
<p>If used in a distributed environment you have to run:</p>
<p>shell&gt; ./zabbix_server –n &lt;nodeid&gt;</p>
<p>where Node ID is an unique Node identificator. For example:</p>
<p>shell&gt; ./zabbix_server –n 1</p>
<p>This will convert database data for use with Node ID &#8216;1&#8242; and also adds a local node.</p>
<p><strong>Step 10</strong><strong> </strong></p>
<p>Zabbix frontend is ready! Default user name is <strong>Admin</strong>, password <strong>null/blank</strong>.</p>
<p><a title="&quot;1.8:manual:installation:frontend_first_login_page.png&quot; " href="http://www.zabbix.com/documentation/_detail/1.8/manual/installation/frontend_first_login_page.png?id=1.8%3Amanual%3Ainstallation"></a><img class="aligncenter" title="zab11" src="http://www.unixsurgeon.com/kb/zab11.png" alt="" width="800" height="580" /></p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-7877248176171699";
google_ad_slot = "4635030684";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p>Enjoy Linux&#8230;!!!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixsurgeon.com/kb/how-to-setup-zabbix-on-fedoracentos.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to install Nagios on Redhat/fedora/CentOS..</title>
		<link>http://www.unixsurgeon.com/kb/how-to-install-nagios-on-redhatfedoracentos.html</link>
		<comments>http://www.unixsurgeon.com/kb/how-to-install-nagios-on-redhatfedoracentos.html#comments</comments>
		<pubDate>Sun, 18 Jul 2010 11:30:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Monitoring Tool]]></category>
		<category><![CDATA[Open Source Applications]]></category>
		<category><![CDATA[free monitoring tool]]></category>
		<category><![CDATA[free monitoring tool for windows & linux]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[open sources monitoring application]]></category>

		<guid isPermaLink="false">http://www.unixsurgeon.com/kb/?p=86</guid>
		<description><![CDATA[Hi,
Today I was hunting about monitoring tool in linux and found lots of monitoring tools (i.e. Nagios, openNMS, Cacti,Centreon etc..) And I try to install nagios. You can also install nagios by following steps :-
Prerequisites:
1. Apache
2. PHP
3. GCC compiler
4. GD development libraries
5. PERL Modules
6. RRDTOOL
And you can install these packages through yum:-



[root@p-root]# yum install httpd
[root@p-root]# [...]]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>Today I was hunting about monitoring tool in linux and found lots of monitoring tools (i.e. Nagios, openNMS, Cacti,Centreon etc..) And I try to install nagios. You can also install nagios by following steps :-</p>
<p>Prerequisites:</p>
<p>1. Apache<br />
2. PHP<br />
3. GCC compiler<br />
4. GD development libraries<br />
5. PERL Modules<br />
6. RRDTOOL</p>
<p>And you can install these packages through yum:-</p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-7877248176171699";
google_ad_slot = "4635030684";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p>[root@p-root]# yum install httpd</p>
<p>[root@p-root]# yum install php php-mysql php-gd php-ldap php-xml</p>
<p>[root@p-root]# yum install gd  gd-devel</p>
<p>[root@p-root]# yum install gcc  glibc  glibc-common libstdc++-devel gcc-c++</p>
<p>[root@p-root]# yum install install perl-DBI perl-DBD-MySQL</p>
<p>[root@p-root]# yum install install perl-Config-IniFiles</p>
<p>[root@p-root]# yum install install rrdtool perl-rrdtool</p>
<p>Now create new nagios user account and give it password….</p>
<p>[root@p-root]#  useradd  nagios</p>
<p>[root@p-root]#   passwd nagios</p>
<p>Now create nagcmd group for external commands to be submitted through the web interface. Add both the nagios user and the apache user to the group.</p>
<p>[root@p-root]# groupadd  nagcmd</p>
<p>[root@p-root]# usermod –a –G  nagcmd nagios</p>
<p>[root@p-root]# usermod –a –G nagcmd apache</p>
<p>Now download Nagios and Nagios-Plugins :-</p>
<p>[root@p-root]# wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.2.1.tar.gz</p>
<p>[root@p-root]# wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.11.tar.gz</p>
<p>[root@p-root]# tar –zxvf nagios-3.2.1.tar.gz</p>
<p>[root@p-root]#  cd  nagios-3.2.1</p>
<p>[root@p-root]# ./configure  &#8211; -with-command-group=nagcmd</p>
<p>[root@p-root]#  make all</p>
<p>[root@p-root]#  make install</p>
<p>[root@p-root]# make install-init</p>
<p>[root@p-root]# make install-config</p>
<p>[root@p-root]# make install-commandmode</p>
<p>[root@p-root]# make install-webconf</p>
<p>(it will create nagios web config file in apache conf.d direcotry)<br />
Now create nagiosadmin account for nagios web interface.</p>
<p>[root@p-root]#  htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin</p>
<p>Password:</p>
<p>[root@p-root]#  /etc/init.d/httpd  restart</p>
<p>Now install nagios-plugin.</p>
<p>[root@p-root]# tar –zxvf nagios-plugins-1.4.11.tar.gz</p>
<p>[root@p-root]# cd nagios-plugins-1.4.11</p>
<p>[root@p-root]# ./configure  –with-nagios-user=nagios –with-nagio-group=nagios</p>
<p>[root@p-root]# make</p>
<p>[root@p-root]# make install</p>
<p>Now you have installed all the required packages and services.<br />
Now start nagios.</p>
<p>[root@p-root]#  chkconfig  –add nagios</p>
<p>[root@p-root]#  chkconfig nagios on</p>
<p>Verify your nagios config file.</p>
<p>[root@p-root]#  /usr/local/nagios/bin/nagios  -v  /usr/local/nagios/etc/nagios.cfg</p>
<p>If there is no error it means your nagios configuration is correct and you can start nagios service.</p>
<p>[root@p-root]#  /etc/init.d/nagios  start</p>
<p>Now access your nagios web interface :-</p>
<p>http://localhost/nagios</p>
<p>==============================================</p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-7877248176171699";
google_ad_slot = "4635030684";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p>NRPE  Installation and Setup:-</p>
<p>Download and Install NRPE</p>
<p>You may download nrpe from http://www.nagios.org/download/download.php</p>
<p>[root@p-root~]# wget http://prdownloads.sourceforge.net/sourceforge/nagios/nrpe-2.12.tar.gz</p>
<p>Extract the Files:</p>
<p>[root@p-root~]# tar -xzf nrpe-2.12.tar.gz<br />
[root@p-root~]# cd nrpe-2.12</p>
<p>Compile and Configure NRPE</p>
<p>You need the openssl-devel package installed to compile NRPE with ssl support.  So make sure that open ssl is already installed on the server.</p>
<p>Install NRPE:</p>
<p>[root@p-root~]# ./configure</p>
<p>General Options:</p>
<p>————————-<br />
NRPE port: 5666<br />
NRPE user: nagios<br />
NRPE group: nagios<br />
Nagios user: nagios<br />
Nagios group: nagios</p>
<p>[root@p-root~]# make all</p>
<p>[root@p-root~]# make install-plugin</p>
<p>[root@p-root~]# make install-daemon</p>
<p>[root@p-root~]# make install-daemon-config</p>
<p>[root@p-root~]# make install-xinetd</p>
<p>Post NRPE Configuration</p>
<p>Edit Xinetd NRPE entry:</p>
<p>Add Nagios Monitoring server to the “only_from” directive</p>
<p>[root@p-root~]# vi /etc/xinetd.d/nrpe</p>
<p>Entry will be like this:-</p>
<p>service nrpe<br />
{<br />
flags           = REUSE<br />
socket_type     = stream<br />
port            = 5666<br />
wait            = no<br />
user            = nagios<br />
group           = nagios<br />
server          = /usr/local/nagios/bin/nrpe<br />
server_args     = -c /etc/nrpe.conf –inetd<br />
log_on_failure  += USERID<br />
disable         = no<br />
#       only_from       = 127.0.0.1<br />
}</p>
<p>only_from = 127.0.0.1</p>
<p>Edit services file entry:</p>
<p>Add entry for nrpe daemon</p>
<p>[root@p-root~]# vi /etc/services</p>
<p>nrpe 5666/tcp # NRPE</p>
<p>Restart Xinetd and Set to start at boot:</p>
<p>[root@p-root~]# chkconfig xinetd on</p>
<p>[root@p-root~]# service xinetd restart</p>
<p>Test NRPE Daemon Install</p>
<p>Check NRPE daemon is running and listening on port 5666:</p>
<p>[root@p-root~]# netstat -at |grep nrpe</p>
<p>Output should be:-</p>
<p>tcp 0 0 *:nrpe *.* LISTEN</p>
<p>or</p>
<p>[root@p-root]# netstat -plan | grep 5666</p>
<p>tcp        0      0 0.0.0.0:5666                0.0.0.0:*                   LISTEN      15721/xinetd</p>
<p>Check NRPE daemon is functioning:</p>
<p>[root@p-root]# /usr/local/nagios/libexec/check_nrpe -H localhost</p>
<p>Output should be NRPE version:</p>
<p>NRPE v2.12</p>
<p>======================================================================</p>
<p>Enjoy Linux !!!</p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-7877248176171699";
google_ad_slot = "4635030684";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixsurgeon.com/kb/how-to-install-nagios-on-redhatfedoracentos.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

