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 ”;

Nagios – NRPE

Nagios – NRPE ”; Previous Next The Nagios daemon which run checks on remote machines in NRPE (Nagios Remote Plugin Executor). It allows you to run Nagios plugins on other machines remotely. You can monitor remote machine metrics such as disk usage, CPU load etc. It can also check metrics of remote windows machines through some windows agent addons. Let us see how to install and configure NRPE step by step on client machine which needs to be monitored. Step 1 − Run below command to install NRPE on the remote linux machine to be monitored. sudo apt-get install nagios-nrpe-server nagios-plugins Step 2 − Now, create a host file inside the server directory, and put all the necessary definitions for the host. 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 } define service { host_name ubuntu_host service_description Check Users check_command check_local_users!20!50 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 } define service { host_name ubuntu_host service_description Local Disk check_command check_local_disk!20%!10%!/ max_check_attempts 2 check_interval 2 retry_interval 2 check_period 24×7 check_freshness 1 groups admins notification_interval 2 notification_period 24×7 notifications_enabled 1 register 1 } define service { host_name ubuntu_host service_description Check SSH check_command check_ssh 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 } define service { host_name ubuntu_host service_description Total Process check_command check_local_procs!250!400!RSZDT 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 } Step 3 − Run the command shown below for the verification of configuration file. sudo /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg Step 4 − Restart NRPE, Apache and Nagios if there are no errors. service nagios-nrpe-server restart service apache2 restart service nagios restart Step 5 − Open your browser and go to Nagios web interface. You can see the host which needs to be monitored has been added to Nagios core service. Similarly, you can add more hosts to be monitored by Nagios. Print Page Previous Next Advertisements ”;

Nagios – Case Study

Nagios – Case Study ”; Previous Next In this chapter, let us look into case studies of two organizations that have successfully implemented Nagios. Bitnetix with Nagios Bitnetix in an IT consulting organization which is into networking, datacenter, monitoring and Voice over IP. Through their offerings, they make small businesses look big. Their solutions help you in managing customer relationships in a better way by increasing more engagement and improving their satisfaction. They say they are in business of communication, hence communicating right message to their customers at the right time is very important for them. Bitnetix was working with a customer who were into Email Marketing. They used to monitor AWS servers which were dynamically allocated and were responsible to deliver thousands of emails to customers. They were using Nagios core earlier but wanted to move to new Nagios XI and integrate with chef with zero downtime. There were challenges in moving live status configuration on Nagios core to appropriate checks in Nagios XI. But with Nagios, they were able to setup Nagios XI configuration file with chef integrated. They were able to move all the customers from Nagios core to Nagios XI with Zero downtime. Nagios XI was also able to integrate with PagerDuty for sending instant notifications. EverWatch.gobal with Nagios EverWatch.global is an IT management and consulting organization which helps non-profit and small/medium organizations. Its headquarter is based in Rochester, New York. They have won numerous awards for their work with Nagios. EverWatch.global was working with an ecommerce retail client with a billion-dollar annual revenue. They were responsible to keeping the website up and running at all the time, monitoring cart and checkout functionality, send notifications to necessary staff in case of defamation. The challenge was their client’s servers were located 500 miles from its headquarters in New York. For monitoring production, staging, quality assurance and development on the same platform, the configurations were supposed to be unique and similar for both areas. With the help of Nagios, they were able to create ssh firewall rules for equipment and Network Operations Center. They were also able to perform checks for defamation occurrences and reduced false positives. By configuring event handlers in Nagios, the number of notifications drastically decreased. Nagios helped them by keeping their client’s website uptime to 98% annually from 85% annually, this was a huge success. “In real dollar terms, the company was able to achieve almost $125,000,000 in additional sales as a result.” Eric Loyd, CEOEverWatch Global. Print Page Previous Next Advertisements ”;

Nagios – Products

Nagios – Products ”; Previous Next 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. Print Page Previous Next Advertisements ”;

Nagios – Configuration

Nagios – Configuration ”; Previous Next In the previous chapter, we have seen the installation of Nagios. In this chapter, let us understand its configuration in detail. The configuration files of Nagios are located in /usr/local/nagios/etc. These files are shown in the screenshot given below − Let us understand the importance of each file now − nagios.cfg This is the main configuration file of Nagios core. This file contains the location of log file of Nagios, hosts and services state update interval, lock file and status.dat file. Nagios users and groups on which the instances are running are defined in this file. It has path of all the individual object config files like commands, contacts, templates etc. cgi.cfg By default, the CGI configuration file of Nagios is named cgi.cfg. It tells the CGIs where to find the main configuration file. The CGIs will read the main and host config files for any other data they might need. It contains all the user and group information and their rights and permissions. It also has the path for all frontend files of Nagios. resource.cfg You can define $USERx$ macros in this file, which can in turn be used in command definitions in your host config file(s). $USERx$ macros are useful for storing sensitive information such as usernames, passwords, etc. They are also handy for specifying the path to plugins and event handlers – if you decide to move the plugins or event handlers to a different directory in the future, you can just update one or two $USERx$ macros, instead of modifying a lot of command definitions. Resource files may also be used to store configuration directives for external data sources like MySQL. The configuration files inside objects directory have are used to define commands, contacts, hosts, services etc. commands.cfg This config file provides you with some example command definitions that you can refer in host, service, and contact definitions. These commands are used to check and monitor hosts and services. You can run these commands locally on a Linux console where you will also get the output of the command you run. Example define command { command_name check_local_disk command_line $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$ } define command { command_name check_local_load command_line $USER1$/check_load -w $ARG1$ -c $ARG2$ } define command { command_name check_local_procs command_line $USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$ } contacts.cfg This file contains contacts and groups information of Nagios. By default, one contact is already present Nagios admin. Example define contact { contact_name nagiosadmin use generic-contact alias Nagios Admin email [email protected] } define contactgroup { contactgroup_name admins alias Nagios Administrators members nagiosadmin } templates.cfg This config file provides you with some example object definition templates that are referred by other host, service, contact, etc. definitions in other config files. timeperiods.cfg This config file provides you with some example timeperiod definitions that you can refer in host, service, contact, and dependency definitions. Print Page Previous Next Advertisements ”;