Error when applying configuration

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
morabanc
Posts: 199
Joined: Tue Jul 10, 2012 8:14 am

Error when applying configuration

Post 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
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Error when applying configuration

Post 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
You do not have the required permissions to view the files attached to this post.
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
morabanc
Posts: 199
Joined: Tue Jul 10, 2012 8:14 am

Re: Error when applying configuration

Post 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.
gdolidze
Posts: 154
Joined: Tue Apr 07, 2015 10:07 am

Re: Error when applying configuration

Post 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.
morabanc
Posts: 199
Joined: Tue Jul 10, 2012 8:14 am

Re: Error when applying configuration

Post by morabanc »

No, that was one of the first things we checked when the problem began, and it's ok...
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Error when applying configuration

Post 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
You do not have the required permissions to view the files attached to this post.
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Error when applying configuration

Post 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.
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
morabanc
Posts: 199
Joined: Tue Jul 10, 2012 8:14 am

Re: Error when applying configuration

Post 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?
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Error when applying configuration

Post 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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked