New Installation - can not find .cfg file

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Bigpaddy_Irl
Posts: 31
Joined: Sun Oct 06, 2013 5:48 am

New Installation - can not find .cfg file

Post by Bigpaddy_Irl »

Hi Guys,
I have just installed Nagios3 as per the online documentation using sudo apt-get install nagios3 on my Ununtu 13.04
It has insatalled perfectly, I can access the local/nagios3 and it is monitoring the machine its on as it should.

But when I try to access the vi /usr/local/nagios/etc/nagios.cfg there is nothing there.

I have been trying for hours now, reinstalled nagios serveral times and just can not find the location of that file.

Any ideas? Searching online seems to impose that no one has ever come across this before?

Thanks.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: New Installation - can not find .cfg file

Post by slansing »

Are you seeing any errors? Your .cfg should be in:

Code: Select all

/usr/local/nagios/etc/nagios.cfg
According to the documentation for nagios3. I would try re-provisioning this vm or box, and installing from source, the ubuntu install can be flaky sometimes.

http://assets.nagios.com/downloads/nagi ... Source.pdf
Bigpaddy_Irl
Posts: 31
Joined: Sun Oct 06, 2013 5:48 am

Re: New Installation - can not find .cfg file

Post by Bigpaddy_Irl »

After looking at some youtube tutorials, I found the nagios.cfg file under /etc/nagios3/
But when I try to VI the file, some sort of E212 comes up, a permission problem I guess?
Why is the cfg file at this location? is this a messed up installation?

Thanks for the reply
Bigpaddy_Irl
Posts: 31
Joined: Sun Oct 06, 2013 5:48 am

Re: New Installation - can not find .cfg file

Post by Bigpaddy_Irl »

No such file or directory comes up when I try to cd to /usr/local/nagios/etc
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: New Installation - can not find .cfg file

Post by slansing »

No your installation should be fine, I dont know what the difference in documentation was, but its possible I was reading an old version where it was placed where I showed. Are you trying to open the .cfg file as root? What is the full error you receive as well as the full permissions on the nagios.cfg?
Bigpaddy_Irl
Posts: 31
Joined: Sun Oct 06, 2013 5:48 am

Re: New Installation - can not find .cfg file

Post by Bigpaddy_Irl »

I am after removing the complete installation now as I was trying to reinstall is as to your link to the "Installing nagios Core from source". But I did not get very far as this document contains many errors such as........

Under Prerequisites, the line...

For Ubuntu users:
sudo apt-get install wget install build-essential apache2 php5-gd wget libgd2-xpm libgd2-xpm-dev
libapache2-mod-php5 contains an additional install error


The Nagios Plugin link....

wget http://sourceforge.net/projects/nagiosp ... .15.tar.gz


...comes back with an 404 error.

I can get no further than this within the document.

I will just reinstall nagios with sudo apt-get install nagios3

yes I was opening the file as root, otherwise I get a permissions error

Thanks for your speedy replies/
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: New Installation - can not find .cfg file

Post by slansing »

use the following address, it was recently changed with the new release:

Code: Select all

wget https://www.nagios-plugins.org/download/nagios-plugins-1.5.tar.gz
What are the other "many errors?"
Bigpaddy_Irl
Posts: 31
Joined: Sun Oct 06, 2013 5:48 am

Re: New Installation - can not find .cfg file

Post by Bigpaddy_Irl »

The next error I get is as follows....


tar zxvf nagios-3.4.1.tar.gz


tar (child): nagios-3.4.1.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: New Installation - can not find .cfg file

Post by slansing »

Are you executing this command from the directory your nagios tarball resides in? Is that the correct name of the tarball you have in that directory? If so that should work fine.

The tarball should be named nagios-4.0.0.tar.gz, I cleaned up the documentation a bit, should be changed soon.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: New Installation - can not find .cfg file

Post by tmcdonald »

The second file is called "nagios-plugins-1.5.tar.gz"

Code: Select all

tar xvzf nagios-plugins-1.5.tar.gz
Former Nagios employee
Locked