Reading Configuration 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.
jcooper
Posts: 7
Joined: Tue Aug 02, 2016 12:58 pm

Re: Reading Configuration File

Post by jcooper »

I've attached the code for the above command.

Also I installed this following instructions linked on the Nagios website.
Attachments
Nagios.txt
(14.75 KiB) Downloaded 193 times
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Reading Configuration File

Post by tgriep »

Lets try and recreate the nagiosadmin account by running the following in a shell on the server

Code: Select all

sudo htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
Then restart the Apache and nagios processes by running

Code: Select all

sudo systemctl restart apache2.service
sudo systemctl restart nagios.service
Try that and post if it works or not.
Be sure to check out our Knowledgebase for helpful articles and solutions!
jcooper
Posts: 7
Joined: Tue Aug 02, 2016 12:58 pm

Re: Reading Configuration File

Post by jcooper »

No luck, still getting the configuration file error message.
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Reading Configuration File

Post by tgriep »

I think the www-data account is missing from the nagios group and that is creating the permission issue.
Try running the following command and see if that fixes the permission issue for your system.

Code: Select all

sudo usermod -a -G nagios www-data
If you still have issues, take a look at the Apache's error log files in the following folder and see if you can use them to resolve the error.

Code: Select all

/var/log/apache2
Be sure to check out our Knowledgebase for helpful articles and solutions!
jcooper
Posts: 7
Joined: Tue Aug 02, 2016 12:58 pm

Re: Reading Configuration File

Post by jcooper »

Still no luck, log files don't tell me much, at least nothing that stands out to me.

access.log:
nagiosadmin [17/Apr/2017:13:59:04 -0400] "GET /nagios HTTP/1.1" 301 574 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36"
nagiosadmin [17/Apr/2017:13:59:04 -0400] "GET /nagios/cgi-bin/tac.cgi HTTP/1.1" 200 1276 "http://10.98.14.63/nagios/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36"
nagiosadmin [17/Apr/2017:13:59:04 -0400] "GET /nagios/images/interface/logo.gif HTTP/1.1" 200 2406 "http://10.98.14.63/nagios/top.html" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36"
nagiosadmin [17/Apr/2017:13:59:04 -0400] "GET /nagios/images/interface/nagios.gif HTTP/1.1" 200 3024 "http://10.98.14.63/nagios/top.html" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36"
nagiosadmin [17/Apr/2017:13:59:04 -0400] "GET /nagios/images/interface/search.gif HTTP/1.1" 200 674 "http://10.98.14.63/nagios/sidebar.html" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36"
nagiosadmin [17/Apr/2017:13:59:04 -0400] "GET /nagios/js/nag_funcs.js HTTP/1.1" 200 2837 "http://10.98.14.63/nagios/cgi-bin/tac.cgi" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36"
nagiosadmin [17/Apr/2017:13:59:04 -0400] "GET /nagios/images/interface/bar.gif HTTP/1.1" 200 435 "http://10.98.14.63/nagios/stylesheets/i ... common.css" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36"
nagiosadmin [17/Apr/2017:13:59:04 -0400] "GET /nagios/images/interface/menu_li1.gif HTTP/1.1" 200 333 "http://10.98.14.63/nagios/stylesheets/i ... e/menu.css" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36"
nagiosadmin [17/Apr/2017:13:59:04 -0400] "GET /nagios/images/interface/menu_body.gif HTTP/1.1" 200 342 "http://10.98.14.63/nagios/stylesheets/i ... e/menu.css" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36"
nagiosadmin [17/Apr/2017:13:59:04 -0400] "GET /nagios/images/interface/menu_less.gif HTTP/1.1" 200 339 "http://10.98.14.63/nagios/menu.html" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36"
nagiosadmin [17/Apr/2017:13:59:05 -0400] "GET /nagios/images/favicon.ico HTTP/1.1" 200 5731 "http://10.98.14.63/nagios/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36"
nagiosadmin [17/Apr/2017:14:00:35 -0400] "GET /nagios/cgi-bin/tac.cgi HTTP/1.1" 200 1277 "http://10.98.14.63/nagios/cgi-bin/tac.cgi" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36"
nagiosadmin [17/Apr/2017:14:00:35 -0400] "GET /nagios/js/nag_funcs.js HTTP/1.1" 200 2838 "http://10.98.14.63/nagios/cgi-bin/tac.cgi" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36"
nagiosadmin [17/Apr/2017:14:00:35 -0400] "GET /nagios/js/jquery-1.7.1.min.js HTTP/1.1" 200 33493 "http://10.98.14.63/nagios/cgi-bin/tac.cgi" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36"

Error.log
[Mon Apr 17 13:57:29.251015 2017] [mpm_prefork:notice] [pid 1362] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Mon Apr 17 13:57:29.252286 2017] [core:notice] [pid 1362] AH00094: Command line: '/usr/sbin/apache2'
[Mon Apr 17 13:58:01.794856 2017] [mpm_prefork:notice] [pid 1362] AH00169: caught SIGTERM, shutting down
[Mon Apr 17 13:58:17.147879 2017] [mpm_prefork:notice] [pid 1384] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Mon Apr 17 13:58:17.148861 2017] [core:notice] [pid 1384] AH00094: Command line: '/usr/sbin/apache2'
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Reading Configuration File

Post by tgriep »

At this point, I suggest going through the Source Install one step at a time to see if that fixes the issue.
https://support.nagios.com/kb/article.php?id=96
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked