Page 2 of 2
Re: Unable to delete services or host in XI
Posted: Mon Jan 05, 2015 4:50 pm
by lmiltchev
You are using a very old instance of XI, which was known for "ghost" hosts/services issues...
In addition to this, you are using the "old", legacy CCM. Try removing the services via the "new" CCM and see if this is going to fix the issue.
I would definitely recommend upgrading to the latest version of XI.
Re: Unable to delete services or host in XI
Posted: Wed Jan 07, 2015 3:22 am
by David.adder
I have tried it using the new CCM but still the same. Configuration apply is OK after deleting services, but these services are there again.
I would like to upgrade, but I am not able to do that, us our maintenance contract with you is expired.

Re: Unable to delete services or host in XI
Posted: Wed Jan 07, 2015 6:02 pm
by sreinhardt
I'm going to guess you have, but have you tried removing with the red X to the right of the service instead of checking the box and using with selected?
Re: Unable to delete services or host in XI
Posted: Thu Jan 08, 2015 2:30 am
by David.adder
Hi sreinhardt,
Yes, I already tried it in that both ways, but still the same. I can delete, but after applying configuration, I see that services again.
Re: Unable to delete services or host in XI
Posted: Thu Jan 08, 2015 2:53 pm
by sreinhardt
Are you getting any query errors in your /var/log/messages?
Re: Unable to delete services or host in XI
Posted: Mon Jan 12, 2015 3:26 am
by David.adder
I found these messages error (and more)
Jan 11 03:55:31 SRVBOXASDC1009 ndo2db: Error: mysql_query() failed for 'INSERT INTO nagios_logentries SET instance_id='1', logentry_time=FROM_UNIXTIME(1420944931), entry_time=FROM_UNIXTIME(1420944931), entry_time_usec='710497', logentry_type='2', logentry_data='Warning: Passive check result was received for service \'my_BcmSqlStartupSvc_Service\' on host \'AMPEREBCM\', but the host could not be found!', realtime_data='1', inferred_data_extracted='1''
Jan 11 03:55:31 SRVBOXASDC1009 ndo2db: Error: mysql_query() failed for 'INSERT INTO nagios_logentries SET instance_id='1', logentry_time=FROM_UNIXTIME(1420944931), entry_time=FROM_UNIXTIME(1420944931), entry_time_usec='710603', logentry_type='131072', logentry_data='EXTERNAL COMMAND: PROCESS_SERVICE_CHECK_RESULT;AMPEREBCM;my_MSSQLSERVER_Service;0;OK: All services are in their appropriate state\.|', realtime_data='1', inferred_data_extracted='1''
Jan 11 03:55:31 SRVBOXASDC1009 ndo2db: Error: mysql_query() failed for 'INSERT INTO nagios_logentries SET instance_id='1', logentry_time=FROM_UNIXTIME(1420944931), entry_time=FROM_UNIXTIME(1420944931), entry_time_usec='710754', logentry_type='2', logentry_data='Warning: Passive check result was received for service \'my_MSSQLSERVER_Service\' on host \'AMPEREBCM\', but the host could not be found!', realtime_data='1', inferred_data_extracted='1''
Jan 11 03:55:31 SRVBOXASDC1009 ndo2db: Error: mysql_query() failed for 'INSERT INTO nagios_logentries SET instance_id='1', logentry_time=FROM_UNIXTIME(1420944931), entry_time=FROM_UNIXTIME(1420944931), entry_time_usec='710869', logentry_type='131072', logentry_data='EXTERNAL COMMAND: PROCESS_SERVICE_CHECK_RESULT;AMPEREBCM;my_c_drive;0;OK: c:: 24\.6G|\'c: %\'=15%;10;4 \'c:\'=24\.61GB;2\.89;1\.16;0;28\.89', realtime_data='1', inferred_data_extracted='1''
Jan 11 03:55:31 SRVBOXASDC1009 ndo2db: Error: mysql_query() failed for 'INSERT INTO nagios_logentries SET instance_id='1', logentry_time=FROM_UNIXTIME(1420944931), entry_time=FROM_UNIXTIME(1420944931), entry_time_usec='711018', logentry_type='2', logentry_data='Warning: Passive check result was received for service \'my_c_drive\' on host \'AMPEREBCM\', but the host could not be found!', realtime_data='1', inferred_data_extracted='1''
Jan 11 03:55:33 SRVBOXASDC1009 ndo2db: Error: mysql_query() failed for 'INSERT INTO nagios_logentries SET instance_id='1', logentry_time=FROM_UNIXTIME(1420944933), entry_time=FROM_UNIXTIME(1420944933), entry_time_usec='241249', logentry_type='131072', logentry_data='PASSIVE HOST CHECK: SRVFSBCN010;0;OK: Lets pretend everything is going to be ok\.', realtime_data='1', inferred_data_extracted='1''
Jan 11 03:55:33 SRVBOXASDC1009 ndo2db: Error: mysql_query() failed for 'INSERT INTO nagios_logentries SET instance_id='1', logentry_time=FROM_UNIXTIME(1420944933), entry_time=FROM_UNIXTIME(1420944933), entry_time_usec='241644', logentry_type='131072', logentry_data='PASSIVE SERVICE CHECK: SRVFSBCN010;my_c_drive;0;OK: c:: 27\.5G', realtime_data='1', inferred_data_extracted='1''
Jan 11 03:55:33 SRVBOXASDC1009 ndo2db: Error: mysql_query() failed for 'INSERT INTO nagios_logentries SET instance_id='1', logentry_time=FROM_UNIXTIME(1420944933), entry_time=FROM_UNIXTIME(1420944933), entry_time_usec='242030', logentry_type='131072', logentry_data='PASSIVE SERVICE CHECK: SRVFSBCN010;my_d_drive;0;OK: d:: 40\.6G', realtime_data='1', inferred_data_extracted='1''
Jan 11 03:55:33 SRVBOXASDC1009 ndo2db: Error: mysql_query() failed for 'INSERT INTO nagios_logentries SET instance_id='1', logentry_time=FROM_UNIXTIME(1420944933), entry_time=FROM_UNIXTIME(1420944933), entry_time_usec='242411', logentry_type='131072', logentry_data='PASSIVE SERVICE CHECK: SRVFSBCN010;my_q_drive;0;OK: q:: 8\.06G', realtime_data='1', inferred_data_extracted='1''
I have tried to fix the ndo2db error using nagios scripts for this (repairmysql.sh nagios; reconfigure_nagios.sh) but this not fix the problem
Re: Unable to delete services or host in XI
Posted: Mon Jan 12, 2015 11:46 am
by lmiltchev
I have tried to fix the ndo2db error using nagios scripts for this (repairmysql.sh nagios; reconfigure_nagios.sh) but this not fix the problem
Did you try forcing repair on the corrupted tables as described in our documentation?
Check the mysqld.log to see if the "nagios_logentries" table is corrupted after rerunning the database repair script:
Code: Select all
cd /usr/local/nagiosxi/scripts
./repairmysql.sh nagios
tail /var/log/mysqld.log
If you are still having issues, you can try:
Code: Select all
service mysqld stop
cd /var/lib/mysql/nagios
myisamchk -r -f nagios_logentries
service mysqld start
rm -f /usr/local/nagiosxi/var/dbmaint.lock
php /usr/local/nagiosxi/cron/dbmaint.php
Check your mysqld.log again.
Note: In certain instances, it may be necessary to truncate (empty) one or more tables. For more information, see our the documentation here:
http://assets.nagios.com/downloads/nagi ... tabase.pdf