What is Nagios?
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 affects your organization’s bottom line.
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.
How does Nagios work?
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.
What are the main features of Nagios?
Some of the main features of Nagios are as follows:
Visibility: Nagios provides a centralized view of the entire IT infrastructure.
Monitoring: We can monitor all the mission critical infrastructure components with Nagios.
Proactive Planning: With Capacity Planning and Trending we can proactively plan to scale up or scale down the infrastructure.
Extendable: Nagios is extendable to a third party tools in APIs.
Multi-tenant: Nagios supports multi-tenants architecture.
What are Plugins in Nagios?
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.
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.
What do you mean by passive check in Nagios?
Passive checks are initiated and performed by external applications/processes and the Passive check results are submitted to Nagios for processing.
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.
What is State Stalking in Nagios?
State Stalking is a very useful feature. Though all the users do not use it all the time, it is very helpful when we want to investigate an issue.
In State Stalking, we can enable stalking on a host. Nagios will monitor the state of the host very carefully and it will log any changes in the state.
By this we can identify what changes might be causing an issue on the host.
When Does Nagios Check for external commands?
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.
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:
- 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.
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.
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).
What are the three main variables that affect recursion and inheritance in Nagios?
What is meant by saying Nagios is Object Oriented?
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.
What is a Passive check in Nagios?
In Nagios, we can monitor hosts and services by active checks. In addition, Nagios also supports Passive checks that are initiated by external applications.
The results of Passive checks are submitted to Nagios. There are two main use cases of Passive checks:
- We use Passive checks to monitor asynchronous services that do not give positive result with Active checks at regular intervals of time.
- We can use Passive checks to monitor services or applications that are located behind a firewall.