Bulk Cloning adding contact

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Bulk Cloning adding contact

Post by BanditBBS »

When using bulk cloning it *sometimes* adds my name as a contact on the new hosts. I can't find a pattern and haven't investigated too much yet, but its beginning to become a problem as I too often forget to go check since it shouldn't be doing it in the first place. Has anyone else experienced this behavior?
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Bulk Cloning adding contact

Post by lmiltchev »

Can you briefly describe how do you do the cloning? We will try to recreate the issue in house.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Bulk Cloning adding contact

Post by BanditBBS »

All of my hosts use templates and the templates set check intervals and contacts and other required information.

I select a host to clone, select all the services and then enter "address,hostname" list into the box. Most of the time there are multiple hosts, 3-4. I uncheck the remove parent and hostgroups box and hit next. On that screen I either hit finish or sometimes I hit next, next, next and then finish. Not sure if this is happening if I hit the first finish and/or if I do the next next next finish. I haven't tried to replicate much yet, been too busy, but noticed it is happening more often and it adds my name to the host as a contact, therefore breaking the inherited contacts on the templates.

The services also have my contact added to them when they should have none.

EDIT #1: I replicate it over and over again by hitting the first FINISH and not next, next, next, finish.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Bulk Cloning adding contact

Post by lmiltchev »

When using bulk cloning it *sometimes* adds my name as a contact on the new hosts.
The services also have my contact added to them when they should have none.
Is your contact a member of a contact group, that is added to one of these (host or service) templates?

Can you show us a sample config of the templates, and the host/services you are cloning?
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Bulk Cloning adding contact

Post by BanditBBS »

Ludmil, nope, my contact is not on any of these hosts, I get alerts for literally one of the hosts in my system :)

Host Template:

Code: Select all

define host {
       name                                     rose_nh_generic_host
       parents                                  robot-rose
       check_command                            check_robot_check_xi_host_ping!3000.0!80%!5000.0!100%!!!!10.143.162.194
       max_check_attempts                       2
       check_interval                           5
       retry_interval                           1
       check_period                             xi_timeperiod_24x7
       event_handler_enabled                    1
       flap_detection_enabled                   1
       process_perf_data                        1
       retain_status_information                1
       retain_nonstatus_information             1
       contact_groups                           ROSE_NAGIOS_ALL_CG
       notification_interval                    0
       notification_period                      xi_timeperiod_24x7
       notifications_enabled                    1
       register                                 0

}
Service Template:

Code: Select all

define service {
       name                                     rose_nh_generic-service-5
       service_description                      Generic Rosetta Stone Service(5 Min)
       is_volatile                              0
       max_check_attempts                       3
       check_interval                           5
       retry_interval                           2
       active_checks_enabled                    1
       passive_checks_enabled                   1
       check_period                             24x7
       parallelize_check                        1
       obsess_over_service                      1
       check_freshness                          0
       event_handler_enabled                    1
       flap_detection_enabled                   1
       process_perf_data                        1
       retain_status_information                1
       retain_nonstatus_information             1
       notification_interval                    0
       notification_period                      24x7
       notification_options                     w,c,u,r,
       notifications_enabled                    1
       register                                 0

}
I select a host that has no setting except an IP and the host template assigned. It has about 11 services on it all using the service template above. They only have a command set, all other settings are inherited by the template and/or host(contacts).

I select all services and put in a list of 4 new hostnames,address in the box. I uncheck the replace parents, hit next and then finish. Everything is fine except my name is added as a contact to the 4 new hosts and the 44 new services.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Bulk Cloning adding contact

Post by lmiltchev »

Ludmil, nope, my contact is not on any of these hosts, I get alerts for literally one of the hosts in my system
I would assume your contact is NOT added to the "ROSE_NAGIOS_ALL_CG" contactgroup... Can you confirm?

I would expect to see all members of the "ROSE_NAGIOS_ALL_CG" contactgroup to be added to the services of any host, using the "rose_nh_generic_host" template via implied inheritance. If your contact is not a member of "ROSE_NAGIOS_ALL_CG", it's beyond me how in a world it is added to the host & services... I am usually pretty good with finding bugs, and breaking stuff, but so far I haven't been able to recreate this... :(
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Bulk Cloning adding contact

Post by BanditBBS »

lmiltchev wrote:
Ludmil, nope, my contact is not on any of these hosts, I get alerts for literally one of the hosts in my system
I would assume your contact is NOT added to the "ROSE_NAGIOS_ALL_CG" contactgroup... Can you confirm?

I would expect to see all members of the "ROSE_NAGIOS_ALL_CG" contactgroup to be added to the services of any host, using the "rose_nh_generic_host" template via implied inheritance. If your contact is not a member of "ROSE_NAGIOS_ALL_CG", it's beyond me how in a world it is added to the host & services... I am usually pretty good with finding bugs, and breaking stuff, but so far I haven't been able to recreate this... :(
Ludmil,

Nope, it is not a member of the contactgroup. You are also expecting the wrong things to happen though. The host and services on the host that I am copying have no contacts on them at all, so the copies that are made should have no contacts or contactgroups assigned as well, just the templates. let me record a video and PM you the link to show you :)
Last edited by BanditBBS on Tue Mar 15, 2016 12:38 pm, edited 1 time in total.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Bulk Cloning adding contact

Post by BanditBBS »

I can reproduce EVERY time I do this. Regardless if I hit next, finish or next next next finish.

The issue I believe is since the host and services have no contacts it is setting a default contact.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Bulk Cloning adding contact

Post by lmiltchev »

I was able to reproduce the issue. It's annoying!
According to the Nagios Core documentation, "the directives in read are required, , while those in black are optional"...
https://assets.nagios.com/downloads/nag ... .html#host

My initial thought was - OK, the "contacts" and the "contact_groups" directives are required, so if you don't have a contact or a contactgroup assigned, the "Bulk Host Cloning and Import" wizard will assign the user running the wizard as a "default" contact (so that configuration won't fail)... Well, not really.

1. Defining a host/service without a contact or a contactgroup won't cause apply configuration to fail. You will only see some warnings.

2. I had a valid contactgroup assigned to the host I was cloning, but the Bulk wizard still added me as a contact...

I would say this is a bug. I will discuss it with our developers before I file it though.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Bulk Cloning adding contact

Post by lmiltchev »

Update: The bug was verified by our developers, so I filed it internally (TASK ID 8026).
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked