Page 1 of 2

SQL SERVICES CRITICAL - CANT DELETE THEM IN CCM

Posted: Fri Sep 05, 2014 8:57 am
by povachon
Hi there,

I have 2 host with SQL Express services in critical mode. This is normal since there no sql service on those hosts. Im trying to delete them in CCM but i cant find them. See attachment.

Im running Nagios XI 2014R1.4 (centos)

Regard
PO

Re: SQL SERVICES CRITICAL - CANT DELETE THEM IN CCM

Posted: Fri Sep 05, 2014 11:00 am
by slansing
If you search for the actual host's name in the services list there, what comes up? How did you set these services up in the first place? Have you tried to remove them previously?

Re: SQL SERVICES CRITICAL - CANT DELETE THEM IN CCM

Posted: Mon Sep 08, 2014 7:26 am
by povachon
Those services have been added by one of the monitoring wizard. Cant delete them since im not able to find them in CCM. Any way i cant delete there config file disrectlu on the centos?

Regard
PO

Re: SQL SERVICES CRITICAL - CANT DELETE THEM IN CCM

Posted: Mon Sep 08, 2014 11:53 am
by povachon
Any news?
PO

Re: SQL SERVICES CRITICAL - CANT DELETE THEM IN CCM

Posted: Mon Sep 08, 2014 12:15 pm
by abrist
You may have clock drift or a time mismatch on your XI server. First, check the times:

Code: Select all

date
echo "select NOW()" | mysql -pnagiosxi
If there is a mismatch, restart mysql to resync:

Code: Select all

service mysqld restart
Check for crashed tables as well:

Code: Select all

grep crashed /var/log/mysqld.log
Now, try to "apply config" once again. Those services should be found as ghost configs and they should be overwritten. If not, delete those service files from the cli and then "apply configuration":

Code: Select all

rm /usr/local/nagios/etc/services/<name of host with problematic services>.cfg

Re: SQL SERVICES CRITICAL - CANT DELETE THEM IN CCM

Posted: Mon Sep 08, 2014 12:47 pm
by povachon
Still the same problem services are still there.

[root@asl ~]# date
Mon Sep 8 13:45:09 EDT 2014
[root@asl ~]# echo "select NOW()" | mysql -pnagiosxi
NOW()
2014-09-08 13:45:09
[root@asl ~]#
[root@asl ~]# service mysqld restart
Stopping mysqld: [ OK ]
Starting mysqld: [ OK ]
[root@asl ~]# grep crashed /var/log/mysqld.log
[root@asl ~]# rm /usr/local/nagios/etc/services/Asl_Empil-2_Poste_AUTO_MH.cfg
rm: remove regular file `/usr/local/nagios/etc/services/Asl_Empil-2_Poste_AUTO_MH.cfg'? yes
[root@asl ~]# rm /usr/local/nagios/etc/services/Asl_Empil-2_Poste_AUTO_Cab.cfg
rm: remove regular file `/usr/local/nagios/etc/services/Asl_Empil-2_Poste_AUTO_Cab.cfg'? yes

Re: SQL SERVICES CRITICAL - CANT DELETE THEM IN CCM

Posted: Mon Sep 08, 2014 2:50 pm
by Box293
povachon wrote:[root@asl ~]# rm /usr/local/nagios/etc/services/Asl_Empil-2_Poste_AUTO_MH.cfg
rm: remove regular file `/usr/local/nagios/etc/services/Asl_Empil-2_Poste_AUTO_MH.cfg'? yes
[root@asl ~]# rm /usr/local/nagios/etc/services/Asl_Empil-2_Poste_AUTO_Cab.cfg
rm: remove regular file `/usr/local/nagios/etc/services/Asl_Empil-2_Poste_AUTO_Cab.cfg'? yes
Did you apply configuration after manually deleting these files? Did they re-appear?

Re: SQL SERVICES CRITICAL - CANT DELETE THEM IN CCM

Posted: Wed Sep 10, 2014 7:51 am
by povachon
YES I DID STILL THE SAME PROBLEM !

Re: SQL SERVICES CRITICAL - CANT DELETE THEM IN CCM

Posted: Wed Sep 10, 2014 12:57 pm
by Box293
Try this:

Execute the following steps from the command line:

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
This will generate an error similar to the following:

Code: Select all

Error: Could not find any host matching 'CentOSDummy' (config file '/usr/local/nagios/etc/static/test2.cfg', starting on line 1)
Error: Failed to expand host list 'CentOSDummy' for service '/ Disk Usage' (/usr/local/nagios/etc/static/test2.cfg:1)
When you get these errors, simply delete the .cfg file it is referencing

Then run the same command again

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Keep repeating these steps until you get the following:

Code: Select all

Total Warnings: xxx
Total Errors:   0

Things look okay - No serious problems were detected during the pre-flight check
Once you are at this point, go into CCM and Apply Configuration.

Does this fix your problem?

Re: SQL SERVICES CRITICAL - CANT DELETE THEM IN CCM

Posted: Wed Sep 10, 2014 1:23 pm
by povachon
I have no error but still the ghost entry !

=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2014.09.10 14:21:32 =~=~=~=~=~=~=~=~=~=~=~=
login as: root
[email protected]'s password:
Last login: Wed Sep 10 14:20:54 2014 from 10.10.100.88

]0;root@asl:~[?1034h[root@asl ~]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

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 177 services.
Checked 159 hosts.
Checked 42 host groups.
Checked 2 service groups.
Checked 6 contacts.
Checked 3 contact groups.
Checked 115 commands.
Checked 11 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 159 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 11 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors: 0