<?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>Monit Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/monit/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Tue, 03 Aug 2021 19:31:00 +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>Install Monit on Ubuntu 20.04 to monitor the system services</title>
		<link>https://www.osradar.com/install-monit-ubuntu-monitor-system-services/</link>
					<comments>https://www.osradar.com/install-monit-ubuntu-monitor-system-services/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Tue, 10 Aug 2021 01:33:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Focal Fossa]]></category>
		<category><![CDATA[Monit]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[services]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=31576</guid>

					<description><![CDATA[<p>Hello, friends. In this post, you will learn how to install and configure Monit on Ubuntu 20.04. With this tool, you can quickly monitor the services you have on your server. You will also be able to add others that you manually configure. Introducing to Monit According to the project website Monit is a small [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-monit-ubuntu-monitor-system-services/">Install Monit on Ubuntu 20.04 to monitor the system services</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="has-line-data">Hello, friends. In this post, you will learn how to install and configure Monit on Ubuntu 20.04. With this tool, you can quickly monitor the services you have on your server. You will also be able to add others that you manually configure.</p>



<h2 class="code-line"><a id="Introducing_to_Monit_2"></a>Introducing to Monit</h2>



<p class="has-line-data">According to the <a href="https://mmonit.com/monit/" target="_blank" rel="noreferrer noopener">project website</a></p>



<blockquote class="wp-block-quote"><p class="has-line-data" data-line-start="6" data-line-end="7">Monit is a small Open Source utility for managing and monitoring Unix systems. Monit conducts automatic maintenance and repair and can execute meaningful causal actions in error situations.</p></blockquote>



<p class="has-line-data">One of the most important features of Monit is that it is quite easy to deploy on supported systems. These include Linux, BSD, and Solaris. So it is compatible with our distribution.</p>



<p class="has-line-data">For example, Monit can act if an error situation should occur, e.g.; if sendmail is not running, Monit can start sendmail again automatically or if apache is using too much resources.</p>



<p class="has-line-data">also, it can monitor the main system resources such as RAM, CPU, and disk space.</p>



<p class="has-line-data">So, let’s get started</p>



<h2 class="code-line"><a id="Install_Monit_on_Ubuntu_2004_16"></a>Install Monit on Ubuntu 20.04</h2>



<p class="has-line-data">First, connect to your server via SSH and update it</p>



<pre class="wp-block-preformatted">sudo apt update
sudo apt upgrade</pre>



<p class="has-line-data">Monit is present in the official Ubuntu repositories so to install it, just run this command:</p>



<pre class="wp-block-preformatted">sudo apt install monit
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  default-mta | postfix | mail-transport-agent sysvinit-core
The following NEW packages will be installed:
  monit
0 upgraded, 1 newly installed, 0 to remove and 24 not upgraded.
Need to get 320 kB of archives.
After this operation, 964 kB of additional disk space will be used.</pre>



<p class="has-line-data">At the end of the installation, you can check the status of the service</p>



<pre class="wp-block-preformatted">sudo systemctl status monit
● monit.service - LSB: service and resource monitoring daemon
     Loaded: loaded (/etc/init.d/monit; generated)
     Active: active (running) since Tue 2021-08-03 20:27:56 CEST; 31s ago
       Docs: man:systemd-sysv-generator(8)
      Tasks: 1 (limit: 2286)
     Memory: 1.3M
     CGroup: /system.slice/monit.service
             └─1505 /usr/bin/monit -c /etc/monit/monitrc

Aug 03 20:27:56 osradar systemd[1]: Starting LSB: service and resource monitoring daemon...
Aug 03 20:27:56 osradar monit[1494]:  * Starting daemon monitor monit
Aug 03 20:27:56 osradar monit[1494]:    ...done.
Aug 03 20:27:56 osradar systemd[1]: Started LSB: service and resource monitoring daemon.</pre>



<p class="has-line-data">So, Monit is running fine.</p>



<h3 class="code-line"><a id="Enabling_the_web_interface_33"></a>Enabling the web interface</h3>



<p class="has-line-data">To make monitoring more convenient for you, enable the web interface of the program.</p>



<p class="has-line-data">To do this, edit the Monit config file <code>/etc/monit/monitrc</code>.</p>



<p class="has-line-data">First, make a backup of it:</p>



<pre class="wp-block-preformatted">sudo cp /etc/monit/monitrc /etc/monit/monitrc.bak</pre>



<p class="has-line-data">Now edit it using <code>nano</code>.</p>



<pre class="wp-block-preformatted">sudo nano /etc/monit/monitrc</pre>



<p class="has-line-data">note the lines starting with <code>set httpd port 2812 and</code> and <code>allow admin:monit</code> which are commented out and uncomment them</p>



<pre class="wp-block-preformatted">set httpd port 2812 and
allow admin:password</pre>



<p class="has-line-data">You can assign any password you want after <code>admin:</code> save the changes and close the editor.</p>



<p class="has-line-data">You can check the syntax of the file for any errors.</p>



<pre class="wp-block-preformatted">sudo monit -t</pre>



<p class="has-line-data">And to apply the changes, restart monit.</p>



<pre class="wp-block-preformatted">sudo systemctl restart monit</pre>



<p class="has-line-data">Now open your web browser and go to <code>http://your-server:2812</code> and after entering the password you will see the following.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="511" src="https://www.osradar.com/wp-content/uploads/2021/08/1-1-1024x511.png" alt="1.- Monit on Ubuntu 20.04" class="wp-image-31581" srcset="https://www.osradar.com/wp-content/uploads/2021/08/1-1-1024x511.png 1024w, https://www.osradar.com/wp-content/uploads/2021/08/1-1-300x150.png 300w, https://www.osradar.com/wp-content/uploads/2021/08/1-1-768x383.png 768w, https://www.osradar.com/wp-content/uploads/2021/08/1-1-696x347.png 696w, https://www.osradar.com/wp-content/uploads/2021/08/1-1-1068x533.png 1068w, https://www.osradar.com/wp-content/uploads/2021/08/1-1.png 1366w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>1.- Monit on Ubuntu 20.04</figcaption></figure>



<p class="has-line-data">And you can check the Monit runtime.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="518" src="https://www.osradar.com/wp-content/uploads/2021/08/2-1024x518.png" alt="2.- Monit Runtime" class="wp-image-31582" srcset="https://www.osradar.com/wp-content/uploads/2021/08/2-1024x518.png 1024w, https://www.osradar.com/wp-content/uploads/2021/08/2-300x152.png 300w, https://www.osradar.com/wp-content/uploads/2021/08/2-768x388.png 768w, https://www.osradar.com/wp-content/uploads/2021/08/2-696x352.png 696w, https://www.osradar.com/wp-content/uploads/2021/08/2-1068x540.png 1068w, https://www.osradar.com/wp-content/uploads/2021/08/2.png 1349w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>2.- Monit Runtime</figcaption></figure>



<h3 class="code-line"><a id="Enabling_services_to_monitor_66"></a>Enabling services to monitor</h3>



<p class="has-line-data">By default, Monit has several service configurations that you can monitor. They are located in the <code>/etc/monit/conf-available/</code> directory.</p>



<pre class="wp-block-preformatted">ls /etc/monit/conf-available/`
acpid apache2 at cron mdadm memcached mysql nginx openntpd openssh-server pdns-recursor postfix rsyslog smartmontools snmpd</pre>



<p class="has-line-data">To enable one, it is only necessary to make a symbolic link to the <code>/etc/monit/conf-enabled/</code> folder, in the case of Apache, this would be</p>



<pre class="wp-block-preformatted">sudo ln -s /etc/monit/conf-available/apache2 /etc/monit/conf-enabled/`</pre>



<p class="has-line-data">And apply the changes by restarting Monit</p>



<pre class="wp-block-preformatted">sudo systemctl restart monit</pre>



<p class="has-line-data">So, enjoy it</p>



<h2 class="code-line"><a id="Conclusion_83"></a>Conclusion</h2>



<p class="has-line-data">Monit helps us to monitor the most critical services of the system from a comfortable graphical interface and with a very simple installation.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-monit-ubuntu-monitor-system-services/">Install Monit on Ubuntu 20.04 to monitor the system services</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/install-monit-ubuntu-monitor-system-services/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
