InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
How To Verify Nagios Configuration? |
|
Answer» In order to verify your configuration, run Nagios with the -v command line option like so: /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg 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. In order to verify your configuration, run Nagios with the -v command line option like so: /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg 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. |
|
| 2. |
What Are Objects? |
|
Answer» Objects are all the elements that are involved in the monitoring and notification logic. Types of objects include:
Objects are all the elements that are involved in the monitoring and notification logic. Types of objects include: |
|
| 3. |
How Do I Use Plugin X? |
|
Answer» We have to download the PLUGINS from nagios exchange HTTPS://exchange.nagios.org/. Then check the nagios plugin by running manually. Most all plugins will DISPLAY BASIC usage information when you EXECUTE them using ‘-h’ or ‘–help’ on the command line. We have to download the plugins from nagios exchange https://exchange.nagios.org/. Then check the nagios plugin by running manually. Most all plugins will display basic usage information when you execute them using ‘-h’ or ‘–help’ on the command line. |
|
| 4. |
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 DEFINATION files. 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 defination files. |
|
| 5. |
What Is The Difference Between Nagiosxi And Nagios Core? |
|
Answer» NagiosXI is a PAID version and Nagios CORE is a FREE version. NagiosXI includes lot of features which we can modify using web interface. Nagios Core default not INCLUDE all the features we have to implement by installing plugins. NagiosXI is a Paid version and Nagios core is a free version. NagiosXI includes lot of features which we can modify using web interface. Nagios Core default not include all the features we have to implement by installing plugins. |
|
| 6. |
What Is State Stalking? |
|
Answer» Stalking is PURELY 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. As you’ll see, it can be very helpful to you in 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. There are a few exceptions to this, but for the most part, that’s the rule. If you ENABLE stalking for one or more states of a particular host or service, Nagios will log the results of the host or service check if the output from the check differs from the output from the PREVIOUS check. Stalking is purely 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. As you’ll see, it can be very helpful to you in 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. There are a few exceptions to this, but for the most part, that’s the rule. If you enable stalking for one or more states of a particular host or service, Nagios will log the results of the host or service check if the output from the check differs from the output from the previous check. |
|
| 7. |
Explain Distributed Monitoring ? |
|
Answer» Nagios can be configured to support distributed monitoring of network services and resources. When setting up a distributed monitoring environment with Nagios, there are differences in the way the CENTRAL and distributed SERVERS are configured. The function of a distributed server is to actively perform checks all the services you define for a “cluster” of hosts. it basically just mean an arbitrary group of hosts on your network. Depending on your network layout, you may have several clusters at one physical location, or each cluster may be separated by a WAN, its own firewall, etc. There is one distributed server that runs Nagios and monitors the services on the hosts in each cluster. A distributed server is usually a bare-bones installation of Nagios. It doesn’t have to have the web interface installed, send out notifications, run event handler scripts, or do anything other than EXECUTE service checks if you don’t want it to. The purpose of the central server is to SIMPLY listen for service check results from one or more distributed servers. Even though services are occasionally actively checked from the central server, the active checks are only PERFORMED in dire circumstances. Nagios can be configured to support distributed monitoring of network services and resources. When setting up a distributed monitoring environment with Nagios, there are differences in the way the central and distributed servers are configured. The function of a distributed server is to actively perform checks all the services you define for a “cluster” of hosts. it basically just mean an arbitrary group of hosts on your network. Depending on your network layout, you may have several clusters at one physical location, or each cluster may be separated by a WAN, its own firewall, etc. There is one distributed server that runs Nagios and monitors the services on the hosts in each cluster. A distributed server is usually a bare-bones installation of Nagios. It doesn’t have to have the web interface installed, send out notifications, run event handler scripts, or do anything other than execute service checks if you don’t want it to. The purpose of the central server is to simply listen for service check results from one or more distributed servers. Even though services are occasionally actively checked from the central server, the active checks are only performed in dire circumstances. |
|
| 8. |
What Is Nrpe? |
|
Answer» The Nagios REMOTE Plugin Executor addon is designed to allow you to execute Nagios plugins on remote Linux/Unix machines. The main The NRPE addon CONSISTS of two pieces:
When Nagios needs to monitor a resource of service from a remote Linux/Unix machine:
The Nagios Remote Plugin Executor addon is designed to allow you to execute Nagios plugins on remote Linux/Unix machines. The main The NRPE addon consists of two pieces: When Nagios needs to monitor a resource of service from a remote Linux/Unix machine: |
|
| 9. |
What Is Ndoutils ? |
|
Answer» The NDOUTILS addon is designed to store all CONFIGURATION and event data from NAGIOS in a database. Storing information from Nagios in a database will allow for quicker retrieval and processing of that data and will help SERVE as a foundation for the development of a new PHP-based web interface in Nagios 4.1. MYSQL databases are currently supported by the addon and PostgreSQL support is in development. The NDOUTILS addon was designed to work for users who have:
Each Nagios process, whether it is a standalone monitoring server or part of a distributed, redundant, or failover monitoring setup, is referred to as an “instance”. In order to maintain the integrity of STORED data, each Nagios instance must be labeled with a unique identifier or name. The NDOUTILS addon is designed to store all configuration and event data from Nagios in a database. Storing information from Nagios in a database will allow for quicker retrieval and processing of that data and will help serve as a foundation for the development of a new PHP-based web interface in Nagios 4.1. MySQL databases are currently supported by the addon and PostgreSQL support is in development. The NDOUTILS addon was designed to work for users who have: Each Nagios process, whether it is a standalone monitoring server or part of a distributed, redundant, or failover monitoring setup, is referred to as an “instance”. In order to maintain the integrity of stored data, each Nagios instance must be labeled with a unique identifier or name. |
|
| 10. |
What Are The Components That Make Up The Ndo Utilities ? |
|
Answer» There are four main components that make up the NDO utilities:
There are four main components that make up the NDO utilities: |
|
| 11. |
What Are The Operating Systems We Can Monitor Using Nagios..? |
|
Answer» Any OPERATING System We can monitor USING Nagios, OS should SUPPORT to install Nagios Clinet either SNMP. Any Operating System We can monitor using Nagios, OS should support to install Nagios Clinet either SNMP. |
|
| 12. |
What Is Database Is Used By Nagios To Store Collected Status Data? |
|
Answer» NAGIOS CORE will use default RRD DATABASE FORMAT to store status data Nagios core will use default RRD database format to store status data |
|
| 13. |
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 NDOUTILS. In addition, you ALSO have nagdb and opdb. Both Configuration and Logs can be stored in a backend. Configurations are stored in backend using NagiosQL. Historical data are stored using ndoutils. In addition, you also have nagdb and opdb. |
|
| 14. |
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. 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. |
|
| 15. |
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.
Passive checks are initiated and performed by external applications/processes and the Passive check results are submitted to Nagios for processing.
|
|
| 16. |
When Does Nagios Check For External Commands? |
|
Answer» NAGIOS check for EXTERNAL commands under the following conditions:
Nagios check for external commands under the following conditions: |
|
| 17. |
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. Passive checks are useful for monitoring services that are:
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: |
|
| 18. |
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. 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. |
|
| 19. |
Explain 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 (i.e. /usr/local/nagios/etc/). 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 (i.e. /usr/local/nagios/etc/). |
|
| 20. |
Explain How Flap Detection Works In Nagios? |
|
Answer» Flapping occurs when a service or host changes state too frequently, this causes 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:
Flapping occurs when a service or host changes state too frequently, this causes 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: |
|
| 21. |
What Are The Three Main Variables That Affect Recursion And Inheritance In Nagios? |
|
Answer» FIRST name the VARIABLES and then a small explanation of each of these variables:
Now I will give a small explanation for each of these variables. Name is a placeholder that is used by other objects. Use DEFINES the “parent” object WHOSE properties should be used. Register can have a value of 0 (indicating its only a template) and 1 (an actual object). The register value is never inherited. First name the variables and then a small explanation of each of these variables: Now I will give a small explanation for each of these variables. Name is a placeholder that is used by other objects. Use defines the “parent” object whose properties should be used. Register can have a value of 0 (indicating its only a template) and 1 (an actual object). The register value is never inherited. |
|
| 22. |
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. 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. |
|
| 23. |
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 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. 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 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. |
|
| 24. |
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. 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 parent-child relationship between COMPONENTS. Finally for better understanding explain it with an EXAMPLE.
When Nagios says a node is unreachable, a node is unreachable if Nagios is not able to find a path to the node. 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 parent-child relationship between components. Finally for better understanding explain it with an example. |
|
| 25. |
Explain What Is Soft And Hard States? |
Answer»
|
|
| 26. |
Explain Nagios State Types? |
| Answer» | |
| 27. |
Now, Once You Have Defined What Is Nagios, You Can Mention The Various Things That You Can Achieve Using Nagios? |
|
Answer» By using NAGIOS you can: • Plan for infrastructure upgrades before outdated systems CAUSE failures. • Respond to issues at the first sign of a problem. • Automatically fix problems when they are detected. • Coordinate technical team responses. • Ensure your organization’s SLAs are being MET. • Ensure IT infrastructure outages have a minimal effect on your organization’s bottom line. • Monitor your entire infrastructure and business processes. This OVERALL completes the answer to this question. The further details like advantages etc. can be added as per the direction where the discussion is heading. By using Nagios you can: • Plan for infrastructure upgrades before outdated systems cause failures. • Respond to issues at the first sign of a problem. • Automatically fix problems when they are detected. • Coordinate technical team responses. • Ensure your organization’s SLAs are being met. • Ensure IT infrastructure outages have a minimal effect on your organization’s bottom line. • Monitor your entire infrastructure and business processes. This overall completes the answer to this question. The further details like advantages etc. can be added as per the direction where the discussion is heading. |
|
| 28. |
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 affects business processes, end-users, or customers. With Nagios you don’t have to explain why an UNSEEN infrastructure OUTAGE affect your organization’s bottom line.
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 affects business processes, end-users, or customers. With Nagios you don’t have to explain why an unseen infrastructure outage affect your organization’s bottom line.
|
|
| 29. |
Nagios Administrator Is Adding 100+ Clients In Monitoring But He Don’t Want To Add Every .cfg File Entry In Nagios.cfg File He Want To Enable A Directory Path. How Can He Configure Directory For All Configuration Files? |
|
Answer» He can able to achieve the above scenario by adding the directory PATH in nagios.cfg file, in LINE NUMBER 54 we have to ADD below line. 54 cfg_dir=/usr/local/nagios/etc/objects/monitor He can able to achieve the above scenario by adding the directory path in nagios.cfg file, in line number 54 we have to add below line. 54 cfg_dir=/usr/local/nagios/etc/objects/monitor |
|
| 30. |
Explain Main Configuration File And Its Location? |
Answer»
|
|
| 31. |
What Are Ports Numbers Nagios Will Use To Monitor Clients? |
|
Answer» PORT NUMBERS are 5666, 5667 and 5668 Port numbers are 5666, 5667 and 5668 |
|
| 32. |
What Is Nagios And How It Works ? |
|
Answer» Nagios is an open source System and Network MONITORING application. Nagios runs on a server, usually as a daemon or SERVICE. Nagios periodically run plugins to monitor CLIENTS, if it found anything warning and critical it will send an alerts VIA Email OR SMS as per the configuration. 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. Nagios is an open source System and Network Monitoring application. Nagios runs on a server, usually as a daemon or service. Nagios periodically run plugins to monitor clients, if it found anything warning and critical it will send an alerts via Email OR SMS as per the configuration. 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. |
|
| 33. |
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 to 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. 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 to 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. |
|