Page 1 of 1
Error when applying configuration
Posted: Tue Apr 21, 2015 10:17 am
by morabanc
We have a nagios installed on a vmware server, after to restore a snapshot, when we install new configuration from the "apply configuration" tool an error related to a file always appears:
Error: Could not register host (config file '/usr/local/nagios/etc/services/xxxx.cfg', starting on line 16)
We tried to create this file manually, to delete it, but always the same error appears, even if the file doesn't exits or is empty, always making reference to line 16
Searching in the forum I found a very similar case:
http://support.nagios.com/forum/viewtop ... er+service
Re: Error when applying configuration
Posted: Tue Apr 21, 2015 10:36 am
by jolson
Have you attempted running the following:
Code: Select all
cd /usr/local/nagiosxi/scripts/
./reconfigure_nagios.sh
If that doesn't work, would you please try running the Delete -> Write -> Verify loop?
2015-04-21 10_35_28-Nagios XI - Nagios Core Config Manager.png
Re: Error when applying configuration
Posted: Wed Apr 22, 2015 4:44 am
by morabanc
Hello,
Both tests seems to work ok, ./reconfigure_nagios.sh and to delete config and write again, but when I try to install configuration using "Apply configuration" the same error about the same file appears again:
Error: Service description, host name, or check command is NULL
Error: Could not register service (config file '/usr/local/nagios/etc/services/name.cfg starting on line 16)
no matter if the file exists or not, if I create the file or if I delete and create the host and the service in CCM, always the same error.
Re: Error when applying configuration
Posted: Wed Apr 22, 2015 8:31 am
by gdolidze
perhaps you already created a plugin or command of the one you trying now and its configured incorrectly
Double check commands and services in the core config manager to see if its already created and delete it.
Re: Error when applying configuration
Posted: Wed Apr 22, 2015 9:39 am
by morabanc
No, that was one of the first things we checked when the problem began, and it's ok...
Re: Error when applying configuration
Posted: Wed Apr 22, 2015 10:36 am
by jolson
Would you mind taking a profile.zip and sending it my way via PM?
2015-04-22 10_36_07-Nagios XI - Administration.png
Re: Error when applying configuration
Posted: Wed Apr 22, 2015 4:28 pm
by jolson
morabanc wrote:Hello,
Both tests seems to work ok, ./reconfigure_nagios.sh and to delete config and write again, but when I try to install configuration using "Apply configuration" the same error about the same file appears again:
Error: Service description, host name, or check command is NULL
Error: Could not register service (config file '/usr/local/nagios/etc/services/name.cfg starting on line 16)
no matter if the file exists or not, if I create the file or if I delete and create the host and the service in CCM, always the same error.
Could you please try switching user to the nagios user and running reconfigure_nagios.sh please?
Code: Select all
su - nagios
cd /usr/local/nagiosxi/scripts/
./reconfigure_nagios.sh
Are you asked for a password or anything similar?
Please report the output here.
Re: Error when applying configuration
Posted: Thu Apr 23, 2015 3:29 am
by morabanc
Hello,
I attach the output of the reconfigure_nagios script with user nagios. I can't attach profile.zip, the size is about 8MB, maybe it reaches the maximum size? Can I send it in other way?
Re: Error when applying configuration
Posted: Thu Apr 23, 2015 1:00 pm
by tgriep
Could you go in to Core Config Manager, hosts and search for that host and click on the View Text Config button "Floppy Icon" copy the settings and post it to the forum so we can view it?