diff --git a/apps/centreon/local/mode/metaservice.pm b/apps/centreon/local/mode/metaservice.pm index d67614351..e44290f8a 100644 --- a/apps/centreon/local/mode/metaservice.pm +++ b/apps/centreon/local/mode/metaservice.pm @@ -75,7 +75,7 @@ sub select_by_regexp { my $count = 0; my $stmt = $self->execute_query($self->{centreon_db_centstorage}, - "SELECT metrics.metric_id, metrics.metric_name, metrics.current_value FROM index_data, metrics WHERE index_data.service_description LIKE " . $self->{centreon_db_centstorage}->quote($options{regexp_str}) . " AND index.id = metrics.index_id"); + "SELECT metrics.metric_id, metrics.metric_name, metrics.current_value FROM index_data, metrics WHERE index_data.service_description LIKE " . $self->{centreon_db_centstorage}->quote($options{regexp_str}) . " AND index_data.id = metrics.index_id"); while ((my $row = $stmt->fetchrow_hashref())) { if ($options{metric_select} eq $row->{metric_name}) { $self->{metric_selected}->{$row->{metric_id}} = $row->{current_value};