Learn all the frequently asked interview questions on Nagios
1. Why is Continuous monitoring necessary?
Continuous Monitoring allows timely identification of problems or weaknesses and quick corrective action that helps reduce expenses of an organization. Continuous monitoring provides solution that addresses three operational disciplines known as:
2. What is Nagios?
It is used for Continuous monitoring of systems, applications, services, and business processes etc in a DevOps culture. In the event of a failure, Nagios can alert technical staff of the problem, allowing them to begin remediation processes before outages affect business processes, end-users, or customers.
By using Nagios you can:
3. How does Nagios works?
Nagios runs on a server, usually as a daemon or service. Nagios periodically runs plugins residing on the same server, they contact hosts or servers on your network or on the internet. One can view the status information using the web interface. You can also receive email or SMS notifications if something happens. The Nagios daemon behaves like a scheduler that runs certain scripts at certain moments. It stores the results of those scripts and will run other scripts if these results change.
4. What are Plugins in Nagios?
They are scripts (Perl scripts, Shell scripts, etc.) that can run from a command line to check the status of a host or service. Nagios uses the results from Plugins to determine the current status of hosts and services on your network. Nagios will execute a Plugin whenever there is a need to check the status of a host or service. Plugin will perform the check and then simply returns the result to Nagios. Nagios will process the results that it receives from the Plugin and take the necessary actions.
5. What is NRPE (Nagios Remote Plugin Executor) in Nagios?
The NRPE addon is designed to allow you to execute Nagios plugins on remote Linux/Unix machines. The main reason for doing this is to allow Nagios to monitor “local” resources (like CPU load, memory usage, etc.) on remote machines. Since these public resources are not usually exposed to external machines, an agent like NRPE must be installed on the remote Linux/Unix machines.
The NRPE addon consists of two pieces:
6. What is the difference between Active and Passive check in Nagios?
The major difference between Active and Passive checks is that Active checks are initiated and performed by Nagios, while passive checks are performed by external applications.
Passive checks are useful for monitoring services that are:
The main features of Actives checks are as follows:
7. How does Nagios help with Distributed Monitoring?
With Nagios you can monitor your whole enterprise by using a distributed monitoring scheme in which local slave instances of Nagios perform monitoring tasks and report the results back to a single master. You manage all configuration, notification, and reporting from the master, while the slaves do all the work. This design takes advantage of Nagios’s ability to utilize passive checks i.e. external applications or processes that send results back to Nagios. In a distributed configuration, these external applications are other instances of Nagios.
8. Explain Main Configuration file of Nagios and its location?
The main configuration file contains a number of directives that affect how the Nagios daemon operates. This config file is read by both the Nagios daemon and the CGIs (It specifies the location of your main configuration file). A sample main configuration file is created in the base directory of the Nagios distribution when you run the configure script. The default name of the main configuration file is nagios.cfg. It is usually placed in the etc/ subdirectory of you Nagios installation (i.e. /usr/local/nagios/etc/).
9. Explain how Flap Detection works in Nagios?
Flapping occurs when a service or host changes state too frequently, this causes lot of problem and recovery notifications. Whenever Nagios checks the status of a host or service, it will check to see if it has started or stopped flapping. Nagios follows the below given procedure to do that:
A host or service is determined to have started flapping when its percent state change first exceeds a high flapping threshold. A host or service is determined to have stopped flapping when its percent state goes below a low flapping threshold.
10. What is meant by saying Nagios is Object Oriented?
Using the object configuration format, you can create object definitions that inherit properties from other object definitions. Hence, Nagios is known as object-oriented.
Types of Objects:
11. What is State Stalking in Nagios?
When Stalking is enabled for a particular host or service, Nagios will watch that host or service very carefully and log any changes it sees in the output of check results. Under normal circumstances, the result of a host or service check is only logged if the host or service has changed state since it was last checked.
12. What are the port numbers that Nagios uses for monitoring purposes?
Usually, Nagios uses the following port numbers for monitoring:
13. What is the Nagios Network Analyzer?
14. What are the benefits of HTTP and SSL certificate monitoring with Nagios?
HTTP certificate monitoring
SSL certificate monitoring
15. Explain virtualization with Nagios?
Nagios can run on different virtualization platforms, like VMware, Microsoft Visual PC, Xen, Amazon EC2, etc.
Provides the capabilities to monitor an assortment of metrics on different platforms
Ensures quick detection of service and application failures
Has the ability to monitor the following metrics:
16. Name the three variables that affect recursion and inheritance in Nagios.
name – Template name that can be referenced in other object definitions so it can inherit the object’s properties/variables.
use – Here, you specify the name of the template object that you want to inherit properties/variables from.
register – This variable indicates whether or not the object definition should be registered with Nagios.
Yes, you can use Nagios to monitor the window machine. However, if you are doing it for the first time then you have to follow the given steps:
18. Name down some databases that support Nagios monitoring?
There are a number of databases that support Nagios and some of them are mentioned below:
19. Write down the protocols that support Nagios
Nagios supports the number of protocols monitoring including: SMTP Monitoring, IPMI Monitoring, FTP Monitoring, LDAP Monitoring, POP Monitoring, and DNS monitoring.
20. Suppose if httpd service goes down, how can we automatically start the service using nagios?
We have to create custom Event Handler to achieve this.
21. If we need to monitor windows services like disk usage, memory etc, how can we achieve this via Nagios?
23. What is the difference between HOSTADDRESS and HOSTALIAS macros
24. What are the reasons for UNKNOWN result all the time?
Nagios is not able to fetch correct data due to:
25. What is ocsp_command in nagios?
OCSP is Obsessive Compulsive Service Processor Command which allows you to specify a command to be run after every service check, which can be useful in distributed monitoring. This command is executed after any event handler. or notification commands.
Full Stack Test Automation Expert | Selenium Framework Developer | Certified Tosca Automation Specialist | Postman | DevOps | AWS | IC Agile Certified | Trainer | Youtuber | Blogger|