0 votes
in Nagios by
Explain Main Configuration file of Nagios and its location?

2 Answers

0 votes
by

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/).

0 votes
by

Following is the description of the main configuration file:

  1. Resource File: To store sensitive information like user details that may include username and passwords it is used. The information is not made available to CGI.
  2. Object Definition File: In this file, you can find and enlist the details of resources that you want to monitor and how you want the monitoring to be performed? Host services, host groups, contacts, contact groups, commands, etc. are defined in this file.
  3. 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.
...