Merge pull request #544 from Moujimouja/patch-2
Fix meta service wrong SQL join
This commit is contained in:
commit
dfe3d2932e
|
@ -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};
|
||||
|
|
Loading…
Reference in New Issue