Migration problem when service is in a _multiple_hosts" file

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
rickwilson7425
Posts: 125
Joined: Tue Mar 18, 2014 3:20 pm

Migration problem when service is in a _multiple_hosts" file

Post by rickwilson7425 »

This is an ongoing issue which Andy has helped us with before.

I have upgraded our test instance to NagiosXI 2014v2.0.

I am migrating from Core 3.5 to this version.

Most things come across fine but there appears to be a problem with migrating servicegroups.cfg entries when the associated service is contained in a "_multiple_hosts" file.

If I create the services contained in the _multiple_hosts file as individual services and then delete that _multiple_hosts file it will get past that point but fail on the next instance it encounters.

Thanks for your help.

Rick
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Migration problem when service is in a _multiple_hosts"

Post by abrist »

Don't you guys have 2 hours left of consulting? If so, you are welcome to claim it.
Could you give us an example of what the _multiple_hosts file contains?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
rickwilson7425
Posts: 125
Joined: Tue Mar 18, 2014 3:20 pm

Re: Migration problem when service is in a _multiple_hosts"

Post by rickwilson7425 »

Here is a small chunk of it:

Code: Select all

define service {
service_description            Forbind 24920 Process Count
host_name                      jpdcp2,jpdcp1,denpjpdcm20,denpjpdcm21
use                            generic-service-5
check_command                  check_nrpe_procs_generic!-c 1:1 -C forbind -u opscadm -a 24920
check_period                   24x7
contact_groups                 gscc-group
event_handler_enabled          0
notification_period            24x7
}
define service {
service_description            ingestNOTAM
host_name                      jpdcp2,jpdcp1,denpjpdcm20,denpjpdcm21
use                            generic-service-5
check_command                  check_nrpe_procs_generic!-c 1:1 -C ingestNOTAM -u opscadm -a 25001
check_period                   24x7
contact_groups                 gscc-group
event_handler_enabled          0
notification_period            24x7
}
define service {
service_description            ingestMTDD ui_domestic
host_name                      jpdcp2,jpdcp1,denpjpdcm20,denpjpdcm21
use                            generic-service-5
check_command                  check_nrpe_procs_generic!-c 1:1 -C ingestMTDD -u opscadm -a ui_domestic
check_period                   24x7
contact_groups                 gscc-group
event_handler_enabled          0
notification_period            24x7
}
define service {
service_description            ingestMTDD ui_motne
host_name                      jpdcp2,jpdcp1,denpjpdcm20,denpjpdcm21
use                            generic-service-5
check_command                  check_nrpe_procs_generic!-c 1:1 -C ingestMTDD -u opscadm -a ui_motne
check_period                   24x7
contact_groups                 gscc-group
event_handler_enabled          0
notification_period            24x7
}
define service {
service_description            Disk Space on /var
host_name                      dengjsis1,dengjsip1,dengjsip2,denbeffp1,denbeffp2,denplfmtp1,denplfmtp2
use                            hostgroup-service
check_command                  check_nrpe_disk_space!15%!10%!/var
contact_groups                 unix-admins
}
define service {
service_description            JBoss Process Count:
host_name                      denbeffp1,denbeffp2
use                            generic-service-5
check_command                  check_nrpe_procs_by_user!1:2!1:2!java!jeppadm
check_period                   24x7
contact_groups                 gscc-group
event_handler_enabled          0
notes_url                      http://confluence.jeppesen.com/display/TSS/AOCi+and+JSI
notification_period            24x7
}
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Migration problem when service is in a _multiple_hosts"

Post by lmiltchev »

I am going to test this and get back to you.

Are you importing the configs in the correct order?

Code: Select all

commands -> timeperiods -> contacttemplates -> contacts -> contactgroups -> hosttemplates -> hosts -> hostgroups -> servicetemplates -> services -> servicegroups
Be sure to check out our Knowledgebase for helpful articles and solutions!
rickwilson7425
Posts: 125
Joined: Tue Mar 18, 2014 3:20 pm

Re: Migration problem when service is in a _multiple_hosts"

Post by rickwilson7425 »

Yes, as far as I can tell, I am doing that. We have 3 command files (coomands.cfg, misccomamnds.cfg, notificationcommands.cfg) so I am doing all those first and then right down the list.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Migration problem when service is in a _multiple_hosts"

Post by lmiltchev »

Most things come across fine but there appears to be a problem with migrating servicegroups.cfg entries when the associated service is contained in a "_multiple_hosts" file.
When you didn't split the "_multiple_hosts" file, were you able to successfully import the services? If this didn't go well, the next step (importing servicegroups) would fail too. I tried to import the the services and got bunch of duplicates. I haven't tried splitting the file yet. I might do this later. What are the exact errors and warnings that you are getting?
Be sure to check out our Knowledgebase for helpful articles and solutions!
rickwilson7425
Posts: 125
Joined: Tue Mar 18, 2014 3:20 pm

Re: Migration problem when service is in a _multiple_hosts"

Post by rickwilson7425 »

I haven't split the "_multiple_hosts". I'm not sure what you mean by that.

I don't get any errors until I try to verify the write of the files in CCM. This is an example of what I get: (the top of the message is the only thing relevant at this point, I think...)

Code: Select all

Error: Could not find a service matching host name 'dencomp1' and description 'Disk Space on /WX' (config file '/usr/local/nagios/etc/servicegroups.cfg', starting on line 553)
Error: Could not find a service matching host name 'denship01p' and description 'FedEx Broadcast Service' (config file '/usr/local/nagios/etc/servicegroups.cfg', starting on line 428)
Error: Could not expand members specified in servicegroup 'shipping-prod' (config file '/usr/local/nagios/etc/servicegroups.cfg', starting at line 428)

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...
Warning: Duplicate definition found for service 'Apache Process Count: PROD' on host 'denpap02' (config file '/usr/local/nagios/etc/services/denpap02.cfg', starting on line 169)
Warning: Duplicate definition found for service 'Apache Process Count: PROD' on host 'denpap02' (config file '/usr/local/nagios/etc/services/denpap02.cfg', starting on line 157)
Warning: Duplicate definition found for service 'Apache Process Count: PROD' on host 'denpap02' (config file '/usr/local/nagios/etc/services/denpap02.cfg', starting on line 145)

[color=#FF0000]****A LOT OF DUPLICATE ERRORS DELETED FROM HERE TO MAKE THIS SHORTER  *****[/color]

Error: Could not find a service matching host name 'dencomp1' and description 'Disk Space on /WX' (config file '/usr/local/nagios/etc/servicegroups.cfg', starting on line 553)
Error: Could not find a service matching host name 'denship01p' and description 'FedEx Broadcast Service' (config file '/usr/local/nagios/etc/servicegroups.cfg', starting on line 428)
Error: Could not expand members specified in servicegroup 'shipping-prod' (config file '/usr/local/nagios/etc/servicegroups.cfg', starting at line 428)
Error processing object config files!


***> One or more problems was encountered while processing the config files...

Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.

sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Migration problem when service is in a _multiple_hosts"

Post by sreinhardt »

The verify you are showing now, is saying that the following services could not be found:

host: dencomp1
service: Disk Space on /WX

host denship01p
service: FedEx Broadcast Service

It is also saying that one or more members in the service group shipping-prod is not able to be found(very likely one from above). I would suggest looking through the already imported configs for these service names, and looking through the multiple hosts config to see if they might have been dropped in there. I would also suggest taking a look at the current shipping-prod service group definition and find which member is missing.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
rickwilson7425
Posts: 125
Joined: Tue Mar 18, 2014 3:20 pm

Re: Migration problem when service is in a _multiple_hosts"

Post by rickwilson7425 »

I already looked through all that before I posted this message - there is nothing missing from the servicegroups. The services those messages refer to are found in one of the "_multiple_hosts" entries.

If I create those services as individual items in the database and then delete the "_multiple_hosts" entries associated with them it gets past those and fails at the next one it finds of the same type.

That is why I am saying that there seems to be a problem with the system associating servicegroup entries with services that exist in a "_multiple_hosts" entry.
User avatar
Nagios Support
Posts: 36
Joined: Thu Sep 04, 2014 12:16 pm

Re: Migration problem when service is in a _multiple_hosts"

Post by Nagios Support »

We will have to do some more digging into this and will get back to you within the next 24 hours.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked