Deleted Service still showing up
Deleted Service still showing up
Hello,
I need some help troubleshooting an issue I've had ever since upgrading to v.2014R2.3. Whenever I go to apply configuration I get an error that says "Error: Service has no hosts and/or service_description (config file '/usr/local/nagios/etc/services/ping_Only.cfg', starting on line 31)". The problem is that service has been removed. It is not listed in CCM and when I look for the config file it is not there. I have deleted the Host / Services Configuration files, but it still is happening.
Any suggestions on what I can try?
Thank you!
I need some help troubleshooting an issue I've had ever since upgrading to v.2014R2.3. Whenever I go to apply configuration I get an error that says "Error: Service has no hosts and/or service_description (config file '/usr/local/nagios/etc/services/ping_Only.cfg', starting on line 31)". The problem is that service has been removed. It is not listed in CCM and when I look for the config file it is not there. I have deleted the Host / Services Configuration files, but it still is happening.
Any suggestions on what I can try?
Thank you!
Re: Deleted Service still showing up
Please run the following and show us the last dozen or so lines of output:
Code: Select all
cd /usr/local/nagiosxi/scripts/
./reconfigure_nagios.sh
Former Nagios employee
Re: Deleted Service still showing up
Here it is:
Thank you.
Code: Select all
Running pre-flight check on configuration data...
Checking objects...
Checked 2571 services.
Checked 277 hosts.
Checked 53 host groups.
Checked 8 service groups.
Checked 31 contacts.
Checked 8 contact groups.
Checked 131 commands.
Checked 29 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 277 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 29 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
RET: 0
>>> /etc/sudoers: syntax error near line 97 <<<
>>> /etc/sudoers: syntax error near line 98 <<<
>>> /etc/sudoers: syntax error near line 100 <<<
>>> /etc/sudoers: syntax error near line 102 <<<
sudo: parse error in /etc/sudoers near line 97
sudo: no valid sudoers sources found, quitting
Re: Deleted Service still showing up
Make sure you don't have the following line duplicated in "/etc/sudoers" and another file under "/etc/sudoers.d/" directory:
If you have duplicate entries, commend out the offending line.
Code: Select all
User_Alias NAGIOSXI=nagiosBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: Deleted Service still showing up
Just what I thought. In your /etc/sudoers file on the lines mentioned (97,98,100,102) you will likely see the ^M character (^M is technically one character displayed on-screen as two) at the end of the lines. There are a few ways to get rid of it, explained here:
https://www.novell.com/support/kb/doc.php?id=7014821
If you use the second method, make sure to copy the new file back over the old.
https://www.novell.com/support/kb/doc.php?id=7014821
If you use the second method, make sure to copy the new file back over the old.
Former Nagios employee
Re: Deleted Service still showing up
Thanks tmcdonald and Imiltchev for your responses. I looked at the /etc/sudoers file and it didn't have either inconsistency. I did find the problem, however. Here's what I did to fix it:
1) Admin -> Unconfigured Objects - I noticed that many of the "unconfigured" things listed here didn't actually exist any more.
2) Click the "Clear Unconfigured Objects List" link
3) Re-install the v.2014R2.3 update
Now it is working correctly.
Thank you again for taking a look. It wasn't until I started looking up your suggestions that I found this list.
1) Admin -> Unconfigured Objects - I noticed that many of the "unconfigured" things listed here didn't actually exist any more.
2) Click the "Clear Unconfigured Objects List" link
3) Re-install the v.2014R2.3 update
Now it is working correctly.
Thank you again for taking a look. It wasn't until I started looking up your suggestions that I found this list.
Re: Deleted Service still showing up
Interesting. Just out of curiosity, can you run that reconfigure again and show us the output? If it is working now and you did not see anything wrong with the sudoers, I am wondering if re-applying the update fixed it.
Former Nagios employee
Re: Deleted Service still showing up
Code: Select all
Running pre-flight check on configuration data...
Checking objects...
Checked 2572 services.
Checked 277 hosts.
Checked 54 host groups.
Checked 8 service groups.
Checked 31 contacts.
Checked 8 contact groups.
Checked 131 commands.
Checked 29 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 277 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 29 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
RET: 0
Running configuration check...
Stopping nagios:. done.
Starting nagios: done.
Re: Deleted Service still showing up
Well I'm glad it is working at any rate. I don't have a clue why Unconfigured Objects being cleared would affect the apply config in such a way, but I'll bring this up to our developers and see if they can come up with anything.
Former Nagios employee
Re: Deleted Service still showing up
Thank you!tmcdonald wrote:Well I'm glad it is working at any rate. I don't have a clue why Unconfigured Objects being cleared would affect the apply config in such a way, but I'll bring this up to our developers and see if they can come up with anything.