Merge pull request #544 from Moujimouja/patch-2

Fix meta service wrong SQL join
This commit is contained in:
qgarnier 2016-11-24 19:01:35 +01:00 committed by GitHub
commit dfe3d2932e
1 changed files with 1 additions and 1 deletions

View File

@ -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};