Skip to main content

Hello,

We monitor our Centreon database with centreon mysql plugin and we have a lot of slow queries like this :

SELECT SQL_CALC_FOUND_ROWS DISTINCT

            resources.resource_id,

            resources.name,

            resources.alias,

            resources.address,

            resources.id,

            resources.internal_id,

            resources.parent_id,

            resources.parent_name,

            parent_resource.status AS `parent_status`,

            parent_resource.alias AS `parent_alias`,

            parent_resource.status_ordered AS `parent_status_ordered`,

            parent_resource.address AS `parent_fqdn`,

            severities.id AS `severity_id`,

            severities.level AS `severity_level`,

            severities.name AS `severity_name`,

            severities.type AS `severity_type`,

            severities.icon_id AS `severity_icon_id`,

            resources.type,

            resources.status,

            resources.status_ordered,

            resources.status_confirmed,

            resources.in_downtime,

            resources.acknowledged,

            resources.passive_checks_enabled,

            resources.active_checks_enabled,

            resources.notifications_enabled,

            resources.last_check,

            resources.last_status_change,

            resources.check_attempts,

            resources.max_check_attempts,

            resources.notes,

            resources.notes_url,

            resources.action_url,

            resources.output,

            resources.poller_id,

            resources.has_graph,

            instances.name AS `monitoring_server_name`,

            resources.enabled,

            resources.icon_id,

            resources.severity_id

        FROM `centreon_storage`.`resources`

        LEFT JOIN `centreon_storage`.`resources` parent_resource

            ON parent_resource.id = resources.parent_id

            AND parent_resource.type = 1 LEFT JOIN `centreon_storage`.`severities`

            ON `severities`.severity_id = `resources`.severity_id

        LEFT JOIN `centreon_storage`.`resources_tags` AS rtags

            ON `rtags`.resource_id = `resources`.resource_id

        INNER JOIN `centreon_storage`.`instances`

            ON `instances`.instance_id = `resources`.poller_id WHERE (CASE WHEN resources.type = 1 THEN resources.name ELSE resources.parent_name END REGEXP 'saspdapp01' OR parent_resource.alias REGEXP 'saspdapp01' OR parent_resource.address REGEXP 'saspdapp01' OR resources.type IN (0,2) AND resources.name REGEXP 'saspdapp01' OR resources.name REGEXP 'saspdapp01' OR resources.alias REGEXP 'saspdapp01' OR resources.parent_name REGEXP 'saspdapp01' OR parent_resource.alias REGEXP 'saspdapp01' OR resources.address REGEXP 'saspdapp01' OR resources.output REGEXP 'saspdapp01') AND  resources.name NOT LIKE '\_Module\_%'

            AND resources.parent_name NOT LIKE '\_Module\_BAM%'

            AND resources.enabled = 1 AND resources.type != 3 ORDER BY resources.last_status_change IS NULL, resources.last_status_change DESC LIMIT 0, 100

Could you please help me to identify why these kinds of requests are made ?

Regards,

Be the first to reply!

Reply