Nagios restart problem after windows.cfg modification

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.
Locked
deesdabeth
Posts: 4
Joined: Thu Oct 04, 2012 1:20 am

Nagios restart problem after windows.cfg modification

Post by deesdabeth »

Hi everyone,

I've modify the /etc/nagios/objetcs/windows.cfg file and now when I try to restart nagios it says :

[root@nagios nagios]# nagios restart
Nagios 3.0.6
Copyright (c) 1999-2008 Ethan Galstad (http://www.nagios.org)
Last Modified: 12-01-2008
License: GPL
Error: Cannot open main configuration file '/etc/nagios/restart' for reading!
Nagios 3.0.6 starting... (PID=11434)
Local time is Thu Oct 04 08:52:01 CEST 2012
Bailing out due to one or more errors encountered in the configuration files. Run Nagios from the command line with the -v option to verify your config before restarting. (PID=11434)
[root@nagios nagios]#


And then if i do a nagios -v nagios.cfg it says everything seems to be ok :

[root@nagios nagios]# nagios -v nagios.cfg
Nagios 3.0.6
Copyright (c) 1999-2008 Ethan Galstad (http://www.nagios.org)
Last Modified: 12-01-2008
License: GPL

Reading configuration data...

Running pre-flight check on configuration data...

Checking services...
Checked 39 services.
Checking hosts...
Warning: Host 'FAXSERVER' has no services associated with it!
Warning: Host 'SRVI' has no services associated with it!
Warning: Host 'SRVP' has no services associated with it!
Warning: Host 'SRVTSE' has no services associated with it!
Warning: Host 'SRVTSE2K3' has no services associated with it!
Warning: Host 'SRVTSE3' has no services associated with it!
Checked 15 hosts.
Checking host groups...
Checked 3 host groups.
Checking service groups...
Checked 0 service groups.
Checking contacts...
Checked 1 contacts.
Checking contact groups...
Checked 1 contact groups.
Checking service escalations...
Checked 0 service escalations.
Checking service dependencies...
Checked 0 service dependencies.
Checking host escalations...
Checked 0 host escalations.
Checking host dependencies...
Checked 0 host dependencies.
Checking commands...
Checked 24 commands.
Checking time periods...
Checked 5 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 6
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check
[root@nagios nagios]#


Can someone help me to find the problem?
Thanks
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: Nagios restart problem after windows.cfg modification

Post by agriffin »

Try running 'service nagios restart' instead of just 'nagios restart'.
deesdabeth
Posts: 4
Joined: Thu Oct 04, 2012 1:20 am

Re: Nagios restart problem after windows.cfg modification

Post by deesdabeth »

It works!
Thank you very much
deesdabeth
Posts: 4
Joined: Thu Oct 04, 2012 1:20 am

Re: Nagios restart problem after windows.cfg modification

Post by deesdabeth »

But now I have a access right problem on this new server :

***** Nagios *****

Notification Type: PROBLEM

Service: C:\ Drive Space
Host: Serveur Paie CEGID
Address: 192.168.0.2
State: CRITICAL

Date/Time: Fri Oct 5 13:47:48 CEST 2012

Additional Info:

Connection refused

Where does it came from?
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: Nagios restart problem after windows.cfg modification

Post by agriffin »

What are you using to check services on that host? NSClient++ (and if so, is it using NRPE)? WMI?
Locked