Page 1 of 2

Host groups issue

Posted: Wed Apr 10, 2019 2:12 pm
by jsalsbury
Good afternoon
I am going through and reevaluating all our host groups and building out dashboards. However I have ran into an issue, I am finding servers in a host group that at not actually in the host group. In this particular care I have some Linux server in a host group and when I go to that HG they are not actually in the group but in the dashboards they are their. This is a windows application so I am not sure how they got there or how to remove them as when I am editing that group I am not finding them in the group to remove them.

thoughts? Is this a user error or perhaps a feature (bug)?

Re: Host groups issue

Posted: Wed Apr 10, 2019 4:02 pm
by benjaminsmith
Hello @jsalsbury,

It's possible that the dashlet has not refreshed, so please try clear clear your browser cache and re-load the page.

If that doesn't solve it, then make sure you have applied configuration without errors and then check for multiple nagios processes. Run the following command, there should be one main process.

Code: Select all

ps -ef | head -1 && ps -ef | grep bin/nagios
If there's more than one, restart Nagios.

Code: Select all

service nagios stop
killall nagios
service nagios start

Re: Host groups issue

Posted: Thu Apr 11, 2019 9:48 am
by jsalsbury
I cleared the cache and looked for multiple nagios instances, I restarted and they still remain up.
Should I let it stay stopped for multiple minutes?

Re: Host groups issue

Posted: Thu Apr 11, 2019 10:07 am
by jsalsbury
I was able to clear cache and stop all the instances and am not seeing any difference.

Re: Host groups issue

Posted: Thu Apr 11, 2019 11:48 am
by benjaminsmith
Hi @jsalsbury,

Ok. Can you upload a screen shot of the dashboard in question along with your system profile for us to review?

To send us your system profile.
Login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
Save the profile.zip file and share in a private message or upload it to the ticket.

Thanks.

Re: Host groups issue

Posted: Thu Apr 11, 2019 12:29 pm
by jsalsbury
here is the screen shot of the dashboard, there should only be two machines in the particular HG. I will download the profile and private message it to you.

Re: Host groups issue

Posted: Thu Apr 11, 2019 2:22 pm
by benjaminsmith
Hi @jsalsbury,

The reason your seeing those hosts in the hostgroup hg_setan_db is due to object definition inheritance in Nagios.

Go to the Configure > CCM > Host Groups > hg_setan_db and then go to Actions > Relationships from the right-hand side of the screen (see attached image).

In the object definitions, the hostgroup hg_setan_db, has no members:

Code: Select all

define hostgroup {
    hostgroup_name       hg_setan_db
    alias                Tanium Database
}
However, this hostgroup is defined in the xiwizard_ncpa_host template:

Code: Select all

define host {
    name                            xiwizard_ncpa_host
    hostgroups                      hg_sesep,hg_setan,hg_setan_con,hg_setan_db
    check_command                   check_xi_host_ping!3000.0!95%!5000.0!100%!!!!
    use                             xiwizard_generic_host
    contact_groups                  mcafee_epo_admin,symantec_endpoint_admins,tanium_admins
    notification_interval           5
    notification_period             24x7
    first_notification_delay        5
    notification_options            d,u,r,s,
    notifications_enabled           1
    register                        0
}
The hosts you are seeing were created with the template above:

Code: Select all

define host {
    host_name                pepwds01458.cww.pep.pvt
    use                      xiwizard_ncpa_host
    address                  30.201.25.128
    max_check_attempts       5
    check_interval           5
    retry_interval           1
    check_period             xi_timeperiod_24x7
    contacts                 03240799
    notification_interval    60
    notification_period      xi_timeperiod_24x7
    icon_image               win_server.png
    statusmap_image          win_server.png
    _xiwizard                ncpa
    register                 1
}
You can edit these relationships in the CCM. Let me know if you have any other questions.

Re: Host groups issue

Posted: Thu Apr 11, 2019 2:37 pm
by jsalsbury
So the reason their are all tied together because of the NCPA host ?
This is a little confusing as they are tied to a HG group but not in it. So if i go through the relationships and remove them I can make sure they get in the proper groups?

Just making sure I understand

Re: Host groups issue

Posted: Thu Apr 11, 2019 2:53 pm
by benjaminsmith
Hi @jsalbury,

Yes, that's right. Sometimes it can be hard to follow the inheritance rules. You may want to remove the Host Groups from then NCPA wizard template. This is not typical.

Let us know if you have any other questions.

Re: Host groups issue

Posted: Thu Apr 11, 2019 3:25 pm
by jsalsbury
I do believe that was my issue. Thanks for the lesson on best practices.