Nagios
Nagios
Nagios
CGI Configuration File: Several directives are contained and stored in CGI file that can affect the
CGI o. A reference to the main configuration file is also stored in this file, so that CGI can know the
details of Nagios configuration as and when required and the location of object definition storage.
9. What are state types of Nagios?
Following are the state types of Nagios:
Service or host state type: Some states like OK, WARNING, UP, or DOWN state host or service
Two main state types that are SOFT state or HARD state
10. What are SOFT and HARD states?
We can define soft and hard states as:
SOFT state: the service or host check results are not OK or not up to the mark, even in case if
service check has not been rechecked the number of times that are specified for it moreover the
times that is being specified by the max_check_attempts directive. Recovery of the component from
such Soft error is called Soft Recovery.
When a host or service check result is not ‘OK’ and it has been checked for the number of times,
specified by the max_check_attempts directive in the host definition, then this error is known as
Hard Error. Recovery of any service from this error is known as Hard Recovery.
11. What is state stalking in Nagios?
State stalking is used for logging purpose in Nagios. When stalking is enabled for any service or host
then Nagios watch it very carefully and store any changes that if found in the check result of that
resource.
Stalking can be helpful in later stages of log file analysis. Here in such scenario, any host or service
check can be performed only if it has been updated for the last time.
12. Why is it being said that Nagios is object oriented?
Nagios has object configuration format where you can create object definitions, that can inherit the
properties from other hostnames or object definitions. In this way, you can specify the component
relationships easily. The components are considered as objects by the Nagios.
13. Which three Nagios variables can affect recursion and inheritance in Nagios?
The three variables that affect recursion and inheritance are: Name, Use, Register
Here, Name is just a placeholder that can be used by the other objects. Use variable can be used to
define parent object, whose properties are to be used. Registers are also used for storing values that
can be either 0 or 1. Register values cannot be inherited.
14. How Does Flap detection work in Nagios?
When a service or host changes their state frequently, then it is called flapping that may cause lots
of problems and generate too many recovery notifications. Flapping is detected in the following
manner:
• Store the results of last 21 checks and then analyze this historical check result to know the
number of transitions that are being taken place by the host or service.
• Know the percent state change value with the help of state transition
• Compare the value of this state change against low and high flapping thresholds
• When this value exceeds then the highest specified threshold then it is called flapping
• When this percent state value goes down the specified value then it is said that flapping has
been stopped.
15. How is distributed monitoring being done in Nagios?
There is a distributed monitoring scheme in Nagios with the help of which you can monitor your
complete enterprise that may include local slave instances. In such environment, Nagios submit the
result of reports of tasks to a single machine. All configuration, reporting, and notification can be
managed at the master machine and here slaves do all the work. Here Nagios uses passive checks
that are basically external applications that can send the results back to Nagios.
16. What is an icinga?
Icinga is an open source computer system and network monitoring application. It was originally
created as a fork of the Nagios system monitoring application in 2009. The name Icinga is a Zulu
word meaning “it looks for”, “it browses” or “it examines” and is pronounced with a click consonant.
17. What is active and passive checks in Nagios?
Active checks can be used to “poll” a device or service for status information every so often. Nagios
also supports a way to monitor hosts and services passively instead of actively. The key features of
passive checks are as follows: Passive checks are initiated and performed by external
applications/processes.
Active checks:
2.Active checks are initiated by the check logic in the Nagios daemon.
• Active check are executed At regular intervals, as defined by the check_interval and
retry_interval options in your host and service definitions
• On-demand as needed.Regularly scheduled checks occur at intervals equaling either the
check_interval or the retry_interval in your host or service definitions, depending on what type
of state the host or service is in. If a host or service is in a HARD state, it will be actively checked
at intervals equal to the check_interval option. If it is in a SOFT state, it will be checked at
intervals equal to the retry_interval option.
Passive checks:
• Services: are one of the central objects in the monitoring logic. Services are associated
with hosts Attributes of a host (CPU load, disk usage, uptime, etc.)
• Service Groups: are groups of one or more services. Service groups can make it easier to
• Hosts: are one of the central objects in the monitoring logic. Hosts are usually physical
devices on your network (servers, workstations, routers, switches, printers, etc.).
• Host Groups: are groups of one or more hosts. Host groups can make it easier to (1) view
the status of related hosts in the Nagios web interface and (2) simplify your configuration
through the use of object tricks
• Contacts: Contact information of people involved in the notification process
• Contact Groups: are groups of one or more contacts. Contact groups can make it easier
to define all the people who get notified when certain host or service problems occur.
• Commands: are used to tell Nagios what programs, scripts, etc. it should execute to
perform ,Host and service checks and when Notifications should send etc.
• Time Periods: are used to control, when hosts and services can be monitored
• Notification Escalations: Use for escalating the notification
24. Explain External Commands?
Nagios can process commands from external applications (including the CGIs) and alter various
aspects of its monitoring functions based on the commands it receives. External applications can
submit commands by writing to the command file, which is periodically processed by the Nagios
daemon. External commands can be used to accomplish a variety of things while Nagios is running.
Example of what can be done include temporarily disabling notifications for services and hosts,
temporarily disabling service checks, forcing immediate service checks, adding comments to hosts
and services, etc.
1. MySQL
2. Postgres
3. Oracle
4. DB2 Monitoring
5. Microsoft SQL Server