<?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>How To Install Nagios on Ubuntu 20.04 Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/how-to-install-nagios-on-ubuntu-20-04/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Sun, 03 May 2020 16:26:58 +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 on Ubuntu 20.04</title>
		<link>https://www.osradar.com/how-to-install-nagios-on-ubuntu-20-04/</link>
					<comments>https://www.osradar.com/how-to-install-nagios-on-ubuntu-20-04/#comments</comments>
		
		<dc:creator><![CDATA[sabi]]></dc:creator>
		<pubDate>Sun, 03 May 2020 16:26:56 +0000</pubDate>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[how to install Nagios on Linux]]></category>
		<category><![CDATA[How To Install Nagios on Ubuntu 20.04]]></category>
		<category><![CDATA[Monitor remote hosts with Nagios]]></category>
		<category><![CDATA[Nagios installation guide on Ubuntu 20.04]]></category>
		<category><![CDATA[Nagios on Ubuntu 20.04]]></category>
		<category><![CDATA[Ubuntu 20.04 tutorials]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=19943</guid>

					<description><![CDATA[<p>Today we are going to learn that how to install Nagios on Ubuntu 20.04. Nagios is an open source monitoring tool used to monitor different Linux Machines or different client hosts. It monitors the HTTP, FTP, SSH, SMTP etc along-with the CPU usage, RAM, Disk Usage and different process that are being running. So, just [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-nagios-on-ubuntu-20-04/">How To Install Nagios on Ubuntu 20.04</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Today we are going to learn that <a href="https://www.osradar.com/?p=19943">how to install Nagios on Ubuntu 20.04</a>. Nagios is an open source monitoring tool used to monitor different Linux Machines or different client hosts. It monitors the HTTP, FTP, SSH, SMTP etc along-with the CPU usage, RAM, Disk Usage and different process that are being running. So, just follow the below steps for an easy installation of Nagios on Ubuntu 20.04.</p>



<h2><strong>Step 1: Update Your System</strong></h2>



<p>First of all update your system to the latest packages and also install the given packages with the help of below command as Nagios doesn&#8217;t in .deb package format.</p>



<pre class="wp-block-verse">sudo apt update<br>sudo apt install -y build-essential apache2 php openssl perl make php-gd libgd-dev libapache2-mod-php libperl-dev libssl-dev daemon wget apache2-utils unzip</pre>



<h3><strong>Step 2: User Creation</strong></h3>



<p>In order to install Nagios you&#8217;ve to create user and group for it along-with the Apache user with the help of below commands. Just hit the given commands in your terminal.</p>



<pre class="wp-block-verse">sudo useradd nagios<br>sudo groupadd nagcmd<br>sudo usermod -a -G nagcmd nagios<br>sudo usermod -a -G nagcmd www-data</pre>



<h3><strong>Step 3: Downloading Nagios on Ubuntu 20.04</strong></h3>



<p>Now, download the Nagios from official page or you can get it by the below command through terminal. First change to the <strong>/tmp</strong> directory and then type the below command to download the latest available version (4.4.5).</p>



<pre class="wp-block-verse">cd /tmp<br>wget https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.4.5.tar.gz</pre>



<p>Then extract the files with the help of tar command.</p>



<pre class="wp-block-verse">tar -zxvf /tmp/nagios-4.4.5.tar.gz</pre>



<p>And move to the resultant directory.</p>



<pre class="wp-block-verse">cd /tmp/nagios-4.4.5/</pre>



<h3><strong>Step 4: Compiling Nagios on Ubuntu 20.04</strong></h3>



<p>After downloading and extracting, compile the Nagios from the source code by running the below commands.</p>



<pre class="wp-block-verse">sudo ./configure --with-nagios-group=nagios --with-command-group=nagcmd --with-httpd_conf=/etc/apache2/sites-enabled/<br> sudo make all<br> sudo make install<br> sudo make install-init<br> sudo make install-config<br> sudo make install-commandmode</pre>



<h3><strong>Step 5: Configuring Nagios on Ubuntu 20.04</strong></h3>



<p>Now, with the help of your favorite editor edit the <strong>/usr/local/nagios/etc/objects/contacts.cfg</strong> file to update the email address as shown below.</p>



<pre class="wp-block-verse">sudo nano /usr/local/nagios/etc/objects/contacts.cfg</pre>



<p>Update the email address to that where you want to get notified.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" width="720" height="563" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2020/05/1.png" alt="" class="wp-image-20046" srcset="https://www.osradar.com/wp-content/uploads/2020/05/1.png 720w, https://www.osradar.com/wp-content/uploads/2020/05/1-300x235.png 300w, https://www.osradar.com/wp-content/uploads/2020/05/1-696x544.png 696w" sizes="(max-width: 720px) 100vw, 720px" /></figure></div>



<p><strong>Note: </strong>Replace the <a href="http://osradar.com">nagios@localhost </a>with your email address.</p>



<h3><strong>Step 6: Installing Nagios Web Interface on Ubuntu 20.04</strong></h3>



<p>Type the following command to install the Nagios Web Interface.</p>



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



<p>Then create a user account as <strong>&#8220;nagiosadmin&#8221;</strong> for accessing the Nagios web interface. Make sure to save the password you provided on safe place or keep in mind as it will be needed later. To do this run the given command.</p>



<pre class="wp-block-verse">sabi@Ubuntu:/tmp/nagios-4.4.5$ sudo htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin<br> New password: <br> Re-type new password: <br> Adding password for user nagiosadmin</pre>



<p>After it run the below command.</p>



<pre class="wp-block-verse">sudo a2enmod cgi</pre>



<p>Then restart the Apache services.</p>



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



<h3><strong>Step 7: Installing Nagios Plugin</strong></h3>



<p>Switch to the <strong>/tmp</strong> directory and install the Nagios plugin for monitoring purposes. Download the plugin with below command.</p>



<pre class="wp-block-verse">wget https://nagios-plugins.org/download/nagios-plugins-2.3.3.tar.gz</pre>



<p>Then extract the downloaded package.</p>



<pre class="wp-block-verse">tar -zxvf /tmp/nagios-plugins-2.3.3.tar.gz</pre>



<p>And switch to the resultant directory.</p>



<pre class="wp-block-verse">cd /tmp/nagios-plugins-2.3.3/</pre>



<p>After it compile the plugin with following command.</p>



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



<h3><strong>Step 8: Starting Nagios on Ubuntu 20.04</strong></h3>



<p>Double check the configuration done above by hitting the given command and make sure all configuration pre-checks are okay.</p>



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



<p>Output:</p>



<p>You&#8217;ll see the similar output.</p>



<pre class="wp-block-verse">sabi@Ubuntu:/tmp/nagios-plugins-2.3.3$ sudo /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg<br> Nagios Core 4.4.5<br> Copyright (c) 2009-present Nagios Core Development Team and Community Contributors<br> Copyright (c) 1999-2009 Ethan Galstad<br> Last Modified: 2019-08-20<br> License: GPL<br> Website: https://www.nagios.org<br> Reading configuration data…<br>    Read main config file okay…<br>    Read object config files okay…<br> Running pre-flight check on configuration data…<br> Checking objects…<br>     Checked 8 services.<br>     Checked 1 hosts.<br>     Checked 1 host groups.<br>     Checked 0 service groups.<br>     Checked 1 contacts.<br>     Checked 1 contact groups.<br>     Checked 24 commands.<br>     Checked 5 time periods.<br>     Checked 0 host escalations.<br>     Checked 0 service escalations.<br> Checking for circular paths…<br>     Checked 1 hosts<br>     Checked 0 service dependencies<br>     Checked 0 host dependencies<br>     Checked 5 timeperiods<br> Checking global event handlers…<br> Checking obsessive compulsive processor commands…<br> Checking misc settings…<br> Total Warnings: 0<br> Total Errors:   0<br> <strong>Things look okay - No serious problems were detected during the pre-flight check</strong></pre>



<p>And then enable the Nagios services to start at boot.</p>



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



<p>Start the services.</p>



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



<h3><strong>Step 9: Access Web Dashboard</strong></h3>



<p>Go to your browser and type <strong><a href="http://ip-add/nagios/">http://ip-add/nagios/</a></strong> to access the web interface. Provide the username and password we&#8217;ve created earlier and press Enter or click ok.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" width="731" height="563" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2020/05/2-1.png" alt="How To Install Nagios on Ubuntu 20.04" class="wp-image-20048" srcset="https://www.osradar.com/wp-content/uploads/2020/05/2-1.png 731w, https://www.osradar.com/wp-content/uploads/2020/05/2-1-300x231.png 300w, https://www.osradar.com/wp-content/uploads/2020/05/2-1-696x536.png 696w" sizes="(max-width: 731px) 100vw, 731px" /></figure></div>



<p>You&#8217;ll see the dashboard like this after successful login.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" width="1024" height="439" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2020/05/3-1-1024x439.png" alt="How To Install Nagios on Ubuntu 20.04" class="wp-image-20049" srcset="https://www.osradar.com/wp-content/uploads/2020/05/3-1-1024x439.png 1024w, https://www.osradar.com/wp-content/uploads/2020/05/3-1-300x129.png 300w, https://www.osradar.com/wp-content/uploads/2020/05/3-1-768x329.png 768w, https://www.osradar.com/wp-content/uploads/2020/05/3-1-696x298.png 696w, https://www.osradar.com/wp-content/uploads/2020/05/3-1-1068x457.png 1068w, https://www.osradar.com/wp-content/uploads/2020/05/3-1.png 1291w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure></div>



<p>Here you can see the different options on the left side, click on hosts to see the monitoring hosts.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" width="1024" height="419" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2020/05/5-1024x419.png" alt="How To Install Nagios on Ubuntu 20.04" class="wp-image-20051" srcset="https://www.osradar.com/wp-content/uploads/2020/05/5-1024x419.png 1024w, https://www.osradar.com/wp-content/uploads/2020/05/5-300x123.png 300w, https://www.osradar.com/wp-content/uploads/2020/05/5-768x314.png 768w, https://www.osradar.com/wp-content/uploads/2020/05/5-696x285.png 696w, https://www.osradar.com/wp-content/uploads/2020/05/5-1068x437.png 1068w, https://www.osradar.com/wp-content/uploads/2020/05/5.png 1219w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure></div>



<p>Just below the Hosts, click on the Services to see the services that are monitored by the Nagios.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" width="1024" height="475" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2020/05/4-1024x475.png" alt="How To Install Nagios on Ubuntu 20.04" class="wp-image-20050" srcset="https://www.osradar.com/wp-content/uploads/2020/05/4-1024x475.png 1024w, https://www.osradar.com/wp-content/uploads/2020/05/4-300x139.png 300w, https://www.osradar.com/wp-content/uploads/2020/05/4-768x356.png 768w, https://www.osradar.com/wp-content/uploads/2020/05/4-696x323.png 696w, https://www.osradar.com/wp-content/uploads/2020/05/4-1068x495.png 1068w, https://www.osradar.com/wp-content/uploads/2020/05/4.png 1285w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure></div>



<p>So, this is how you can install Nagios on Ubuntu 20.04. In our next tutorial, we&#8217;ll learn how to add Remote Linux Machines/Hosts to Nagios Monitoring System. To see that click on the below link.</p>



<p><a href="https://www.osradar.com/?p=20035">How To Monitor Remote Hosts with Nagios on Ubuntu 20.04</a></p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-nagios-on-ubuntu-20-04/">How To Install Nagios on Ubuntu 20.04</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-on-ubuntu-20-04/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
