Page 1 of 2

services duplicated and "out of sync"

Posted: Thu Jun 09, 2011 10:35 am
by oz123
Hi,

After importing some new services and applying configuration, almost all of our services are with "out of sync"
Some of the other services are Duplicated many many times and deleting it manually will take us decades.
It looks like we don't have a valid snapshot for restore.
Please help us ASAP as it's a production environment and we can't be sure that it's been monitored correcty at the time.
We are wating for you answer and we have the option for you to connect remotely .
The system is Nagios XI 2009R1.4B based on a Linux OS

Thanks a lot

Oz,
Easy-Forex Thechnologies

Re: services duplicated and "out of sync"

Posted: Thu Jun 09, 2011 12:16 pm
by tonyyarusso
oz123 wrote:After importing some new services and applying configuration, almost all of our services are with "out of sync"
I suspect that means there was an error in the config, so it's refusing to apply the current ones. Is there anything useful in the log of the failed snapshot that I assume you have?
oz123 wrote:Some of the other services are Duplicated many many times and deleting it manually will take us decades.
Were they duplicated in the configs that you imported as well? If we can't restore something, there is the option of deleting them with SQL statements, which would be faster.
oz123 wrote:It looks like we don't have a valid snapshot for restore.
Could you show me your snapshots page? There must be some that worked before the config import.
oz123 wrote:The system is Nagios XI 2009R1.4B based on a Linux OS
Which one?

Re: services duplicated and "out of sync"

Posted: Thu Jun 09, 2011 2:19 pm
by oz123
Hi,

Thanks for the fast reply.

1) snapshot has no error now, but still i have the same problem i have described, so i assume restoring from snpshot won't help. i have attached though one with an error
2) duplicates created somehow inside some services in nagios but for sure not so many as the situation is now - i have total of 848 pages of services and it shouldn't be more then 20 - see example of the attched "duplicated" file.by the way, all services names including %sql% are these which are duplicated.
my problem started on 6/6 and i see no good snapshot before that.
3) Linux Red Hat 4.1.2-48

I think if you can't put your finger on the exact problem, then the best solution for me will be to delete ALL services together with all duplicates and out of syncs.
means that the "services" section in nagiox XI will be empty. can you help with that ?
I have the Original services as a backup which i can copy to /usr/local/nagios/etc/services if necessary

Thanks a lot

Re: services duplicated and "out of sync"

Posted: Thu Jun 09, 2011 2:21 pm
by oz123
Hi,

Thanks for the fast reply.

1) snapshot has no error now, but still i have the same problem i have described, so i assume restoring from snpshot won't help. i have attached though one with an error
2) duplicates created somehow inside some services in nagios but for sure not so many as the situation is now - i have total of 848 pages of services and it shouldn't be more then 20 - see example of the attched "duplicated" file.by the way, all services names including %sql% are these which are duplicated.
my problem started on 6/6 and i see no good snapshot before that.
3) Linux Red Hat 4.1.2-48

I think if you can't put your finger on the exact problem, then the best solution for me will be to delete ALL services together with all duplicates and out of syncs.
means that the "services" section in nagiox XI will be empty. can you help with that ?
I have the Original services as a backup which i can copy to /usr/local/nagios/etc/services if necessary

Thaks a lot

Re: services duplicated and "out of sync"

Posted: Thu Jun 09, 2011 2:57 pm
by oz123
Hi,

Thanks for the fast reply.

1) snapshot has no error now, but still i have the same problem i have described, so i assume restoring from snpshot won't help. i have attached though one with an error
2) duplicates created somehow inside some services in nagios but for sure not so many as the situation is now - i have total of 848 pages of services and it shouldn't be more then 20 - see example of the attched "duplicated" file.by the way, all services names including %sql% are these which are duplicated.
my problem started on 6/6 and i see no good snapshot before that.
3) Linux Red Hat 4.1.2-48

I think if you can't put your finger on the exact problem, then the best solution for me will be to delete ALL services together with all duplicates and out of syncs.
means that the "services" section in nagiox XI will be empty. can you help with that ?
I have the Original services as a backup which i can copy to /usr/local/nagios/etc/services if necessary

Thanks

Re: services duplicated and "out of sync"

Posted: Thu Jun 09, 2011 3:28 pm
by tonyyarusso
oz123 wrote: 3) Linux Red Hat 4.1.2-48
How did you even get it installed on RHEL 4? We only support RHEL 5...

Re: services duplicated and "out of sync"

Posted: Thu Jun 09, 2011 4:22 pm
by oz123
Hi,

This is not we have been told in the past.
Can you send me that procedure for deleting the services in mysql ?

Thanks

Re: services duplicated and "out of sync"

Posted: Fri Jun 10, 2011 11:05 am
by lmiltchev
The safest way to delete services in mysql would be to use the nagiosxi web interface. Please, see this link:
http://assets.nagios.com/downloads/nagi ... p#deleting

Re: services duplicated and "out of sync"

Posted: Tue Jun 14, 2011 9:23 am
by tonyyarusso
As far as SQL statements, the configs are stored in the `nagiosql` database, with separate tables for a variety of relations. So, you would need to find your services that you want to get rid of (in tbl_service iirc), then track down any other tables that reference those, and write the appropriate DELETE FROM statements to drop them. Finally, use the "Apply Configuration" button in the CCM to implement the changes.

Re: services duplicated and "out of sync"

Posted: Tue Jun 14, 2011 9:29 am
by oz123
Thanks,

Did it already, works !!