<?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>nagios 4 Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/nagios-4/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Mon, 11 Nov 2019 11:42:26 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>How To Install Nagios 4 on Centos 8 / RHEL 8.</title>
		<link>https://www.osradar.com/how-to-install-nagios-4-on-centos-8-rhel-8/</link>
					<comments>https://www.osradar.com/how-to-install-nagios-4-on-centos-8-rhel-8/#respond</comments>
		
		<dc:creator><![CDATA[sabi]]></dc:creator>
		<pubDate>Mon, 11 Nov 2019 11:42:23 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[Centos 8]]></category>
		<category><![CDATA[Dnf tools]]></category>
		<category><![CDATA[how to install nagios]]></category>
		<category><![CDATA[nagios 4]]></category>
		<category><![CDATA[Nagios Plugins]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[RHEL]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=15465</guid>

					<description><![CDATA[<p>Nagios is network monitoring tool. In this tutorial, we will learn how to Install and configure Nagious 4 on Centos / RHEL 8. Nagious is configured using text files &#38; provides web interface for ease to use for administration and Monitoring. Just follow these steps to quickly install &#38; configure Nagious 4: Pre-requisites: SELinux (Passive [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-nagios-4-on-centos-8-rhel-8/">How To Install Nagios 4 on Centos 8 / RHEL 8.</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Nagios is network monitoring tool. In this tutorial, we will learn how to Install and configure Nagious 4 on Centos  / RHEL  8. Nagious is configured using text files &amp; provides web interface for ease to use for administration and Monitoring. Just follow these steps to quickly install &amp; configure Nagious 4: </p>



<h3><strong>Pre-requisites:</strong></h3>



<ul><li><strong>SELinux (Passive mode):</strong></li></ul>



<pre class="wp-block-verse">sudo sed -i 's/SELINUX=.*/SELINUX=permissive/g' /etc/selinux/config<br>sudo setenforce 0</pre>



<h3><strong>Step 1: Installing Dependencies</strong></h3>



<p>Update your system.</p>



<pre class="wp-block-verse">sudo dnf updates</pre>



<p>Install required Dependencies.</p>



<pre class="wp-block-verse">sudo dnf install @php<br>
sudo dnf install @perl @httpd wget unzip glibc automake glibc-common gettext autoconf php php-cli gcc gd gd-devel net-snmp openssl-devel unzip net-snmp postfix net-snmp-utils</pre>



<p>Guide for <a href="https://www.osradar.com/how-to-install-gcc-development-tools-on-centos-8-rhel-8/">Installing Development Tools on RHEL 8 / Cento 8.</a></p>



<pre class="wp-block-verse">sudo dnf groupinstall "Development Tools"</pre>



<p>Now, start and enable httpd and php-fpm services.</p>



<pre class="wp-block-verse">sudo systemctl enable --now httpd php-fpm</pre>



<p>Checki status is running.</p>



<pre class="wp-block-verse">systemctl status http php-fpm</pre>



<div class="wp-block-image"><figure class="aligncenter"><img loading="lazy" width="736" height="498" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/11/php-httpd-status.png" alt="" class="wp-image-15467" srcset="https://www.osradar.com/wp-content/uploads/2019/11/php-httpd-status.png 736w, https://www.osradar.com/wp-content/uploads/2019/11/php-httpd-status-300x203.png 300w, https://www.osradar.com/wp-content/uploads/2019/11/php-httpd-status-696x471.png 696w, https://www.osradar.com/wp-content/uploads/2019/11/php-httpd-status-621x420.png 621w" sizes="(max-width: 736px) 100vw, 736px" /></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><img loading="lazy" width="727" height="313" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/11/php-fpm-services.png" alt="" class="wp-image-15468" srcset="https://www.osradar.com/wp-content/uploads/2019/11/php-fpm-services.png 727w, https://www.osradar.com/wp-content/uploads/2019/11/php-fpm-services-300x129.png 300w, https://www.osradar.com/wp-content/uploads/2019/11/php-fpm-services-696x300.png 696w" sizes="(max-width: 727px) 100vw, 727px" /></figure></div>



<p>Detailed instructions for the  Installation of<a href="https://www.osradar.com/how-to-install-cacti-on-centos-rhel-8/"> PHP</a> and <a href="https://www.osradar.com/how-to-install-cacti-on-centos-rhel-8/">httpd</a>.</p>



<h3><strong>Step 2: Downloading Nagios Core</strong></h3>



<p>Change  directory to <strong>/usr/src/</strong>. Go to <a href="https://github.com/NagiosEnterprises/nagioscore/releases">latest-release page of Nagios</a> to download.</p>



<pre class="wp-block-verse">sudo su -<br>cd /usr/src</pre>



<p>Create <strong>nagios-$VER</strong> directory.</p>



<p>Download &amp; extract Nagios tarball.</p>



<pre class="wp-block-verse"><a href="https://github.com/NagiosEnterprises/nagioscore/releases">https://github.com/NagiosEnterprises/nagioscore/releases</a></pre>



<p>Change path to created folder.</p>



<pre class="wp-block-verse">cd nagios-$VER</pre>



<h3><strong>Step 3: Compile Nagios Core on Centos 8 / RHEL 8.</strong></h3>



<p><strong>a.</strong> Run the configure script by command below:</p>



<pre class="wp-block-verse">./configure</pre>



<p>Output:</p>



<div class="wp-block-image"><figure class="aligncenter"><img loading="lazy" width="735" height="496" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/11/configure-summary-ngios.png" alt="" class="wp-image-15469" srcset="https://www.osradar.com/wp-content/uploads/2019/11/configure-summary-ngios.png 735w, https://www.osradar.com/wp-content/uploads/2019/11/configure-summary-ngios-300x202.png 300w, https://www.osradar.com/wp-content/uploads/2019/11/configure-summary-ngios-696x470.png 696w, https://www.osradar.com/wp-content/uploads/2019/11/configure-summary-ngios-622x420.png 622w" sizes="(max-width: 735px) 100vw, 735px" /></figure></div>



<p><strong>b.</strong> To compile the main program and CGIs, run the make command with <strong>all </strong>options.</p>



<pre class="wp-block-verse">sudo make all</pre>



<p>Output:</p>



<div class="wp-block-image"><figure class="aligncenter"><img loading="lazy" width="798" height="601" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/11/sudo-make-all-nagios.png" alt="" class="wp-image-15471" srcset="https://www.osradar.com/wp-content/uploads/2019/11/sudo-make-all-nagios.png 798w, https://www.osradar.com/wp-content/uploads/2019/11/sudo-make-all-nagios-300x226.png 300w, https://www.osradar.com/wp-content/uploads/2019/11/sudo-make-all-nagios-768x578.png 768w, https://www.osradar.com/wp-content/uploads/2019/11/sudo-make-all-nagios-80x60.png 80w, https://www.osradar.com/wp-content/uploads/2019/11/sudo-make-all-nagios-696x524.png 696w, https://www.osradar.com/wp-content/uploads/2019/11/sudo-make-all-nagios-558x420.png 558w" sizes="(max-width: 798px) 100vw, 798px" /></figure></div>



<p><strong>c.</strong> Create User And Group</p>



<p>This will create user and groups in Nagios</p>



<p>Add apache user to Nagios Group.</p>



<pre class="wp-block-verse">make install-groups-users<br>usermod -a -G nagios apache</pre>



<p><strong>d. </strong>Install Nagios on Centos / RHEL 8.</p>



<p>Install Nagios base.</p>



<pre class="wp-block-verse">make install</pre>



<div class="wp-block-image"><figure class="aligncenter"><img loading="lazy" width="790" height="579" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/11/make-install.png" alt="" class="wp-image-15473" srcset="https://www.osradar.com/wp-content/uploads/2019/11/make-install.png 790w, https://www.osradar.com/wp-content/uploads/2019/11/make-install-300x220.png 300w, https://www.osradar.com/wp-content/uploads/2019/11/make-install-768x563.png 768w, https://www.osradar.com/wp-content/uploads/2019/11/make-install-80x60.png 80w, https://www.osradar.com/wp-content/uploads/2019/11/make-install-696x510.png 696w, https://www.osradar.com/wp-content/uploads/2019/11/make-install-573x420.png 573w" sizes="(max-width: 790px) 100vw, 790px" /></figure></div>



<p><strong>e.</strong> Install the init script in <strong>/lib/systemd/system</strong>.</p>



<pre class="wp-block-verse">make install-init</pre>



<div class="wp-block-image"><figure class="aligncenter"><img loading="lazy" width="707" height="88" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/11/make-install-init.png" alt="" class="wp-image-15474" srcset="https://www.osradar.com/wp-content/uploads/2019/11/make-install-init.png 707w, https://www.osradar.com/wp-content/uploads/2019/11/make-install-init-300x37.png 300w, https://www.osradar.com/wp-content/uploads/2019/11/make-install-init-696x88.png 696w" sizes="(max-width: 707px) 100vw, 707px" /></figure></div>



<p><strong>f.</strong> Install and configure the permissions on the directory for holding the external command file.</p>



<pre class="wp-block-verse">make install-commandmode</pre>



<div class="wp-block-image"><figure class="aligncenter"><img loading="lazy" width="728" height="128" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/11/commandmode-config.png" alt="" class="wp-image-15475" srcset="https://www.osradar.com/wp-content/uploads/2019/11/commandmode-config.png 728w, https://www.osradar.com/wp-content/uploads/2019/11/commandmode-config-300x53.png 300w, https://www.osradar.com/wp-content/uploads/2019/11/commandmode-config-696x122.png 696w" sizes="(max-width: 728px) 100vw, 728px" /></figure></div>



<p><strong>g.</strong> Install sample config files in <strong>/usr/local/nagios/etc</strong>.</p>



<pre class="wp-block-verse">make install-config</pre>



<div class="wp-block-image"><figure class="aligncenter"><img loading="lazy" width="734" height="498" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/11/make-install-config.png" alt="" class="wp-image-15476" srcset="https://www.osradar.com/wp-content/uploads/2019/11/make-install-config.png 734w, https://www.osradar.com/wp-content/uploads/2019/11/make-install-config-300x204.png 300w, https://www.osradar.com/wp-content/uploads/2019/11/make-install-config-696x472.png 696w, https://www.osradar.com/wp-content/uploads/2019/11/make-install-config-619x420.png 619w" sizes="(max-width: 734px) 100vw, 734px" /></figure></div>



<p><strong>h.</strong> Install the Apache config file for the Nagios web interface.</p>



<pre class="wp-block-verse">make install-webconf</pre>



<div class="wp-block-image"><figure class="aligncenter"><img loading="lazy" width="740" height="202" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/11/make-install-webconfig.png" alt="" class="wp-image-15477" srcset="https://www.osradar.com/wp-content/uploads/2019/11/make-install-webconfig.png 740w, https://www.osradar.com/wp-content/uploads/2019/11/make-install-webconfig-300x82.png 300w, https://www.osradar.com/wp-content/uploads/2019/11/make-install-webconfig-696x190.png 696w" sizes="(max-width: 740px) 100vw, 740px" /></figure></div>



<p><strong>i.</strong> Install the Exfoliation theme for the Nagios web interface.</p>



<pre class="wp-block-verse">make install-exfoliation</pre>



<p><strong>j. </strong> You can install classic theme for Nagios web interface by given command</p>



<pre class="wp-block-verse">make install-classicui</pre>



<h3><strong>Step 4: Creating Nagios Web User</strong></h3>



<p>We need to create a user account for  Nagios web interface . Use the given command:</p>



<pre class="wp-block-verse">sudo htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin</pre>



<div class="wp-block-image"><figure class="aligncenter"><img loading="lazy" width="797" height="601" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/11/nagios-account-creation-users.png" alt="" class="wp-image-15480" srcset="https://www.osradar.com/wp-content/uploads/2019/11/nagios-account-creation-users.png 797w, https://www.osradar.com/wp-content/uploads/2019/11/nagios-account-creation-users-300x226.png 300w, https://www.osradar.com/wp-content/uploads/2019/11/nagios-account-creation-users-768x579.png 768w, https://www.osradar.com/wp-content/uploads/2019/11/nagios-account-creation-users-80x60.png 80w, https://www.osradar.com/wp-content/uploads/2019/11/nagios-account-creation-users-696x525.png 696w, https://www.osradar.com/wp-content/uploads/2019/11/nagios-account-creation-users-557x420.png 557w" sizes="(max-width: 797px) 100vw, 797px" /></figure></div>



<p>Restart Apache services to take effect.</p>



<pre class="wp-block-verse">systemctl restart httpd</pre>



<h3><strong>Step 5: Installing Nagios Plugins</strong></h3>



<p>Plugins are used to provide more monitoring features.<br>Switch to<strong> /usr/src</strong> directory.</p>



<pre class="wp-block-verse">cd /usr/src</pre>



<p>Create new directory as <strong>nagios-plugins-$VER</strong></p>



<pre class="wp-block-verse">mkdir nagios-plugins-$VER</pre>



<p>Download Nagios plugins from <a href="https://github.com/nagios-plugins/nagios-plugins/releases">Github releases page</a>.</p>



<p>Extract it to <strong>/usr/src/nagios-plugins-$VER</strong> directory.</p>



<p>Now, change directory to nagios-$VER.</p>



<pre class="wp-block-verse">cd 'nagios-$VER'</pre>



<p>Use this command to install and compile Nagios Plugins.</p>



<pre class="wp-block-verse">./configure --with-nagios-user=nagios --with--nagios-group=nagios<br>make &amp;&amp; make install</pre>



<p>Output:</p>



<div class="wp-block-image"><figure class="aligncenter"><img loading="lazy" width="727" height="496" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/11/nagios-plugin-result.png" alt="" class="wp-image-15486" srcset="https://www.osradar.com/wp-content/uploads/2019/11/nagios-plugin-result.png 727w, https://www.osradar.com/wp-content/uploads/2019/11/nagios-plugin-result-300x205.png 300w, https://www.osradar.com/wp-content/uploads/2019/11/nagios-plugin-result-218x150.png 218w, https://www.osradar.com/wp-content/uploads/2019/11/nagios-plugin-result-696x475.png 696w, https://www.osradar.com/wp-content/uploads/2019/11/nagios-plugin-result-616x420.png 616w" sizes="(max-width: 727px) 100vw, 727px" /></figure></div>



<h3><strong>Step 6: Verifying Installation &amp; Starting Nagios Services.</strong></h3>



<p>Make sure your Nagios installation is working properly.</p>



<pre class="wp-block-verse"> /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg </pre>



<figure class="wp-block-image"><img loading="lazy" width="723" height="495" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/11/plugins-config-summary-2.png" alt="" class="wp-image-15488" srcset="https://www.osradar.com/wp-content/uploads/2019/11/plugins-config-summary-2.png 723w, https://www.osradar.com/wp-content/uploads/2019/11/plugins-config-summary-2-300x205.png 300w, https://www.osradar.com/wp-content/uploads/2019/11/plugins-config-summary-2-218x150.png 218w, https://www.osradar.com/wp-content/uploads/2019/11/plugins-config-summary-2-696x477.png 696w, https://www.osradar.com/wp-content/uploads/2019/11/plugins-config-summary-2-613x420.png 613w" sizes="(max-width: 723px) 100vw, 723px" /></figure>



<p>Start &amp; Enable Nagios service to start at boot.</p>



<pre class="wp-block-verse">sudo systemctl enable --now nagios</pre>



<p>Re-check the service status.</p>



<pre class="wp-block-verse">systemctl status nagios</pre>



<div class="wp-block-image"><figure class="aligncenter"><img loading="lazy" width="725" height="496" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/11/service-check-nagios.png" alt="" class="wp-image-15489" srcset="https://www.osradar.com/wp-content/uploads/2019/11/service-check-nagios.png 725w, https://www.osradar.com/wp-content/uploads/2019/11/service-check-nagios-300x205.png 300w, https://www.osradar.com/wp-content/uploads/2019/11/service-check-nagios-218x150.png 218w, https://www.osradar.com/wp-content/uploads/2019/11/service-check-nagios-696x476.png 696w, https://www.osradar.com/wp-content/uploads/2019/11/service-check-nagios-614x420.png 614w" sizes="(max-width: 725px) 100vw, 725px" /></figure></div>



<h3><strong>Step 7: Accessing Nagios Web Dashboard</strong></h3>



<p>Remove firewall restrictions:</p>



<pre class="wp-block-verse">sudo firewall-cmd --permanent --add-service={http,https}<br>sudo firewall-cmd --reload</pre>



<p>Access Dashboard by visiting <a href="https://www.osradar.com">http:[IP/hostname]/nagios/</a><br> Fill out Authentication details:</p>



<pre class="wp-block-verse">Username:<strong> nagiosadmin</strong></pre>



<div class="wp-block-image"><figure class="aligncenter"><img loading="lazy" width="799" height="601" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/11/authentication.png" alt="" class="wp-image-15490" srcset="https://www.osradar.com/wp-content/uploads/2019/11/authentication.png 799w, https://www.osradar.com/wp-content/uploads/2019/11/authentication-300x226.png 300w, https://www.osradar.com/wp-content/uploads/2019/11/authentication-768x578.png 768w, https://www.osradar.com/wp-content/uploads/2019/11/authentication-80x60.png 80w, https://www.osradar.com/wp-content/uploads/2019/11/authentication-265x198.png 265w, https://www.osradar.com/wp-content/uploads/2019/11/authentication-696x524.png 696w, https://www.osradar.com/wp-content/uploads/2019/11/authentication-558x420.png 558w" sizes="(max-width: 799px) 100vw, 799px" /></figure></div>



<p>You can add device to be monitored in Dashboard.</p>



<figure class="wp-block-image"><img loading="lazy" width="798" height="600" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/11/nagios-dashboard.png" alt="" class="wp-image-15491" srcset="https://www.osradar.com/wp-content/uploads/2019/11/nagios-dashboard.png 798w, https://www.osradar.com/wp-content/uploads/2019/11/nagios-dashboard-300x226.png 300w, https://www.osradar.com/wp-content/uploads/2019/11/nagios-dashboard-768x577.png 768w, https://www.osradar.com/wp-content/uploads/2019/11/nagios-dashboard-80x60.png 80w, https://www.osradar.com/wp-content/uploads/2019/11/nagios-dashboard-265x198.png 265w, https://www.osradar.com/wp-content/uploads/2019/11/nagios-dashboard-696x523.png 696w, https://www.osradar.com/wp-content/uploads/2019/11/nagios-dashboard-559x420.png 559w" sizes="(max-width: 798px) 100vw, 798px" /></figure>



<p></p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-nagios-4-on-centos-8-rhel-8/">How To Install Nagios 4 on Centos 8 / RHEL 8.</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-install-nagios-4-on-centos-8-rhel-8/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
