Top 50 Interview questions in Monitoring Tools & Nagios
1. What is Nagios?
Nagios commonly referred to as the Nagios core is the open-source software that’s designed to watch networks, systems, applications, and infrastructures. The software directly sends the track down all the changes in the subject and sends alerts if necessary.
2. What Are Plugins In Nagios?
Plugins are scripts (Perl scripts, Shell scripts, etc.) which will run from an instruction to see the status of a number or service. Nagios uses the results from the plugins to work out the present status of hosts and services on your network.
Once you’ve got defined Plugins I will be able to suggest you to elucidate why we’d like plugins.
Nagios will execute a Plugin whenever there’s a requirement to see the status of a number or service. The plugin will perform the check then simply returns the result to Nagios. Nagios will process the results that it receives from the Plugin and take the required actions.
3. How does Nagios help DevOps professionals?
Nagios was designed within the first place to watch applications, networks, and infrastructures. The software automatically keeps an eagle eye and immediately reports just in case of failure. The quick response helps the DevOps professional to trace down and resolve the matter within the early stages before it can cause any serious damage to the organization.
4. How is Icinga related to the Nagios?
Icinga is additionally an open-source software that’s wont to monitor the networks and applications. The core objective of designing Icinga in the first place was to lift up the Nagios back in 2009. But it works as a separate monitor software.
5. Write down some of the names of the Nagios monitoring tool for Linux mentoring?
When you are using Nagios to watch the Linux environment then you would like to know that you simply are using one among the simplest tools on the earth . The complete package of Nagios includes service state, filing system usage, system metrics, process state, and more.
6. What Are Ports Numbers Nagios Will Use To Monitor Clients?
Port numbers are 5666, 5667 and 5668
7. Explain Main Configuration File And Its Location?
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’s the situation where you define all you would like to watch and the way you would like to watch . It is wont 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 variety of directives that affect the operation of the CGIs. It also contains a regard to the most configuration file, therefore the CGIs skills you’ve configured Nagios and where your object definitions are stored. Default Path: /usr/local/nagios/sbin/
8. Explain OID Nagios?
Simple Network Management Protocol (SNMP)- a network protocol that’s also designed for the monitoring purpose uses the thing Identifiers to define the Management Information Base.
9. Explain Nagios State Types?
- The status of service or host i.e. OK, WARNING, UP, DOWN etc..
- The state of type the service and host is in.
- There are two sorts of states SOFT states and HARD states.
10. What is active and passive checks in Nagios?
Active checks are often wont to “poll” a tool or service for status information every so often. Nagios also supports how to watch hosts and services passively rather than actively. The passive checks key features follows: Passive checks are initiated and performed by external applications and processes.
11.What Is State Stalking In Nagios?
State Stalking is used for logging purposes. When Stalking is enabled for a specific host or service, Nagios will watch that host or service very carefully and log any changes it sees within the output of check results.
Depending on the discussion between you and interviewer you can also add:
It is often very helpful in later analysis of the log files. Under normal circumstances, the results of a number or service check is merely logged if the host or service has changed state since it had been last checked.
12. What Does Mean By Saying Nagios Are Object Oriented?
One of the object configuration features of Nagios is format therein you’ll create object definitions that inherit properties from other object definitions and hence the name. This simplifies and clarifies relationships between various components.
13. When Does Nagios Check for external commands?
Nagios check for external commands under the subsequent conditions:
At regular intervals specified by the command_check_interval option within the main configuration file or,
Immediately after event handlers are executed. This is additionally to the regular cycle of external command checks and is completed to supply immediate action if an occasion handler submits commands to Nagios.
14. What is the difference between Active and Passive check in Nagios?
The main difference between Active and Passive checks is that passive checks are performed by external applications, while Active checks are initiated and performed by Nagios.
For monitoring services passive checks are useful they are:
- Asynchronous in nature and can’t be monitored effectively by polling their status on a frequently scheduled basis.
- Located behind a firewall and can’t be checked actively from the monitoring host.
The major features of Actives checks are:
- Active checks are initiated by the Nagios process.
- Active checks are run on a frequently scheduled basis.
15. What does Nagios use to monitor?
Nagios is now referred to as Nagios Core, may be a free and open source computer-software application that monitors systems, networks and infrastructure. Nagios offers monitoring and alerting services for applications, switches, servers, and services.
16. What does Check_mk do?
It is an extension to the Nagios monitoring system that permits creating rule-based configuration using Python and offloading work from the Nagios core to form it scale better, allowing more systems to be monitored from one Nagios server.
17. Can Nagios monitor Windows machines ?
To monitor Windows Machines you’ll have to follow several steps and that is: Install NSClient++ addon on the Windows Machine. Configure Nagios Server for monitoring Windows Machine. Add new host and repair definitions for Windows machine monitoring.
18. Explain Main Configuration File Of Nagios And Its Location?
The main configuration file contains a variety of directives that affect how the Nagios daemon operates. This config file is read by both the Nagios daemon and therefore the CGIs (It specifies the situation of your main configuration file).
Now you can tell where it is present and how it is created.
A sample main configuration file is made within the base directory of the Nagios distribution once you run the configure script. The default name of the most configuration file is nagios.cfg, it’s usually placed within the etc/ subdirectory of your Nagios installation (i.e. /usr/local/nagios/etc/).
19. What does one Mean By Passive sign up Nagios?
Passive checks are initiated and performed by external applications and processes and therefore the Passive check results are submitted to Nagios for processing.
20. Explain The Need For Passive Check?
They are useful for monitoring services that are Asynchronous in nature and can’t be monitored effectively by polling their status on a frequently scheduled basis. It also can be used for monitoring services that are Located behind a firewall and can’t be checked actively from the monitoring host.
21. What Are The Components That Make Up The Ndo Utilities ?
The main components that structure the NDO utilities:
Event Broker Module NDOMOD : A Nagios event broker module that exports data from the Nagios daemon was included by the NDO.Once the module has been loaded by the Nagios daemon, itcan access all of the info and logic present within the running Nagios process.The NDOMOD module has been designed to export configuration data, also as information about various run time events that occur within the monitoring process, from the Nagios daemon. The module can send this data to a typical file, a Unix domain socket, or a TCP socket.
LOG2NDO Utility : It has been designed to permit you to import NetSaint log files and historical Nagios into a database via the NDO2DB daemon . The utility works by sending historical log file data to a typical file, a Unix domain socket, or a TCP socket during a format the NDO2DB daemon understands.
FILE2SOCK Utility : It is quite simple. It reads input from a standard file (or STDIN) and writes all of that data to either a Unix domain socket or TCP socket. The data that’s read isn’t processed in any way before it’s sent to the socket.
22. What is Nagios XI?
It provides monitoring of all mission-critical infrastructure components including network protocols, operating systems, services, applications, systems metrics, and network infrastructure. Hundreds of third-party addons provide for monitoring of virtually all in-house and external systems, applications, and services.
23. Highlights the benefits of using Nagios for monitoring?
Some of the benefits of using Nagios software for critical monitoring.
- Infrastructure updates before the outdated system cause any kind of failure
- Automatic tracking and troubleshooting of problem
- Coordinate responses
- Continuously Monitor infrastructure without any break
- Response to issues on an immediate basis
24. What is Nagios Log Server?
Nagios Log Server greatly simplifies the method of searching your log data. Set up alerts to notify you when potential threats arise, or just query your log data to quickly audit any system. With It, get all of your log data in one location, with fail-over built right in and high availability.
25. Explain the process of website Monitoring With Nagios?
Monitoring of internet sites was provided by Nagios, web transactions, web applications, and web services – URL monitoring, hijack detection, HTTP status, including availability, content monitoring.
26. What are the benefits of website monitoring with Nagios?
Implementing effective website monitoring with Nagios offers the subsequent benefits:
- Increased website and web application availability
- Increased website performance
- Fast detection of website defacement, website hijacking, and outages
- For future web server and application upgrades has Capacity planning information
27. What Is Nrpe?
The Nagios Remote Plugin Executor addon is meant to permit you to execute Nagios plugins on remote Linux/Unix machines. The main reason for doing this is often to permit Nagios to watch “local” resources on remote machines. These public resources are not usually exposed to an agent like NRPE, external machines must be installed on the remote Linux or Unix machines.
28. Explain How Flap Detection Works In Nagios?
Optional detection of hosts and services that are “flapping” are supported by Nagios. Flapping occurs when a service or host changes state too frequently, leading to a storm of problem and recovery notifications. Flapping can be indicative of configuration problems, troublesome services, or real network problems.
29. What Is The Difference Between Nagios Xi And Nagios Core?
NagiosXI may be a Paid version and Nagios core may be a free version. NagiosXI includes a lot of features which we can modify using the web interface. Nagios Core default does not include all the features we have to implement by installing plugins.
30. How To Generate Performance Graphs?
In Nagios Core there’s no inbuilt choice to generate the performance graphs, we’ve to put in pnp4nagios and add hosts and services URLs in definition files.
31. How Do I Use Plugin X?
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 once you execute them using ‘-h’ or ‘–help’ on the instruction .
32. What Are Objects?
Objects are all the weather that are involved within the monitoring and notification logic.
Types of objects include:
- Host Groups are groups for one or more hosts. Host groups can make it easier to (1) view the status of related hosts within the Nagios web interface and (2) simplify your configuration through the utilization of object tricks
- Contacts Contact information of people involved in the notification process
- Contact Groups are groups of 1 or more contacts. Contact groups can make it easier to define all the people that get notified when certain host or service problems occur.
- Commands are wont to tell Nagios what programs, scripts, etc. it should execute to perform Host and service checks and when Notifications should be sent etc.
- Time Periods are are wont to control ,When hosts and services are often monitored
- Notification Escalations Use for escalating the notification.
33. How To Verify Nagios Configuration?
In order to verify your configuration, run Nagios with the -v instruction option like so:
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Nagios will spit out a warning or error message, If you’ve forgotten to enter some critical data or misconfigured things, that ought to point you to the situation of the matter . Error messages generally print out the road within the configuration file that seems to be the source of the matter . On errors, Nagios will often exit the pre-flight check and return to the prompt after printing only the primary error that it encountered.
34. Describe the Nagios Network Analyzer?
A network analyzer may be a crucial aspect of the Nagios software that permits it to deeply scan the whole system during a search of any potential threat. The quick and reliable scan allows system admin to collect necessary data regarding the health of the system and granular data through network analysis.
35. Name down some databases that support Nagios monitoring?
There are variety of databases that support Nagios and a few of them are mentioned below:
- Oracle
- MySQL
- Microsoft SQL software
- Postgres
36. Write down the components of NDO Utilities?
The NDO utilities are the right mixture of the:
- NDOMOD Event Broker Module
- FILE2SOCK Utility
- LOG2NDO Utility
- NDO2DB Daemon
37. What is inheritance in nagios?
Consider the following definition
- define host{
- name linux-box
- use generic-host
- check_command check-host-alive
- }
Here within the line “use generic-host” is that the concept of inheritance because it will grab all the properties of generic-host which is already defined in templates.cfg
38. What is the exit status in nagios custom plugin?
3 – UNKNOWN, 2 – CRITICAL, 1 – WARN, 0 – OK
39. What all services are often monitored using Nagios active checks?
Memory Usage, SSH, SMTP, FTP, HTTP, Network status, Disk Usage, etc.
40. How can we get alerts for AWS services using Nagios other than alerts from AWS SNS?
We need to configure aws-cli with required privileges and we have to write a custom plugin for the required service to be monitored.
41. What is port 12489 relevant for?
For monitoring windows servers this is NSClient++ client port.
42. We specify $USER1$/check_load in commands.cfg, what is the $USERS1$ ?
USER1 may be a macro in nagios which can expand to the plugin location within the command. Up to 256 user macros ($USER1$ through $USER256$) were supported by Nagios.
Eg: $USER1$/check_load is /usr/lib64/nagios/plugins/check_load
43. What is the difference between HOST ADDRESS and HOST ALIAS macros
HOSTADDRESS is the Address of the host. This value is taken from the address directive within the host definition.
HOSTALIAS is the Long name/description for the host. This value is taken from the alias directive within the host definition.
44. What is ocsp_command in nagios?
Ocsp_command means Obsessive Compulsive Service Processor which specifies a command to be run after every service check and which may be useful in distributed monitoring. This command is executed after any event handler. or notification commands.
45. Can we achieve distributed monitoring in Nagios?
Yes, via NSCA, Monit, DNX etc plugins are used for distributed monitoring.
46. How can we relate nagios with DevOps?
Since DevOps follows agile methodology, continuous monitoring is an integral part of it. This can be achieved using nagios.
47. How do we enable debug log in Nagios?
Set debug_level=-1 in nagios.cfg
48. Nagios data is stored in data format, how do we store it in MySQL db for better performance?
We have to put in NDOutils and configure Nagios to use it.
- Install MySQL and create a database for nagios and set username and password.
- Install NDOUtils.
- Load Schema using ndoutils installdb command.
- In nagios Change the event broker options to -1.cfg file and broker_module=/usr/lib64/nagios/brokers/ndomod.so config_file=/etc/nagios/ndomod.cfg
- Edit ndo2db.cfg and add mysql credentials
- Start ndoutils and restart nagios Ref: https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html
49. How do we troubleshoot Nagios core other than host or service monitoring issues?
In nagios.cfg we have to enable debug mode and watch the logs. Which in turn helps to find the root cause of the problem.
50. Can we customize charts in nagios for better display and alert it?
Yes, by using different 3rd Party convertor for services like RRD, Graphite , CACTI, and more