getting error can't open main configurations file

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

getting error can't open main configurations file

Postby Ravikimt » Wed May 16, 2018 8:54 am

Hi I am getting this error. Can you please help me here.?

Error: Cannot open main configuration file '/etc/nagios/nagios.cfg' for reading!
Ravikimt
 
Posts: 37
Joined: Tue Apr 03, 2018 12:02 pm

Re: getting error can't open main configurations file

Postby Ravikimt » Wed May 16, 2018 9:07 am

I am using Nagios core 4.3.4 in ubuntu 16.04 LTS
Ravikimt
 
Posts: 37
Joined: Tue Apr 03, 2018 12:02 pm

Re: getting error can't open main configurations file

Postby scottwilkerson » Wed May 16, 2018 9:26 am

does the file exist?

Code: Select all
ls -al /etc/nagios/nagios.cfg


If so can you attach it?
User avatar
scottwilkerson
CTO
 
Posts: 9131
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: getting error can't open main configurations file

Postby Ravikimt » Wed May 16, 2018 9:53 am

rwxrwxr-x 3 nagios nagios 4096 May 16 19:34 .
drwxr-xr-x 8 root root 4096 May 10 17:51 ..
-rw-r----- 1 www-data nagios 12999 May 10 17:51 cgi.cfg
-rw-r--r-- 1 root root 50 May 10 17:54 htpasswd.users
-rw-r----- 1 nagios nagios 44816 May 10 17:51 nagios.cfg
drwxrwxr-x 2 nagios nagios 4096 May 16 15:07 objects
-rw-rw---- 1 nagios nagios 1312 May 10 17:51 resource.cfg
Ravikimt
 
Posts: 37
Joined: Tue Apr 03, 2018 12:02 pm

Re: getting error can't open main configurations file

Postby Ravikimt » Wed May 16, 2018 10:05 am

Sorry this is the correct one please ignore my previous post.

-rw-rw-r-- 1 nagios nagios 44818 May 16 19:21 /usr/local/nagios/etc/nagios.cfg
Ravikimt
 
Posts: 37
Joined: Tue Apr 03, 2018 12:02 pm

Re: getting error can't open main configurations file

Postby scottwilkerson » Wed May 16, 2018 12:44 pm

Ravikimt wrote:Sorry this is the correct one please ignore my previous post.

-rw-rw-r-- 1 nagios nagios 44818 May 16 19:21 /usr/local/nagios/etc/nagios.cfg


Ok. Where are you getting this error? What are you doing when that happens?

Ravikimt wrote:Hi I am getting the error below. Can you please help me here.?

Error: Cannot open main configuration file '/etc/nagios/nagios.cfg' for reading!
User avatar
scottwilkerson
CTO
 
Posts: 9131
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: getting error can't open main configurations file

Postby Ravikimt » Wed May 16, 2018 12:51 pm

When I am doing Pre flight check for checking Nagios configuration then I am getting this error on my treminal
Ravikimt
 
Posts: 37
Joined: Tue Apr 03, 2018 12:02 pm

Re: getting error can't open main configurations file

Postby scottwilkerson » Wed May 16, 2018 1:15 pm

you should use
Code: Select all
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
User avatar
scottwilkerson
CTO
 
Posts: 9131
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises


Return to Nagios Core

Who is online

Users browsing this forum: No registered users and 29 guests