Nagios Interview Questions
Nagios is common and widely applied devices for Constant Monitoring. As companies are presently delivering software enhanced frequently than eternally hence there is a desperate demand for a device that can monitor the functioning of the software and present partners by the appropriate feedback. This is one of the purposes that led to Continuous Monitoring into the picture. This executes Nagios an extremely powerful device to perform DevOps. Hence following is the list of Nagios Interview Questions. We have accumulated these questions later ingesting a lot of analysis and after reviewing with some of the experts who are straightly associated with the hiring method.
Nagios Interview Questions
Everyone discussing DevOps and the collaborative transformation it can start in the software improvement methodology. It is of no wonder that numerous organizations are presently distributing their tremendous interest in choosing the Chef DevOps Training DevOps culture by the end of 2017 Git Training. The educational shift does not just need the best mechanisms for implementation, however best developers to effectively collaborate with the IT. This possesses created an enormous demand for experienced professionals, who can serve as a perfect bridge linking the improvement and operations crew. If you’re aiming to do DevOps as your ultimate career when you should probably share a professional training given by enterprise experts.
If you are hunting for interview questions on Nagios, then your exploration expires here. In this blog post Coding compiler presenting a list of 20 Nagios Devops interview questions. We wish that those Nagios questions will assist you to answer your next DevOps job interview. This Nagios Interview Questions blog is a part of the blog DevOps Interview Questions. It includes all the DevOps Stages.
1. What is Nagios?
Answer: Nagios is one of the monitoring tools. 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. With Nagios, you don’t have to explain why an unseen infrastructure outage affects your organization’s bottom line.
2. How does Nagios work?
Answer: 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.
3. What are Plugins in Nagios?
Answer: Plugins 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 the plugins to determine the current status of hosts and services on your network.
Once you have defined Plugins I will suggest you explain why we need plugins. Nagios will execute a plugin whenever there is a need to check the status of a host or service. The 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.
4. What is NRPE (Nagios Remote Plugin Executor) in Nagios?
Answer: 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.
- Now I will advise you to explain the NRPE architecture on the basis of the diagram shown below.
- The NRPE addon consists of two pieces:
- The check_nrpe plugin, which resides on the local monitoring machine.
- The NRPE daemon, which runs on the remote Linux/Unix machine.
5. What is meant by Nagios backend? (unable to find a relevant explanation)?
Answer: Both Configuration and Logs can be stored in a backend. Configurations are stored in backend using NagiosQL. Historical data are stored using no utils. In addition, you also have nagdb and old.
6. What Do You Mean By Passive Check-In Nagios?
Answer: Passive checks are initiated and performed by external applications/processes and the Passive check results are submitted to Nagios for processing.
7. Explain The Need For Passive Check?
Answer: Passive checks are useful for monitoring services that are Asynchronous in nature and cannot be monitored effectively by polling their status on a regularly scheduled basis. It can also be used for monitoring services that are Located behind a firewall and cannot be checked actively from the monitoring host.
8. When Does Nagios Check for external commands?
Answer: Nagios check for external commands under the following conditions:
- At regular intervals specified by the command_check_interval option in the main configuration file or,
Immediately after event handlers are executed.
- This is in addition to the regular cycle of external command checks and is done to provide immediate action if an event handler submits commands to Nagios.
9. What is the difference between Active and Passive check in Nagios?
Answer: 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. If your interviewer is looking unconvinced with the above explanation then I will suggest you to also mention some key features of both Active and Passive checks:
Passive checks are useful for monitoring services that are:
Asynchronous in nature and cannot be monitored effectively by polling their status on a regularly scheduled basis.
Located behind a firewall and cannot be checked actively from the monitoring host.
The main features of Actives checks are as follows:
- Active checks are initiated by the Nagios process.
- Active checks are run on a regularly scheduled basis.
10. How does Nagios help with Distributed Monitoring?
Answer: 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.
11. Explain the Main Configuration file of Nagios and its location?
Answer: 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).
Now you can tell where it is present and how it is created.
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.
12. Explain how Flap Detection works in Nagios?
Answer: Flapping occurs when a service or host changes state too frequently, this causes a lot of problem and recovery notifications.
- Once you have defined Flapping explain how Nagios detects Flapping.
- Whenever Nagios checks the status of a host or service, it will check to see if it has started or stopped flapping. Nagios follow the below procedure to do that:
- Storing the results of the last 21 checks of the host or service analyzing the historical check results and determine where state changes/transitions occur.
- Using the state transitions to determine a percent state change value (a measure of change) for the host or service.
Comparing the percent state change value against low and high flapping thresholds 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.
13. What is meant by saying Nagios is Object-Oriented?
Answer: One of the features of Nagios is object configuration format in that you can create object definitions that inherit properties from other object definitions and hence the name. This simplifies and clarifies relationships between various components.
14. What is State Stalking in Nagios?
Answer: State Stalking is used for logging purposes. 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.
Depending on the discussion between you and interviewer you can also add: It can be very helpful in the later analysis of the log files. 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.
15. Nagios says my machine is unreachable, not down. What is the difference and how it is achieved?
Answer: When Nagios says a node is unreachable, a node is unreachable if Nagios is not able to find a path to the node.
- Now you can mention the difference.
- The node itself may be up but because Nagios is unable to connect to it, it has to mark this as unreachable. To achieve this, Nagios use the parent-child relationship between components.
- Finally, for better understanding explain it with an example.
- A router may be defined as a parent for a server.
- Now, Nagios checks for server and marks it as down.
- It then checks the parent (in our example, the router)
- If the parent is also down, then the server is marked as unreachable.
- If Parent is up, the server is marked as really down.
16. Explain What Is Soft And Hard States?
Answer: When a service or host check results are in a non-OK or non-UP state and the service check has not yet been rechecked the number of times specified by the max_check_attempts directives in the service or host definition. This is called Soft Error. When a service or a host recovers from Soft Error that is considered as Soft Recovery.
When a service or host check results are in a non-OK or non-UP state and the service check has been rechecked the number of times specified by the max_check_attempts directives in the service or host definition. This is called Hard Error. When a service or a host recovers from Hard Error that is considered as Hard Recovery.
17. What Are Ports Numbers Nagios Will Use To Monitor Clients?
Answer: Port numbers are 5666, 5667 and 5668
18. Explain Main Configuration File And Its Location?
Answer: Resource File: It is used to store sensitive information like username, passwords without making them available to the CGIs.
- Default path: /usr/local/Nagios/etc/resource.cfg
- Object Definition Files: It is the location where you define all you want to monitor and how you want to monitor. It is used to define hosts, services, hostgroups, contacts, contact groups, commands, etc.. Default Path:/usr/local/Nagios/etc/objects/
- CGI Configuration File: The CGI configuration file contains a number of directives that affect the operation of the CGIs. It also contains a reference the main configuration file, so the CGIs know how you’ve configured Nagios and where your object definitions are stored.
19. How To Generate Performance Graphs?
Answer: In Nagios Core, there is no inbuilt option to generate the performance graphs, We have to install pnp4nagios and add hosts and services URL’s in definition files.
20. How To Verify Nagios Configuration?
Answer: In order to verify your configuration, run Nagios with the -v command-line option like so:
If you’ve forgotten to enter some critical data or misconfigured things, Nagios will spit out a warning or error message that should point you to the location of the problem. Error messages generally print out the line in the configuration file that seems to be the source of the problem. On errors, Nagios will often exit the pre-flight check and return to the command prompt after printing only the first error that it has encountered.