Page 1 of 1

Getting error on Apply Configuration through WebConsole

Posted: Wed Oct 05, 2016 11:15 am
by sgoffar
Hi All,

When we are applying apply configuration from Configure-->Core Configuration Manager--> Apply Configuration it's showing below error.

Error: Service has no hosts and/or service_description (config file '/usr/local/nagios/etc/services/nix_check_filesystem_usr.cfg', starting on line 16)

But when we are checking from server. Pre-flight check is showing 0 error.

Even after deleting the file /usr/local/nagios/etc/services/nix_check_filesystem_usr.cfg same error is generating. Attached the screen short and log details.

Our Nagios version is: Nagios XI 2014R2.7.

Re: Getting error on Apply Configuration through WebConsole

Posted: Wed Oct 05, 2016 3:53 pm
by lmiltchev
See what you have on line 16 in the "/usr/local/nagios/etc/services/nix_check_filesystem_usr.cfg" file. You will have to modify the "problem" service under the CCM, and make sure it has a host, and a valid service description.

Re: Getting error on Apply Configuration through WebConsole

Posted: Fri Oct 07, 2016 8:56 am
by sgoffar
Thanks for your reply.

The file don't have 16 line at all.

I have even deleted the service but still it's not work. Attached the service details.



define service {
host_name daert11
service_description NIX check /usr file system
hostgroup_name centos_linux_servers,redhat_linux_servers
display_name nix_check_filesystem_usr
check_command check_nrpe!check_disk!-a '-w 10% -c 5% -l -p /usr'!!!!!!
max_check_attempts 3
check_interval 5
retry_interval 1
check_period 24x7
register 1
}

Re: Getting error on Apply Configuration through WebConsole

Posted: Fri Oct 07, 2016 12:05 pm
by bwallace
Hard to tell based off of that screenshot - everything looks alright there. When errors occur during 'Apply config' its usually a conflict between what the DB has on record and what the flat files have listed at the moment. The following process should resolve it:

In the XI UI go to:
Core Config Manager > Tools > Write Config Files

Then follow these steps in order:

delete (deletes all flat files)
write (creates new flat files based off of what is in MySQL)
verify (runs the nagios verify cmd)

* If verify is good = apply config
* If verify is bad = correct the corresponding error, then repeat these steps until there are no more errors. - If in any doubt, post the error here, hopefully it will provide more detail.