Waiitng on Configuration

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
CentAdm_CPDC
Posts: 10
Joined: Wed Nov 26, 2014 12:40 pm

Waiitng on Configuration

Post by CentAdm_CPDC »

Everything I tried to configure my local host or a add a new device to monitor I get the following message.

Waiting for configuration verification....
Nagios restart command failed.

An error occurred while attempting to apply your configuration to Nagios Core. Monitoring engine configuration files have been rolled back to their last known good checkpoint.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Waiitng on Configuration

Post by slansing »

Is it actually telling you "Nagios restart command failed."? If so, please run:

Code: Select all

service nagios status

service nagios restart
And let us know what the output is. Also, please run the following and share the output files:

Code: Select all

ps -ef | grep nagios > /tmp/psoutput.txt

Code: Select all

/usr/local/nagiosxi/scripts/reconfigure_nagios.sh > /tmp/reconfig.txt
NOTE: Your backend mysql password will be displayed in the connection lines, feel free to omit that prior to attaching.
CentAdm_CPDC
Posts: 10
Joined: Wed Nov 26, 2014 12:40 pm

Re: Waiitng on Configuration

Post by CentAdm_CPDC »

Hello

I did not get an output back from the first command
The second command said no such file or directory

also when i Click on Home and service details my host is down (red) and I get this message

Warning: This plugin must be either run as root or setuid root.
To run as root, you can use a tool like sudo.
To set the setuid permissions, use the command:
chmod u+s yourpluginfile
check_icmp: Failed to obtain ICMP socket: Operation not permitted
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Waiitng on Configuration

Post by lmiltchev »

Go to the Core Config Manager->Tools->Write Config Files, click on each button (top->down) and show us the output after each click.

Also, run the following command and show us the output:

Code: Select all

ll /usr/local/nagios/libexec | grep icmp
Be sure to check out our Knowledgebase for helpful articles and solutions!
CentAdm_CPDC
Posts: 10
Joined: Wed Nov 26, 2014 12:40 pm

Re: Waiitng on Configuration

Post by CentAdm_CPDC »

Write host configurations ...
Host configuration files successfully written!

Write service configurations ...
Service configuration files successfully written!

Configuration file: hostgroups.cfg successfully written!
Configuration file: servicegroups.cfg successfully written!
Configuration file: hosttemplates.cfg successfully written!
Configuration file: servicetemplates.cfg successfully written!
Configuration file: timeperiods.cfg successfully written!
Configuration file: commands.cfg successfully written!
Configuration file: contacts.cfg successfully written!
Configuration file: contactgroups.cfg successfully written!
Configuration file: contacttemplates.cfg successfully written!
Configuration file: servicedependencies.cfg successfully written!
Configuration file: hostdependencies.cfg successfully written!
Configuration file: serviceescalations.cfg successfully written!
Configuration file: hostescalations.cfg successfully written!
Configuration file: serviceextinfo.cfg successfully written!
Configuration file: hostextinfo.cfg successfully written!



2nd Button

Nagios Core 4.0.8
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-12-2014
License: GPL

Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Read object config files okay...

Running pre-flight check on configuration data...

Checking objects...
Checked 10 services.
Checked 2 hosts.
Checked 1 host groups.
Checked 0 service groups.
Checked 2 contacts.
Checked 2 contact groups.
Checked 116 commands.
Checked 8 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 2 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 8 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check

3rd Button

Successfully deleted all Host / Service Config Files

4th button

RESTART FAILED. CONFIG ERROR:
Error: Could not find any host matching 'localhost' (config file '/usr/local/nagios/etc/hostgroups.cfg', starting on line 16)
Error: Could not expand members specified in hostgroup (config file '/usr/local/nagios/etc/hostgroups.cfg', starting on line 16)

*There's an error when it tries to restart*

This is the output from the code
-r-xr-xr-x. 1 nagios nagios 213350 Dec 1 16:32 check_icmp
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Waiitng on Configuration

Post by slansing »

Okay, so you either need to create what is missing, or remove the definition referencing it. Looks like you have removed localhost from XI, that is going to cause errors since localhost is default on every install, and is attached to one or more of the default hostgroups. In CCM > Hostgroups > Check each of your hostgroups for localhost, if it is mentioned in one via the "Hosts" button inside of the edit page, you need to remove it, and save the config. After that is cleared up, apply configuration again.
Locked