{"id":1273,"date":"2016-05-19T22:19:21","date_gmt":"2016-05-19T19:19:21","guid":{"rendered":"http:\/\/www.systemcodegeeks.com\/?p=1273"},"modified":"2017-12-01T17:25:54","modified_gmt":"2017-12-01T15:25:54","slug":"nagios-core-installation-configuration","status":"publish","type":"post","link":"https:\/\/www.systemcodegeeks.com\/monitoring\/nagios\/nagios-core-installation-configuration\/","title":{"rendered":"Nagios Core Installation and Configuration on Ubuntu Server"},"content":{"rendered":"<p><em>This article is part of our Academy Course titled <a href=\"https:\/\/www.systemcodegeeks.com\/monitoring\/nagios\/nagios-monitoring-tutorial\/\">Nagios Tutorial for IT Monitoring<\/a>.<\/p>\n<p>In this course, we provide a compilation of Nagios tutorials that will help you set up your own monitoring infrastructure. We cover a wide range of topics, from installation and configuration, to plugins and NRPE. With our straightforward tutorials, you will be able to get your own projects up and running in minimum time. Check it out <a href=\"https:\/\/www.systemcodegeeks.com\/monitoring\/nagios\/nagios-monitoring-tutorial\/\">here<\/a>!<\/em><\/p>\n<p>Whether you are an engineer in charge of monitoring a large and complex network infrastructure, a system administrator of a relatively small number of machines, or a just a regular user who needs to check on the availability of a couple of machines and important services in your home network, it is critical to understand the importance of and implement a monitoring solution.<\/p>\n<p>As such, Nagios is the answer for you. In addition to providing monitoring of hardware resources (processor load, disk usage, etc) and the availability of network services (HTTP, FTP, SMTP, SSH, etc), this open source tool also offers alerting (via SMS or email through the use of plugins) in the wake of undesired events, and allows you to identify potential problems before they occur.<\/p>\n<p>On top of it, through its web interface Nagios also provides access to availability data at a quick glance to share with the leaders of your organization. This same feature can also help you plan in advance for necessary upgrades to your infrastructure.<\/p>\n<p>In this tutorial we will show you how to install and use Nagios Core in an Ubuntu 14.04 server. We will then demonstrate how to monitor the availability (whether the host is up or down) in a CentOS 7 system, and the status of the web service running therein. In a future guide, we will also add more advanced monitoring features for services on the same host.<br \/>\n[ulp id=&#8217;L53PrRMj3e7JC9OS&#8217;]<\/p>\n<h2>Installing Nagios Core<\/h2>\n<p>Nagios Core has a free-of-cost solution that features complete infrastructure monitoring, hundreds of addons, and forum support. Other versions (Student VM, Pro, and Business) include these and other features as well, but they are all paid options. However, for our present purposes, the Free DIY (Do-It-Yourself) edition provides the functionality that we need, so we will show you how to download and install it on your Ubuntu 14.04 server.<\/p>\n<p>Although Nagios can be installed from the Ubuntu repositories, the available version (3.5.1) is a bit outdated. For that reason, we will install the application using the code package from <a href=\"https:\/\/www.nagios.org\/downloads\/core-stay-informed\/\">https:\/\/www.nagios.org\/downloads\/core-stay-informed\/<\/a> (you can skip the form that asks for details of your implementation by clicking on <i>Skip to download<\/i> as you can see in Fig. 1).<\/p>\n<figure id=\"attachment_1274\" aria-describedby=\"caption-attachment-1274\" style=\"width: 468px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/01nagios1.png\"><img decoding=\"async\" class=\"size-full wp-image-1274\" src=\"http:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/01nagios1.png\" alt=\"Figure 1: Downloading the Free DIY version of Nagios Core\" width=\"468\" height=\"561\" srcset=\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/01nagios1.png 468w, https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/01nagios1-250x300.png 250w\" sizes=\"(max-width: 468px) 100vw, 468px\" \/><\/a><figcaption id=\"caption-attachment-1274\" class=\"wp-caption-text\">Figure 1: Downloading the Free DIY version of Nagios Core<\/figcaption><\/figure>\n<p><b>STEP 1 &#8211;<\/b> Before we download and install Nagios from the project\u2019s website, we will need to install and configure some additional dependencies. These consists of a complete LAMP stack and several development libraries that will assist us in building Nagios from source. Also, we will install an email service (<code>postfix<\/code>) to handle notifications and additional utilities (<code>mailutils<\/code>) to check those notifications on the local machine:<\/p>\n<pre class=\"brush:bash\">sudo aptitude update &amp;&amp; sudo aptitude install apache2 php5-mysql mysql-server libapache2-mod-php5 php5-mcrypt php5-gd php5-curl build-essential libgd2-xpm-dev openssl libssl-dev xinetd apache2-utils unzip wget postfix mailutils<\/pre>\n<div class=\"tip\">While installing <code>mysql-server<\/code>, you will be prompted to set a password for the MySQL root user. Make sure you choose a strong password which is easy to remember. When prompted to choose a mail server type for <code>postfix<\/code>, choose <i>Local Only<\/i>, as we will be delivering notifications to a local user.<br \/>\nIf you want to learn more about each of the above dependencies in detail, you can use <code>aptitude show <i>dependency<\/i><\/code>, where you will need to replace dependency with one of the package names listed previously.<\/div>\n<p><b>STEP 2 &#8211;<\/b> Once you have installed the dependencies listed above, download the source code for the latest Nagios stable release (at the time of this writing it\u2019s 4.1.1):<\/p>\n<pre class=\"brush:bash\">wget https:\/\/assets.nagios.com\/downloads\/nagioscore\/releases\/nagios-4.1.1.tar.gz\"&gt;https:\/\/assets.nagios.com\/downloads\/nagioscore\/releases\/nagios-4.1.1.tar.gz<\/pre>\n<p>and untar it:<\/p>\n<pre class=\"brush:bash\">tar xzvf nagios-4.1.1.tar.gz<\/pre>\n<p>We will later change directory into the folder where we just extracted the contents of the tarball. By now, proceed with the next step.<\/p>\n<p><b>STEP 3 &#8211; <\/b>Create a user and group for Nagios-related processes to run, then add the nagios and www-data (Apache) users to the Nagios group (nagioscmd):<\/p>\n<pre class=\"brush:bash\">sudo useradd nagios\r\nsudo groupadd nagioscmd\r\nsudo usermod -aG nagioscmd nagios\r\nsudo usermod -aG nagioscmd www-data\r\n<\/pre>\n<p>Particularly, the <b>nagioscmd<\/b> group will be needed to run commands via the web interface.<\/p>\n<p><b>STEP 4 &#8211; <\/b>Change directory to the folder where you unpacked the Nagios source code earlier:<\/p>\n<pre class=\"brush:bash\">cd nagios-4.1.1<\/pre>\n<p>Find out where the mail binary is located:<\/p>\n<pre class=\"brush:bash\">which mail<\/pre>\n<p>Most likely, the above command will return <code>\/usr\/bin\/mail<\/code>. You will use the <code>--with-mail<\/code> configure option followed by this absolute path below. Then do:<\/p>\n<pre class=\"brush:bash\">sudo .\/configure --with-nagios-group=nagios --with-command-group=nagioscmd --with-mail=\/usr\/bin\/mail\r\n<\/pre>\n<p>You will be given the chance to take a second look at the configuration options before proceeding, as shown in Fig. 2:<\/p>\n<figure id=\"attachment_1277\" aria-describedby=\"caption-attachment-1277\" style=\"width: 490px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/02nagios1.png\"><img decoding=\"async\" class=\"size-full wp-image-1277\" src=\"http:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/02nagios1.png\" alt=\"Figure 2: Checking the --configure options before compiling\" width=\"490\" height=\"554\" srcset=\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/02nagios1.png 490w, https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/02nagios1-265x300.png 265w\" sizes=\"(max-width: 490px) 100vw, 490px\" \/><\/a><figcaption id=\"caption-attachment-1277\" class=\"wp-caption-text\">Figure 2: Checking the &#8211;configure options before compiling<\/figcaption><\/figure>\n<p>If everything looks correct, proceed with Step 5. Otherwise, correct the corresponding option in the configure statement above and try again.<\/p>\n<p><b>STEP 5 &#8211;<\/b> To compile Nagios and install auxiliary files and extra features, run the following commands. Keep in mind that only sample configuration files will be installed, and you will still need to go through the documentation for more information on how to actually define entities (devices, hosts, services, etc) to fit your particular needs.<\/p>\n<pre class=\"brush:bash\">sudo make all\r\nsudo make install # The main program, CGIs, and HTML files\r\nsudo make install-init # The init script in \/etc\/init.d\r\nsudo make install-config # Sample config files in \/usr\/local\/nagios\/etc\r\nsudo make install-commandmode # Fix permissions on the directory for the external command file\r\nsudo \/usr\/bin\/install -c -m 644 sample-config\/httpd.conf \/etc\/apache2\/sites-enabled\/nagios.conf # The Apache config file for the Nagios web interface\r\nsudo make install-exfoliation # Exfoliation theme for the user interface<\/pre>\n<p><b>STEP 6 &#8211;<\/b> Create an admin user (and set password, see Fig. 3) to access the web interface and enable the Apache rewrite and cgi modules:<\/p>\n<figure id=\"attachment_1278\" aria-describedby=\"caption-attachment-1278\" style=\"width: 783px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/03nagios1.png\"><img decoding=\"async\" class=\"size-full wp-image-1278\" src=\"http:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/03nagios1.png\" alt=\"Figure 3: Creating an user account for the web interface\" width=\"783\" height=\"93\" srcset=\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/03nagios1.png 783w, https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/03nagios1-300x36.png 300w, https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/03nagios1-768x91.png 768w\" sizes=\"(max-width: 783px) 100vw, 783px\" \/><\/a><figcaption id=\"caption-attachment-1278\" class=\"wp-caption-text\">Figure 3: Creating an user account for the web interface<\/figcaption><\/figure>\n<pre class=\"brush:bash\">sudo htpasswd -c \/usr\/local\/nagios\/etc\/htpasswd.users nagiosadmin\r\nsudo a2enmod rewrite cgi &amp;&amp; sudo service apache2 restart<\/pre>\n<p>The username \/ password pair that you will use to access the web interface will be stored in <b>\/usr\/local\/nagios\/etc\/htpasswd.users<\/b>. To restrict permissions, we will change the group owner to nagioscmd and only allow read permissions for the members of that group:<\/p>\n<pre class=\"brush:bash\">sudo chgrp nagioscmd \/usr\/local\/nagios\/etc\/htpasswd.users\r\nsudo chmod 640 \/usr\/local\/nagios\/etc\/htpasswd.users<\/pre>\n<p><b>STEP 7 &#8211;<\/b> Finally, let\u2019s add the necessary symbolic link to the sites-enabled directory, restart Apache, and start nagios. Please note that the actual file in sites-available was created in Step 5.<\/p>\n<pre class=\"brush:bash\">sudo ln -s \/etc\/apache2\/sites-available\/nagios.conf \/etc\/apache2\/sites-enabled\/\r\nsudo service apache2 restart\r\nsudo service nagios start<\/pre>\n<p>At this point, Nagios and Apache should be running. It is time to launch the web interface to check.<\/p>\n<p><b>STEP 8 &#8211;<\/b> Verify that you can access the Nagios web interface at <strong>http:\/\/ServerIP\/nagios<\/strong>. In our case, the ServerIP is 192.168.0.32. Use nagiosadmin as username and the password you chose in Step 6. If everything goes as expected, you should see the user interface as shown in Fig. 4:<\/p>\n<figure id=\"attachment_1279\" aria-describedby=\"caption-attachment-1279\" style=\"width: 526px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/04nagios1.png\"><img decoding=\"async\" class=\"size-full wp-image-1279\" src=\"http:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/04nagios1.png\" alt=\"Figure 4: The Nagios web interface\" width=\"526\" height=\"466\" srcset=\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/04nagios1.png 526w, https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/04nagios1-300x266.png 300w\" sizes=\"(max-width: 526px) 100vw, 526px\" \/><\/a><figcaption id=\"caption-attachment-1279\" class=\"wp-caption-text\">Figure 4: Launching the Nagios web interface<\/figcaption><\/figure>\n<div class=\"tip\">If you experience any issues or the web interface does not display correctly, check the Apache logs in \/var\/log\/apache2. Particularly, the error.log file will point you in the right direction to troubleshoot.<\/div>\n<p><b>STEP 9 &#8211;<\/b> Download and install Nagios plugins (we will dive more deeply into this topic in the next tutorial).<\/p>\n<div class=\"tip\">You can think of a Nagios Core plugin as an extension that that processes command-line arguments, performs specific checks, and then return the results to the main program. Plugins exist in the form of compiled binaries or executable scripts.<\/div>\n<p>To begin, find the latest version from <a href=\"http:\/\/nagios-plugins.org\/download\/\">http:\/\/nagios-plugins.org\/download\/<\/a> (2.1.1 at the time of this writing) and download it:<\/p>\n<pre class=\"brush:bash\">wget http:\/\/nagios-plugins.org\/download\/nagios-plugins-2.1.1.tar.gz\r\ntar xzvf nagios-plugins-2.1.1.tar.gz\r\ncd nagios-plugins-2.1.1\r\nsudo .\/configure --with-nagios-user=nagios --with-nagios-group=nagios --with-openssl\r\nsudo make\r\nsudo make install<\/pre>\n<p><b>STEP 10 &#8211;<\/b> Finally, we need to modify the default contact that will receive alerts. Open \/usr\/local\/nagios\/etc\/objects\/contacts.cfg and replace the address in the email directive for an administrative account (gacanepa@ubuntu in the below example), as indicated in Fig. 5:<\/p>\n<figure id=\"attachment_1280\" aria-describedby=\"caption-attachment-1280\" style=\"width: 489px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/05nagios1.png\"><img decoding=\"async\" class=\"size-full wp-image-1280\" src=\"http:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/05nagios1.png\" alt=\"Figure 5: Setting the email address for the preferred contact\" width=\"489\" height=\"115\" srcset=\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/05nagios1.png 489w, https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/05nagios1-300x71.png 300w\" sizes=\"(max-width: 489px) 100vw, 489px\" \/><\/a><figcaption id=\"caption-attachment-1280\" class=\"wp-caption-text\">Figure 5: Setting the email address for the preferred contact<\/figcaption><\/figure>\n<p>Once the above 10 steps have been completed successfully, we can proceed to further configure Nagios.<\/p>\n<h2>Configuring Nagios<\/h2>\n<p>To organize the hosts definitions and monitoring configuration, we will create a directory named <strong>\/usr\/local\/nagios\/etc\/servers<\/strong>:<\/p>\n<pre class=\"brush:bash\">mkdir \/usr\/local\/nagios\/etc\/servers<\/pre>\n<p>and will tell Nagios to process all configuration files (*.cfg inside this directory) by uncommenting the following line in \/usr\/local\/nagios\/etc\/nagios.cfg:<\/p>\n<pre class=\"brush:bash\">cfg_dir=\/usr\/local\/nagios\/etc\/servers<\/pre>\n<p>Inside \/usr\/local\/nagios\/etc\/servers we will add a basic configuration file (centos7.cfg) to monitor the availability of the remote CentOS 7 system (IP address: 192.168.0.29) and the status of the HTTP service in that host by checking the index.html file inside the DocumentRoot directory:<\/p>\n<pre class=\"brush:xml\">define host {\r\nhost_name               centos7\r\nalias                   My CentOS 7 server\r\naddress                 192.168.0.29\r\nmax_check_attempts      3\r\ncheck_period            24x7\r\ncheck_command           check-host-alive\r\ncontacts                nagiosadmin\r\nnotification_interval   60\r\nnotification_period     24x7\r\n}\r\n\r\ndefine service {\r\nuse                     local-service\r\nhost_name               centos7\r\nservice_description     HTTP\r\ncheck_command           check_http!-I 192.168.0.29 -u \/index.html\r\nnotifications_enabled   1\r\n}\r\n<\/pre>\n<p>As per the above configuration, Nagios will attempt to reach the host 3 times before raising an alert (<strong>max_check_attempts<\/strong>). Once it detects an anomaly, it will send notifications every 60 minutes (<strong>notification_interval<\/strong>).<\/p>\n<div class=\"tip\">\n<p>Before restarting Nagios, you can check the configuration file for errors (this will also check all other files invoked by nagios.cfg) as follows:<\/p>\n<pre class=\"brush:bash\">sudo sh -c \"\/usr\/local\/nagios\/bin\/nagios -v \/usr\/local\/nagios\/etc\/nagios.cfg\"<\/pre>\n<\/div>\n<p>Then let\u2019s restart Nagios:<\/p>\n<pre class=\"brush:bash\">sudo service nagios restart<\/pre>\n<p>and refresh the web interface. The newly added host should now show up. Refer to Fig. 6 for more details.<\/p>\n<figure id=\"attachment_1281\" aria-describedby=\"caption-attachment-1281\" style=\"width: 491px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/06nagios1.png\"><img decoding=\"async\" class=\"size-full wp-image-1281\" src=\"http:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/06nagios1.png\" alt=\"Figure 6: Viewing the list of monitored hosts in the Nagios Core web interface\" width=\"491\" height=\"178\" srcset=\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/06nagios1.png 491w, https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/06nagios1-300x109.png 300w\" sizes=\"(max-width: 491px) 100vw, 491px\" \/><\/a><figcaption id=\"caption-attachment-1281\" class=\"wp-caption-text\">Figure 6: Viewing the list of monitored hosts in the Nagios Core web interface<\/figcaption><\/figure>\n<p>If you click on the magnifying glass icon next to <strong>centos7<\/strong>, we will see the list of services defined for this host. We can then click on the service name to display the corresponding stats (see Fig. 7). Using the same interface, you can force a check of this service and perform other operations (<strong>Service Commands<\/strong>).<\/p>\n<figure id=\"attachment_1282\" aria-describedby=\"caption-attachment-1282\" style=\"width: 997px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/07nagios1.png\"><img decoding=\"async\" class=\"size-full wp-image-1282\" src=\"http:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/07nagios1.png\" alt=\"Figure 7: Viewing the details of a monitored service\" width=\"997\" height=\"364\" srcset=\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/07nagios1.png 997w, https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/07nagios1-300x110.png 300w, https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/07nagios1-768x280.png 768w\" sizes=\"(max-width: 997px) 100vw, 997px\" \/><\/a><figcaption id=\"caption-attachment-1282\" class=\"wp-caption-text\">Figure 7: Viewing the details of a monitored service<\/figcaption><\/figure>\n<p>If we now stop the service in the remote host (<code>systemctl stop httpd<\/code>) or shut the machine down (<code>poweroff<\/code>), we should receive notifications in the email account we defined in Step 10. To read your emails, you will use the <code>mail<\/code> command (see Fig 8):<\/p>\n<figure id=\"attachment_1283\" aria-describedby=\"caption-attachment-1283\" style=\"width: 941px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/08nagios1.png\"><img decoding=\"async\" class=\"size-full wp-image-1283\" src=\"http:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/08nagios1.png\" alt=\"Figure 8: Viewing notification emails\" width=\"941\" height=\"418\" srcset=\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/08nagios1.png 941w, https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/08nagios1-300x133.png 300w, https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/08nagios1-768x341.png 768w\" sizes=\"(max-width: 941px) 100vw, 941px\" \/><\/a><figcaption id=\"caption-attachment-1283\" class=\"wp-caption-text\">Figure 8: Viewing notification emails<\/figcaption><\/figure>\n<div class=\"tip\">By default, Nagios disables notifications if a host or service is found to be flapping (toggling between states). You may want to temporarily disable flapping detection by setting the <code>enable_flap_detection<\/code> flag to 0 in \/usr\/local\/nagios\/etc\/nagios.cfg.<\/div>\n<p>Last, but not least, remember to enable Nagios to start on boot:<\/p>\n<pre class=\"brush:bash\">sudo ln -s \/etc\/init.d\/nagios \/etc\/rcS.d\/S99nagios<\/pre>\n<p>Congratulations! You have successfully installed Nagios Core in your Ubuntu 14.04 server and set up monitoring for the availability of a CentOS 7 machine and the Apache service running therein.<\/p>\n<div class=\"tip\">Remember to restart Nagios each time you make changes to the associated configuration files. Otherwise, the changes will not be applied and the service will continue running with the old configuration<\/div>\n<h2>Summary<\/h2>\n<p>In this article we have explained how to install the latest version of Nagios Core and plugins from source, and how to configure monitoring for a host and a specific service. In addition, we set up email alerts to receive notifications when the host or the chosen service experience issues. In the next guide we will dive more deeply into the use of plugins for checking a wide variety of common services.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article is part of our Academy Course titled Nagios Tutorial for IT Monitoring. In this course, we provide a compilation of Nagios tutorials that will help you set up your own monitoring infrastructure. We cover a wide range of topics, from installation and configuration, to plugins and NRPE. With our straightforward tutorials, you will &hellip;<\/p>\n","protected":false},"author":15,"featured_media":1288,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[37],"tags":[],"class_list":["post-1273","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-nagios"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Nagios Core Installation and Configuration on Ubuntu Server - System Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"This article is part of our Academy Course titled Nagios Tutorial for IT Monitoring. In this course, we provide a compilation of Nagios tutorials that\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.systemcodegeeks.com\/monitoring\/nagios\/nagios-core-installation-configuration\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Nagios Core Installation and Configuration on Ubuntu Server - System Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"This article is part of our Academy Course titled Nagios Tutorial for IT Monitoring. In this course, we provide a compilation of Nagios tutorials that\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.systemcodegeeks.com\/monitoring\/nagios\/nagios-core-installation-configuration\/\" \/>\n<meta property=\"og:site_name\" content=\"System Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/systemcodegeeks\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/gacanepa\" \/>\n<meta property=\"article:published_time\" content=\"2016-05-19T19:19:21+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-12-01T15:25:54+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/nagios-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Gabriel Canepa\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@gacanepa\" \/>\n<meta name=\"twitter:site\" content=\"@systemcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Gabriel Canepa\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/monitoring\/nagios\/nagios-core-installation-configuration\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/monitoring\/nagios\/nagios-core-installation-configuration\/\"},\"author\":{\"name\":\"Gabriel Canepa\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/967da353d0f1a1de21c9504942625a5f\"},\"headline\":\"Nagios Core Installation and Configuration on Ubuntu Server\",\"datePublished\":\"2016-05-19T19:19:21+00:00\",\"dateModified\":\"2017-12-01T15:25:54+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/monitoring\/nagios\/nagios-core-installation-configuration\/\"},\"wordCount\":1738,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/monitoring\/nagios\/nagios-core-installation-configuration\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/nagios-logo.jpg\",\"articleSection\":[\"Nagios\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.systemcodegeeks.com\/monitoring\/nagios\/nagios-core-installation-configuration\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/monitoring\/nagios\/nagios-core-installation-configuration\/\",\"url\":\"https:\/\/www.systemcodegeeks.com\/monitoring\/nagios\/nagios-core-installation-configuration\/\",\"name\":\"Nagios Core Installation and Configuration on Ubuntu Server - System Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/monitoring\/nagios\/nagios-core-installation-configuration\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/monitoring\/nagios\/nagios-core-installation-configuration\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/nagios-logo.jpg\",\"datePublished\":\"2016-05-19T19:19:21+00:00\",\"dateModified\":\"2017-12-01T15:25:54+00:00\",\"description\":\"This article is part of our Academy Course titled Nagios Tutorial for IT Monitoring. In this course, we provide a compilation of Nagios tutorials that\",\"breadcrumb\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/monitoring\/nagios\/nagios-core-installation-configuration\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.systemcodegeeks.com\/monitoring\/nagios\/nagios-core-installation-configuration\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/monitoring\/nagios\/nagios-core-installation-configuration\/#primaryimage\",\"url\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/nagios-logo.jpg\",\"contentUrl\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/nagios-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/monitoring\/nagios\/nagios-core-installation-configuration\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.systemcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Monitoring\",\"item\":\"https:\/\/www.systemcodegeeks.com\/category\/monitoring\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Nagios\",\"item\":\"https:\/\/www.systemcodegeeks.com\/category\/monitoring\/nagios\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Nagios Core Installation and Configuration on Ubuntu Server\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#website\",\"url\":\"https:\/\/www.systemcodegeeks.com\/\",\"name\":\"System Code Geeks\",\"description\":\"Operating System Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.systemcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.systemcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/systemcodegeeks\",\"https:\/\/x.com\/systemcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/967da353d0f1a1de21c9504942625a5f\",\"name\":\"Gabriel Canepa\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/27b3ea2a3fb1de4ed1c8694a1465c099a86586d8b833a0d852a26d76d750df9f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/27b3ea2a3fb1de4ed1c8694a1465c099a86586d8b833a0d852a26d76d750df9f?s=96&d=mm&r=g\",\"caption\":\"Gabriel Canepa\"},\"description\":\"Gabriel Canepa is a Linux Foundation Certified System Administrator (LFCS-1500-0576-0100) and web developer from Villa Mercedes, San Luis, Argentina. He works for a worldwide leading consumer product company and takes great pleasure in using FOSS tools to increase productivity in all areas of his daily work. When he's not typing commands or writing code or articles, he enjoys telling bedtime stories with his wife to his two little daughters and playing with them, the great pleasure of his life.\",\"sameAs\":[\"http:\/\/www.gabrielcanepa.com.ar\/\",\"https:\/\/www.facebook.com\/gacanepa\",\"https:\/\/ar.linkedin.com\/in\/gacanepa\",\"https:\/\/x.com\/gacanepa\"],\"url\":\"https:\/\/www.systemcodegeeks.com\/author\/gabriel-canepa\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Nagios Core Installation and Configuration on Ubuntu Server - System Code Geeks - 2026","description":"This article is part of our Academy Course titled Nagios Tutorial for IT Monitoring. In this course, we provide a compilation of Nagios tutorials that","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.systemcodegeeks.com\/monitoring\/nagios\/nagios-core-installation-configuration\/","og_locale":"en_US","og_type":"article","og_title":"Nagios Core Installation and Configuration on Ubuntu Server - System Code Geeks - 2026","og_description":"This article is part of our Academy Course titled Nagios Tutorial for IT Monitoring. In this course, we provide a compilation of Nagios tutorials that","og_url":"https:\/\/www.systemcodegeeks.com\/monitoring\/nagios\/nagios-core-installation-configuration\/","og_site_name":"System Code Geeks","article_publisher":"https:\/\/www.facebook.com\/systemcodegeeks","article_author":"https:\/\/www.facebook.com\/gacanepa","article_published_time":"2016-05-19T19:19:21+00:00","article_modified_time":"2017-12-01T15:25:54+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/nagios-logo.jpg","type":"image\/jpeg"}],"author":"Gabriel Canepa","twitter_card":"summary_large_image","twitter_creator":"@gacanepa","twitter_site":"@systemcodegeeks","twitter_misc":{"Written by":"Gabriel Canepa","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.systemcodegeeks.com\/monitoring\/nagios\/nagios-core-installation-configuration\/#article","isPartOf":{"@id":"https:\/\/www.systemcodegeeks.com\/monitoring\/nagios\/nagios-core-installation-configuration\/"},"author":{"name":"Gabriel Canepa","@id":"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/967da353d0f1a1de21c9504942625a5f"},"headline":"Nagios Core Installation and Configuration on Ubuntu Server","datePublished":"2016-05-19T19:19:21+00:00","dateModified":"2017-12-01T15:25:54+00:00","mainEntityOfPage":{"@id":"https:\/\/www.systemcodegeeks.com\/monitoring\/nagios\/nagios-core-installation-configuration\/"},"wordCount":1738,"commentCount":0,"publisher":{"@id":"https:\/\/www.systemcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.systemcodegeeks.com\/monitoring\/nagios\/nagios-core-installation-configuration\/#primaryimage"},"thumbnailUrl":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/nagios-logo.jpg","articleSection":["Nagios"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.systemcodegeeks.com\/monitoring\/nagios\/nagios-core-installation-configuration\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.systemcodegeeks.com\/monitoring\/nagios\/nagios-core-installation-configuration\/","url":"https:\/\/www.systemcodegeeks.com\/monitoring\/nagios\/nagios-core-installation-configuration\/","name":"Nagios Core Installation and Configuration on Ubuntu Server - System Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.systemcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.systemcodegeeks.com\/monitoring\/nagios\/nagios-core-installation-configuration\/#primaryimage"},"image":{"@id":"https:\/\/www.systemcodegeeks.com\/monitoring\/nagios\/nagios-core-installation-configuration\/#primaryimage"},"thumbnailUrl":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/nagios-logo.jpg","datePublished":"2016-05-19T19:19:21+00:00","dateModified":"2017-12-01T15:25:54+00:00","description":"This article is part of our Academy Course titled Nagios Tutorial for IT Monitoring. In this course, we provide a compilation of Nagios tutorials that","breadcrumb":{"@id":"https:\/\/www.systemcodegeeks.com\/monitoring\/nagios\/nagios-core-installation-configuration\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.systemcodegeeks.com\/monitoring\/nagios\/nagios-core-installation-configuration\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.systemcodegeeks.com\/monitoring\/nagios\/nagios-core-installation-configuration\/#primaryimage","url":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/nagios-logo.jpg","contentUrl":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/05\/nagios-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.systemcodegeeks.com\/monitoring\/nagios\/nagios-core-installation-configuration\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.systemcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Monitoring","item":"https:\/\/www.systemcodegeeks.com\/category\/monitoring\/"},{"@type":"ListItem","position":3,"name":"Nagios","item":"https:\/\/www.systemcodegeeks.com\/category\/monitoring\/nagios\/"},{"@type":"ListItem","position":4,"name":"Nagios Core Installation and Configuration on Ubuntu Server"}]},{"@type":"WebSite","@id":"https:\/\/www.systemcodegeeks.com\/#website","url":"https:\/\/www.systemcodegeeks.com\/","name":"System Code Geeks","description":"Operating System Developers Resource Center","publisher":{"@id":"https:\/\/www.systemcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.systemcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.systemcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.systemcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.systemcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.systemcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/systemcodegeeks","https:\/\/x.com\/systemcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/967da353d0f1a1de21c9504942625a5f","name":"Gabriel Canepa","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/27b3ea2a3fb1de4ed1c8694a1465c099a86586d8b833a0d852a26d76d750df9f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/27b3ea2a3fb1de4ed1c8694a1465c099a86586d8b833a0d852a26d76d750df9f?s=96&d=mm&r=g","caption":"Gabriel Canepa"},"description":"Gabriel Canepa is a Linux Foundation Certified System Administrator (LFCS-1500-0576-0100) and web developer from Villa Mercedes, San Luis, Argentina. He works for a worldwide leading consumer product company and takes great pleasure in using FOSS tools to increase productivity in all areas of his daily work. When he's not typing commands or writing code or articles, he enjoys telling bedtime stories with his wife to his two little daughters and playing with them, the great pleasure of his life.","sameAs":["http:\/\/www.gabrielcanepa.com.ar\/","https:\/\/www.facebook.com\/gacanepa","https:\/\/ar.linkedin.com\/in\/gacanepa","https:\/\/x.com\/gacanepa"],"url":"https:\/\/www.systemcodegeeks.com\/author\/gabriel-canepa\/"}]}},"_links":{"self":[{"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/posts\/1273","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/comments?post=1273"}],"version-history":[{"count":0,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/posts\/1273\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/media\/1288"}],"wp:attachment":[{"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/media?parent=1273"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/categories?post=1273"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/tags?post=1273"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}