Nagios – Applications

Nagios – Applications ”; Previous Next Nagios can be applicable to a wide range of applications. They are given here − Monitor host resources such as disk space, system logs etc. Monitor network resources – http, ftp, smtp, ssh etc. Monitor log files continuously to identify infra-issue. Monitor windows/linux/unix/web applications and its state. Nagios Remote Plugin Executer (NRPE) can monitor services remotely. Run service checks in parallel. SSH or SSL tunnels can also be used for remote monitoring. Send alerts/notifications via email, sms, pager of any issue on infrastructure Recommending when to upgrade the IT infrastructure. Print Page Previous Next Advertisements ”;

Nagios – V Shell

Nagios – V Shell ”; Previous Next V-Shell is a lightweight web interface to Nagios Core written in PHP. It is easy to install and use and it is an alternative to Nagios output. The frontend of VShell is on AngularJs, hence the design is responsive and modern. It provides Quicksearch functionality and RESTful API powered by CodeIgniter. Nagios VShell is compatible with Nagios XI and Nagios Core 3.x. It requires php 5.3 or higher, php-cli and apache installed in the system. Let us see how to install Nagios VShell. Step 1 − Go to tmp directory and download the vshell tar file. cd /tmp wget http://assets.nagios.com/downloads/exchange/nagiosvshell/vshell.tar.gz Step 2 − Extract the tar file. tar zxf vshell.tar.gz Step 3 − Go to vshell directory and give executable permission to install.php file. Finally, run the install script. cd vshell chmod +x install.php ./install.php Step 4 − Now go to https://192.168.56.101/vshell in your browser, login with nagiosadmin and your Vshell will appear. Print Page Previous Next Advertisements ”;

Nagios – Discussion

Nagios Discuss ”; Previous Next Nagios is the most popular continuous monitoring tool. It monitors complete IT infrastructure including its systems, applications, services processes etc. This tutorial gives an overview of Nagios and lets learners start their journey with Nagios. Print Page Previous Next Advertisements ”;

Nagios – Ports and Protocols

Nagios – Ports and Protocols ”; Previous Next This chapter gives an idea of ports and protocols that Nagios comprises. Protocols The default protocols used by Nagios are as given under − http(s), ports 80 and 443 − The product interfaces are web-based in Nagios. Nagios agents can use http to move data. snmp, ports 161 and 162 − snmp is an important part of network monitoring. Port 161 is used to send requests to nodes and post 162 is used to receive results. ssh, port 22 − Nagios is built to run natively on CentOS or RHEL Linux. Administrator can login into Nagios through SSH whenever they feel to do so and perform checks. Ports The Default ports used by common Nagios Plugins are as given under − Butcheck_nt (nsclient++) 12489 NRPE 5666 NSCA 5667 NCPA 5693 MSSQL 1433 MySQL 3306 PostgreSQL 5432 MongoDB 27017, 27018 OracleDB 1521 Email (SMTP) 25, 465, 587 WMI 135, 445 / additionaldynamically-assigned ports in 1024-1034 range Print Page Previous Next Advertisements ”;

Nagios – Hosts and Services

Nagios – Hosts and Services ”; Previous Next Nagios is the most popular tool which is used to monitor hosts and services running in your IT infrastructure. Hosts and service configurations are the building blocks of Nagios Core. Host is just like a computer; it can be a physical device or virtual. Services are those which are used by Nagios to check something about a host. You can create a host file inside the server directory of Nagios and mention the host and service definitions. For example − sudo gedit /usr/local/nagios/etc/servers/ubuntu_host.cfg # Ubuntu Host configuration file define host { use linux-server host_name ubuntu_host alias Ubuntu Host address 192.168.1.10 register 1 } define service { host_name ubuntu_host service_description PING check_command check_ping!100.0,20%!500.0,60% max_check_attempts 2 check_interval 2 retry_interval 2 check_period 24×7 check_freshness 1 contact_groups admins notification_interval 2 notification_period 24×7 notifications_enabled 1 register 1 } The above definitions add a host called ubuntu_host and defines the services which will run on this host. When you restart the Nagios, this host will start getting monitored by Nagios and the specified services will run. There are many more services in Nagios which can be used to monitor pretty much anything on the running host. Print Page Previous Next Advertisements ”;

Nagios – Installation

Nagios – Installation ”; Previous Next In this chapter, the steps to setup Nagios on Ubuntu are discussed in detail. Before you install Nagios, some packages such as Apache, PHP, building packages etc., are required to be present on your Ubuntu system. Hence, let us install them first. Step 1 − Run the following command to install pre-required packages − sudo apt-get install wget build-essential apache2 php apache2-mod-php7.0 php-gd libgd-dev sendmail unzip Step 2 − Next, create user and group for Nagios and add them to Apache www-data user. sudo useradd nagios sudo groupadd nagcmd sudo usermod -a -G nagcmd nagios sudo usermod -a -G nagios,nagcmd www-data Step 3 − Download the latest Nagios package. wget https://assets.nagios.com/downloads/nagioscore/releases/nagios- 4.4.3.tar.gz Step 4 − Extract the tarball file. tar -xzf nagios-4.4.3.tar.gz cd nagios-4.4.3/ Step 5 − Run the following command to compile Nagios from source. ./configure –with-nagios-group=nagios –with-command-group=nagcmd Step 6 − Run the following command to build Nagios files. make all Step 7 − Run the command shown below to install all the Nagios files. sudo make install Step 8 − Run the following commands to install init and external command configuration files. sudo make install-commandmode sudo make install-init sudo make install-config sudo /usr/bin/install -c -m 644 sample-config/httpd.conf /etc/apache2/sitesavailable/ nagios.conf Step 9 − Now copy the event handler directory to Nagios directory. sudo cp -R contrib/eventhandlers/ /usr/local/nagios/libexec/ sudo chown -R nagios:nagios /usr/local/nagios/libexec/eventhandlers Step 10 − Download and extract Nagios plugins. cd wget https://nagios-plugins.org/download/nagiosplugins- 2.2.1.tar.gz tar -xzf nagios-plugins*.tar.gz cd nagios-plugins-2.2.1/ Step 11 − Install Nagios plugins using the below command. ./configure –with-nagios-user=nagios –with-nagios-group=nagios –with-openssl make sudo make install Step 12 − Now edit the Nagios configuration file and uncomment line number 51 → cfg_dir=/usr/local/nagios/etc/servers sudo gedit /usr/local/nagios/etc/nagios.cfg Step 13 − Now, create a server directory. sudo mkdir -p /usr/local/nagios/etc/servers Step 14 − Edit contacts configuration file. sudo gedit /usr/local/nagios/etc/objects/contacts.cfg Step 15 − Now enable the Apache modules and configure a user nagiosadmin. sudo a2enmod rewrite sudo a2enmod cgi sudo htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin sudo ln -s /etc/apache2/sites-available/nagios.conf /etc/apache2/sites-enabled/ Step 16 − Now, restart Apache and Nagios. service apache2 restart service nagios start cd /etc/init.d/ sudo cp /etc/init.d/skeleton /etc/init.d/Nagios Step 17 − Edit the Nagios file. sudo gedit /etc/init.d/Nagios DESC = “Nagios” NAME = nagios DAEMON = /usr/local/nagios/bin/$NAME DAEMON_ARGS = “-d /usr/local/nagios/etc/nagios.cfg” PIDFILE = /usr/local/nagios/var/$NAME.lock Step 18 − Make the Nagios file executable and start Nagios. sudo chmod +x /etc/init.d/nagios service apache2 restart service nagios start Step 19 − Now go to your browser and open url → http://localhost/nagios. Now login to Nagios with username nagiosadmin and use the password which you had set earlier. The login screen of Nagios is as shown in the screenshot given below − If you have followed all the steps correctly, you Nagios web interface will show up. You can find the Nagios dashboard as shown below − Print Page Previous Next Advertisements ”;

Nagios – Quick Guide

Nagios – Quick Guide ”; Previous Next Nagios – Overview DevOps lifecycle is a continuous loop of several stages, continuous monitoring is the last stage of this loop. Continuous monitoring is one of the stages in this lifecycle. In this chapter, let us learn in detail about what continuous monitoring is and how Nagios is helpful for this purpose. What is Continuous Monitoring Continuous monitoring starts when the deployment is done on the production servers. From then on, this stage is responsible to monitor everything happening. This stage is very crucial for the business productivity. There are several benefits of using Continuous monitoring − It detects all the server and network problems. It finds the root cause of the failure. It helps in reducing the maintenance cost. It helps in troubleshooting the performance issues. It helps in updating infrastructure before it gets outdated. It can fix problems automatically when detected. It makes sure the servers, services, applications, network is always up and running. It monitors complete infrastructure every second. What is Nagios Nagios is an open source continuous monitoring tool which monitors network, applications and servers. It can find and repair problems detected in the infrastructure, and stop future issues before they affect the end users. It gives the complete status of your IT infrastructure and its performance. Why Nagios Nagios offers the following features making it usable by a large group of user community − It can monitor Database servers such as SQL Server, Oracle, Mysql, Postgres It gives application level information (Apache, Postfix, LDAP, Citrix etc.). Provides active development. Has excellent support form huge active community. Nagios runs on any operating system. It can ping to see if host is reachable. Benefits of Nagios Nagios offers the following benefits for the users − It helps in getting rid of periodic testing. It detects split-second failures when the wrist strap is still in the “intermittent” stage. It reduces maintenance cost without sacrificing performance. It provides timely notification to the management of control and breakdown. Nagios – Architecture This chapter talks in detail about Nagios architecture. Nagios Architecture The following points are worth notable about Nagios architecture − Nagios has server-agent architecture. Nagios server is installed on the host and plugins are installed on the remote hosts/servers which are to be monitored. Nagios sends a signal through a process scheduler to run the plugins on the local/remote hosts/servers. Plugins collect the data (CPU usage, memory usage etc.) and sends it back to the scheduler. Then the process schedules send the notifications to the admin/s and updates Nagios GUI. The following figure shows Nagios Server Agent Architecture in detail − Nagios – Products Nagios contains various products as discussed in detail below − Nagios XI It provides monitoring for complete IT infrastructure components like applications, services, network, operating systems etc. It gives a complete view of your infrastructure and business processes. The GUI is easily customizable giving the used flexibility. The standard edition of this tool costs $1995 and enterprise edition costs $3495. Nagios Core It is the core on monitoring IT infrastructure. Nagios XI product is also fundamentally based on Nagios core. Whenever there is any issue of failure in the infrastructure, it sends an alert/notification to the admin who can take the action quickly to resolve the issue. This tool is absolutely free. Nagios Log Server It makes searching of log data very simple and easy. It keeps all the log data at one location with high availability setup. It can easily send alerts if any issue is found in the log data. It can scale to 1000s of severs giving more power, speed, storage, and reliability to your log analysis platform. The price of this tool depends on the number of instances – 1 Instance $3995, 2 Instances $4995, 3 Instances $5995, 4 Instances $6995, 10 Instances $14995. Nagios Fusion This product provides a centralized view of complete monitoring system. With Nagios Fusion, you scan setup separate monitoring servers for separate geographies. It can be easily integrated with Nagios XI and Nagios core to give the complete visibility of the infrastructure. This tools costs $2495. Nagios Network Analyser It gives the complete information of the network infrastructure to the admin with the potential threats on the network so that admin can take quick actions. It shares very detailed data about the network after in-depth network analysis. This tools costs $1995. Nagios – Installation In this chapter, the steps to setup Nagios on Ubuntu are discussed in detail. Before you install Nagios, some packages such as Apache, PHP, building packages etc., are required to be present on your Ubuntu system. Hence, let us install them first. Step 1 − Run the following command to install pre-required packages − sudo apt-get install wget build-essential apache2 php apache2-mod-php7.0 php-gd libgd-dev sendmail unzip Step 2 − Next, create user and group for Nagios and add them to Apache www-data user. sudo useradd nagios sudo groupadd nagcmd sudo usermod -a -G nagcmd nagios sudo usermod -a -G nagios,nagcmd www-data Step 3 − Download the latest Nagios package. wget https://assets.nagios.com/downloads/nagioscore/releases/nagios- 4.4.3.tar.gz Step 4 − Extract the tarball file. tar -xzf nagios-4.4.3.tar.gz cd nagios-4.4.3/ Step 5 − Run the following command to compile Nagios from source. ./configure –with-nagios-group=nagios –with-command-group=nagcmd Step 6 − Run the following command to build Nagios files. make all Step 7 − Run the command shown below to install all the Nagios files. sudo make install Step 8 − Run the following commands to install init and external command configuration files. sudo make install-commandmode sudo make install-init sudo make install-config sudo /usr/bin/install -c -m 644 sample-config/httpd.conf /etc/apache2/sitesavailable/ nagios.conf Step 9 − Now copy the event handler directory to Nagios directory. sudo cp -R contrib/eventhandlers/ /usr/local/nagios/libexec/ sudo chown -R nagios:nagios /usr/local/nagios/libexec/eventhandlers Step 10 − Download and extract Nagios plugins. cd wget https://nagios-plugins.org/download/nagiosplugins- 2.2.1.tar.gz tar -xzf nagios-plugins*.tar.gz cd nagios-plugins-2.2.1/ Step 11 − Install Nagios plugins using the below command. ./configure –with-nagios-user=nagios –with-nagios-group=nagios –with-openssl make sudo make install Step 12 −

Nagios – Features

Nagios – Features ”; Previous Next Nagios is the monitoring tool with multitude of features as given below − Nagios Core is open source, hence free to use. Powerful monitoring engine which can scale and manage 1000s of hosts and servers. Comprehensive web dashboard giving the visibility of complete network components and monitoring data. It has multi-tenant capabilities where multiple users have access to Nagios dashboard. It has extendable architecture which can easily integrate with third-party applications with multiple APIs. Nagios has a very active and big community with over 1 million + users across the globe. Fast alerting system, sends alerts to admins immediately after any issue is identified. Multiple plugins available to support Nagios, custom coded plugins can also be used with Nagios. It has good log and database system storing everything happening on the network with ease. Proactive Planning feature helps to know when it’s time to upgrade the infrastructure. Print Page Previous Next Advertisements ”;

Nagios – Overview

Nagios – Overview ”; Previous Next DevOps lifecycle is a continuous loop of several stages, continuous monitoring is the last stage of this loop. Continuous monitoring is one of the stages in this lifecycle. In this chapter, let us learn in detail about what continuous monitoring is and how Nagios is helpful for this purpose. What is Continuous Monitoring Continuous monitoring starts when the deployment is done on the production servers. From then on, this stage is responsible to monitor everything happening. This stage is very crucial for the business productivity. There are several benefits of using Continuous monitoring − It detects all the server and network problems. It finds the root cause of the failure. It helps in reducing the maintenance cost. It helps in troubleshooting the performance issues. It helps in updating infrastructure before it gets outdated. It can fix problems automatically when detected. It makes sure the servers, services, applications, network is always up and running. It monitors complete infrastructure every second. What is Nagios Nagios is an open source continuous monitoring tool which monitors network, applications and servers. It can find and repair problems detected in the infrastructure, and stop future issues before they affect the end users. It gives the complete status of your IT infrastructure and its performance. Why Nagios Nagios offers the following features making it usable by a large group of user community − It can monitor Database servers such as SQL Server, Oracle, Mysql, Postgres It gives application level information (Apache, Postfix, LDAP, Citrix etc.). Provides active development. Has excellent support form huge active community. Nagios runs on any operating system. It can ping to see if host is reachable. Benefits of Nagios Nagios offers the following benefits for the users − It helps in getting rid of periodic testing. It detects split-second failures when the wrist strap is still in the “intermittent” stage. It reduces maintenance cost without sacrificing performance. It provides timely notification to the management of control and breakdown. Print Page Previous Next Advertisements ”;

Nagios – Home

Nagios Tutorial PDF Version Quick Guide Resources Job Search Discussion Nagios is the most popular continuous monitoring tool. It monitors complete IT infrastructure including its systems, applications, services processes etc. This tutorial gives an overview of Nagios and lets learners start their journey with Nagios. Audience This tutorial is for those who want to gain expertise in continuous monitoring using Nagios. It is also ideal for DevOps engineers who are yet to learn Nagios for continuous monitoring. Prerequisites The tutorial is written with an assumption that the learner is comfortable working with Ubuntu System 16.04/18.04, and basic packages like gcc compiler, build essential, apache, php and root/sudo access. If you are new to any of these concepts, we suggest you to pick up tutorials related to these concepts. You can also consider choosing Linux and Ubuntu tutorials for a better understanding. Print Page Previous Next Advertisements ”;