Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

[dev.icinga.com #4240] Cronk Hostgroups: Bad number of hosts #1291

Closed
icinga-migration opened this issue Jun 3, 2013 · 24 comments
Closed

[dev.icinga.com #4240] Cronk Hostgroups: Bad number of hosts #1291

icinga-migration opened this issue Jun 3, 2013 · 24 comments

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/4240

Created by ossmon on 2013-06-03 13:19:00 +00:00

Assignee: (none)
Status: Closed (closed on 2013-10-01 12:15:01 +00:00)
Target Version: (none)
Last Update: 2014-12-08 14:38:08 +00:00 (in Redmine)

Icinga Version: 1.10.0
OS Version: any

The number of hosts in the Hostgroups are not correct.
It looks as if the number was tripled

In my example, the number of hosts should be 2 and 3 (and not 6 and 9)

HostgroupsBadCountNumber.JPG

Attachments


Relations:

@icinga-migration
Copy link
Author

Updated by ossmon on 2013-07-16 13:05:06 +00:00

can someone reproduce it ?

@icinga-migration
Copy link
Author

Updated by mhein on 2013-09-30 09:00:10 +00:00

  • Target Version set to 1.9.2

@icinga-migration
Copy link
Author

Updated by elippmann on 2013-09-30 12:31:15 +00:00

  • Status changed from New to Assigned
  • Assigned to set to elippmann

@icinga-migration
Copy link
Author

Updated by elippmann on 2013-09-30 14:24:40 +00:00

  • Status changed from Assigned to 8
  • Assigned to deleted elippmann

Unfortunately I couldn't reproduce the problem. Could someone else please have a look at it.

@icinga-migration
Copy link
Author

Updated by jmosshammer on 2013-09-30 14:47:53 +00:00

I can't reproduce this, too. Do you have a special setup (multiple instances, for example? ) Is the number of hosts correct if you click on the row action button and hosts?

@icinga-migration
Copy link
Author

Updated by ossmon on 2013-10-01 07:26:14 +00:00

  • File added BadNumberOfHosts.JPG

We don't have a special setup. Only one instance.

I've tested in our 3 environments:

TEST: values are multiplied by 2
QS: values are multiplied by 2
PROD: values are multiplied by 3

When i click on the row action button and hosts, i become the right numbers of hosts, but there is also another problem:

If the hosts have different status (for example UP and DOWN), a click on one status show all hosts and not only the UP or DOWN hosts.
In the example, it doesn't matter which line (UP or DOWN) i click, i get always all the hosts.

BadNumberOfHosts.JPG

@icinga-migration
Copy link
Author

Updated by ossmon on 2013-10-01 09:22:33 +00:00

hi Jannis,
i made some more tests i can say that when you done some changes in the hostgroups configuration (for example add an hostgroup for a host + reload + remove this group + reload + add again the same hostgroup + reload ....), the table icinga_hostgroup_members will grow with new records, so that the number displayed was in my example 4 then 6 then 8 then 10 ....
can you reproduce it ?

@icinga-migration
Copy link
Author

Updated by ossmon on 2013-10-01 09:29:13 +00:00

i do know a reload+flush and i have for the hostgroups again in my TEST Environment double values.

@icinga-migration
Copy link
Author

Updated by ossmon on 2013-10-01 09:37:40 +00:00

  • File added DoubleRows.JPG

After the reload+flush, the table has for my hostgroup these rows:
There were 2 times created for each host.

DoubleRows.JPG

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2013-10-01 09:50:20 +00:00

that sounds more like an ido2db issue to me.

can you show us

$ grep clean_ ido2db.cfg

and further, the debug log queries on the table icinga_hostgroup_members?

@icinga-migration
Copy link
Author

Updated by mhein on 2013-10-01 10:03:20 +00:00

  • Category set to 73
  • Assigned to set to mhein

@icinga-migration
Copy link
Author

Updated by mhein on 2013-10-01 10:12:23 +00:00

  • Status changed from 8 to Feedback

@icinga-migration
Copy link
Author

Updated by mhein on 2013-10-01 10:49:13 +00:00

  • Project changed from Web to 18
  • Category changed from 73 to 82

@icinga-migration
Copy link
Author

Updated by ossmon on 2013-10-01 11:09:27 +00:00

grep clean_ ido2db.cfg
clean_realtime_tables_on_core_startup=0
clean_config_tables_on_core_startup=0

We have the default value with 0 in order that the reload is fast during the day when we are doing several changes, but we do one time per night a reload with the value set to 1 so that the db will be clean

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2013-10-01 11:27:34 +00:00

please set both to 1 again, and retry your tests.

this seems related to #3022 which is obviously not fixed yet.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2013-10-01 11:30:42 +00:00

  • Assigned to changed from mhein to mfriedrich
  • Target Version deleted 1.9.2

@icinga-migration
Copy link
Author

Updated by ossmon on 2013-10-01 11:42:02 +00:00

I do this test:

  1. Set default value with 0 and reload -> the host members are initially inserted twice as describes in message #9
  2. Then set default value to 1 and reload -> then host members are now stored 3 times
  3. Then reload -> then host members are now stored 4 times
    and so on

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2013-10-01 11:55:50 +00:00

ossmon wrote:

  1. Then set default value to 1 and reload

you're hopefully restarting ido2db once these settings are modified?

@icinga-migration
Copy link
Author

Updated by ossmon on 2013-10-01 12:08:17 +00:00

Forget the test before (i made a mistake between value 0 and 1)

  1. Default value = 1 and reload -> OK (records exist only one time)
  2. Default value = 0 and reload -> Each reload add a new record to the hostgroup_members table

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2013-10-01 12:12:45 +00:00

ok thanks. crap.

in regards of performance - upgrade to icinga (core/idoutils) 1.9.3 (or 1.10.0 soon).
in regards of the duplicated entries - set these entries to 1 again.

i'm not sure if they actually make sense, and will probably deprecate them for being buggy/experimental. the performance config dump bottlenecks have been even more optimized in 1.9.3 - see https://www.icinga.org/2013/07/23/thanks-to-immobilienscout24/ )

in icinga2 db_ido we will clear the config tables on startup anyways btw (having that code in front of me).

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2013-10-01 12:15:01 +00:00

  • Status changed from Feedback to Closed
  • Assigned to deleted mfriedrich

#4791

@icinga-migration
Copy link
Author

Updated by ossmon on 2013-10-01 12:24:48 +00:00

@dnsmichi: do you mean 1.9.3 or 1.9.2 (which is given in the link about immobilienscout)?
We have already core 1.9.2

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2013-10-01 12:43:28 +00:00

  • Icinga Version changed from 1 to 1
  • (unknown custom field) changed from 1 to 1

hm, 1.9.3 contains a fix for pgsql so not necessarily needed and 1.9.2 is sufficient. i'll update the versions on the issue.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-12-08 14:38:08 +00:00

  • Project changed from 18 to Core, Classic UI, IDOUtils
  • Category changed from 82 to IDOUtils
  • Icinga Version changed from 1 to 1
  • OS Version set to any

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant