Reading Configuration File
Reading Configuration File
New server have only configured a few things.
When I log in as nagiosadmin I get the error 'Error: Could not read object configuration data!"
I've verified the configuration files and they seem legit.
It acts as though nagiosadmin doesn't have permission to view the config file. Where can I check this?
OS: Ubuntu 16.2
Nagios Core 4.3.1
Appreciate the help!
When I log in as nagiosadmin I get the error 'Error: Could not read object configuration data!"
I've verified the configuration files and they seem legit.
It acts as though nagiosadmin doesn't have permission to view the config file. Where can I check this?
OS: Ubuntu 16.2
Nagios Core 4.3.1
Appreciate the help!
-
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: Reading Configuration File
You can see file permissions by doing a:
Nagios Core configuration usually starts with a file named nagios.cfg which references other configuration files.
Code: Select all
ls -la <file>
Previous Nagios employee
Re: Reading Configuration File
Output:
root@server:~# la -la /usr/local/nagios/etc/nagios.cfg
-rw-rw-r-- 1 nagios nagios 44879 Apr 6 14:19 /usr/local/nagios/etc/nagios.cfg
Nagios admin doesn't show up as I believe it's due to it being set up as an apache2 user?
Any help is greatly appreciated!
root@server:~# la -la /usr/local/nagios/etc/nagios.cfg
-rw-rw-r-- 1 nagios nagios 44879 Apr 6 14:19 /usr/local/nagios/etc/nagios.cfg
Nagios admin doesn't show up as I believe it's due to it being set up as an apache2 user?
Any help is greatly appreciated!
- tacolover101
- Posts: 432
- Joined: Mon Apr 10, 2017 11:55 am
Re: Reading Configuration File
is your apache user in the nagios group?
-
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: Reading Configuration File
If you're trying to solve the
However it's a little difficult to tell what you want an answer on because you cite the error then ask questions about something else. The log files /var/log/syslog and the apache error log may also provide some insight into your issue.
issue, then that likely stems from selinux. You can temporarily disable it by running:Error: Could not read object configuration data!
Code: Select all
setenforce 0
Previous Nagios employee
Re: Reading Configuration File
Apache user "www-data" was already a member of the Nagios group
When attempting to run command "setenforce 0" it tells me it's not installed.
I'm just looking for possible solutions to why nagiosadmin can't read the config file (Nagios.cfg). I've done the Nagios config file check and it checks out fine.
When attempting to run command "setenforce 0" it tells me it's not installed.
I'm just looking for possible solutions to why nagiosadmin can't read the config file (Nagios.cfg). I've done the Nagios config file check and it checks out fine.
-
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: Reading Configuration File
You may need to refer to your OS's documentation on how to disable selinux.
Can you provide the log files I referenced?
Can you provide the log files I referenced?
Previous Nagios employee
Re: Reading Configuration File
I've attached syslog and the apache error lines are below:
[Wed Apr 12 07:35:02.317235 2017] [mpm_prefork:notice] [pid 1391] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Wed Apr 12 07:35:02.317295 2017] [core:notice] [pid 1391] AH00094: Command line: '/usr/sbin/apache2'
Appreciate the help!
[Wed Apr 12 07:35:02.317235 2017] [mpm_prefork:notice] [pid 1391] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Wed Apr 12 07:35:02.317295 2017] [core:notice] [pid 1391] AH00094: Command line: '/usr/sbin/apache2'
Appreciate the help!
- Attachments
-
- syslog.txt
- (200.59 KiB) Downloaded 232 times
- tacolover101
- Posts: 432
- Joined: Mon Apr 10, 2017 11:55 am
Re: Reading Configuration File
how did you install? it's definitely permissions somewhere.
i would start fresh with the guides that the wizards at nagios wrote because they've worked every time for me. https://support.nagios.com/kb/article.p ... ategory=58
i would start fresh with the guides that the wizards at nagios wrote because they've worked every time for me. https://support.nagios.com/kb/article.p ... ategory=58
Re: Reading Configuration File
Can you login to the Nagios server as root, run the following and post the output?
Code: Select all
ls -lR /usr/local/nagios/etc
grep nag /etc/passwd
grep nag /etc/group
cat /usr/local/nagios/etc/cgi.cfg
Be sure to check out our Knowledgebase for helpful articles and solutions!