Solved Nagios 4 install on 10.1

I am getting this error when trying to start nagios 4. I'm not sure why it is complaining. I don't have this feature configured....

Code:
root@nagios4:/var/spool/nagios # cat nagios.log
[1445542680] Error: Cannot open resource file '/usr/local/etc/nagios/resource.cfg' for reading!
[1445542680] Error in configuration file '/usr/local/etc/nagios/nagios.cfg' - Line 1348 (NULL)
[1445542680] Error: Failed to process config file '/usr/local/etc/nagios/nagios.cfg'. Aborting
[1445543126] Error: Cannot open resource file '/usr/local/etc/nagios/resource.cfg' for reading!
[1445543126] Error in configuration file '/usr/local/etc/nagios/nagios.cfg' - Line 1348 (NULL)
[1445543126] Error: Failed to process config file '/usr/local/etc/nagios/nagios.cfg'. Aborting
[1446125335] Error: Cannot open resource file '/usr/local/etc/nagios/resource.cfg' for reading!
[1446125335] Error in configuration file '/usr/local/etc/nagios/nagios.cfg' - Line 1348 (NULL)
[1446125335] Error: Failed to process config file '/usr/local/etc/nagios/nagios.cfg'. Aborting
root@nagios4:/var/spool/nagios #
 
What do you mean you don't have this feature configured?
You're trying to start nagios, and there are problems with the configuration that need fixing.

It's impossible to diagnose completely without seeing the actual configuration files, but clearly nagios.cfg has a reference to resource.cfg, and it can't open that file (which is usually in /usr/local/etc/nagios/). If it's a new install you might be able to just rename resource.cfg-sample, to resource.cfg, although this isn't a nagios support forum and I can't actually help configure it for you.

You can also check the configuration is valid manually by running
Code:
nagios -v /usr/local/etc/nagios/nagios.cfg
 
I don't remember and ran into problems running FreeBSD 11 on RasPi, it kept locking up. I will set this up again.


What happened? It's always helpful to know just what lead to the thread being marked solved and it could benefit someone searching for the same error message in the future.
 
I don't remember and ran into problems running FreeBSD 11 on RasPi, it kept locking up. I will set this up again.

This error happens when the actual .cfg config file does not exist but you have a reference to it in the /usr/local/etc/nagios/nagios.cfg file:

Code:
...
resource_file=/usr/local/etc/nagios/resource.cfg
...
 
SirDice Sure, I know. I responded b/c there had been no clear solution posted. The last thread ended with a question, even though the thread was marked as SOLVED. Otherwise I would not have responded at all. Thanks anyway.
 
Back
Top