Open Yoda-BZH opened 3 years ago
Hey @Yoda-BZH, please close this issue and reopen it here: https://github.com/Icinga/icingaweb2/
Regarding to your problem this could also help: https://github.com/Icinga/icingaweb2/pull/4324
But please open that icingaweb2 issue in any case.
Hello,
The schema to be modified is in this repository (https://github.com/Icinga/icinga2/blob/master/lib/db_ido_mysql/schema/mysql.sql), not in icingaweb2.
yes the topic can also be seen in this way, but the problem occurs in icingaweb2 and it can (also) be addressed in icingaweb2 – that’s why I recommended to open an icingaweb2 issue.
@nilmerg Please transfer.
The solution is a new index, I cannot see how a similar effect can be achieved with Icinga Web 2. Besides, the same change is done as part of https://github.com/Icinga/icingaweb2/pull/4231.
CREATE INDEX idx_servicegroup_object_id ON icinga_servicegroups (servicegroup_object_id);
@Yoda-BZH Feel free to open a PR.
Describe the bug
The page
/monitoring/list/servicegroups
can be very slow, to the point of not responding, due to missing indexes A clear and concise description of what the bug is.To Reproduce
Using:
I narrowed the slowness in the following sub query :
An explain of the query before:
Expected behavior
The query should be quick.
Screenshots
The solution
I added an index on icinga_servicegroups using the command:
The
explain extended
of the query with the index:The query computes now in :
Your Environment
Include as many relevant details about the environment you experienced the problem in
Version used (
icinga2 --version
): r2.13.1-1 (debian packages)Operating System and version: debian 11
Enabled features (
icinga2 feature list
): api checker graphite ido-mysql mainlog notificationIcinga Web 2 version and modules (System - About): 2.9.3 (c757a17530c326c7d6daebd6171486cb8167a8a1)
Config validation (
icinga2 daemon -C
): not relevantIf you run multiple Icinga 2 instances, the
zones.conf
file (oricinga2 object list --type Endpoint
andicinga2 object list --type Zone
) from all affected nodes: not relevant1 single master
7 satellites, with 3 in HA mode
Additional context
Add any other context about the problem here.