3

I installed Nagios by following the steps here.

I wonder where will be config file are. I can see plenty of places files resides. For example I can see nagios.cfg in two places :

/usr/local/nagios/etc/nagios.cfg

and

/etc/nagios3

which I need to configure? And also there are two commands.cfg file :

/usr/local/nagios/etc/objects

and here :

/etc/nagios3/commands.cfg

I'm very much confused in configuring the files I need.

batman
  • 7,851
  • 18
  • 39
  • 38

1 Answers1

3

Nagios configuration file resides in /usr/local/nagios/etc/nagios.cfg

It is the base for all Nagios configuration files.

For detailed info please see Here

Mitch
  • 106,657
  • 24
  • 210
  • 268
  • 1
    What do you mean by `base for all`? For all versions of nagios installed? Then what for: `/etc/nagios3` ? – batman Jul 31 '12 at 11:31
  • Till date I'm adding my `.cfg` file into `/etc/nagios3/conf.d` directory. And I can see my changes in web interface. Am I doing it correct? Can you clearly put up the difference between those directories? – batman Jul 31 '12 at 11:44
  • The info is a lot. I've updated the answer above with a link of information about Nagios. – Mitch Jul 31 '12 at 12:44
  • @Mitch: The locations seem to have changed over the years. I recently installed nagios on 18.04 LTS. The main configuration file is at /etc/nagios3/nagios.cfg, and there is no such directory as /usr/local/nagios. – Mike Sherrill 'Cat Recall' Oct 10 '18 at 13:56