+ use metric-namespace correctly

Fix https://github.com/centreon/centreon-plugins/issues/2719
This commit is contained in:
Simon Bomm 2021-04-19 14:38:40 +02:00 committed by GitHub
parent ea7a46eb47
commit b80a25b8f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -154,11 +154,12 @@ sub azure_get_metrics_set_cmd {
return if (defined($self->{option_results}->{command_options}) && $self->{option_results}->{command_options} ne '');
my $cmd_options = "monitor metrics list --metrics '" . join('\' \'', @{$options{metrics}}) . "' --namespace $options{metric_namespace} --start-time $options{start_time} --end-time $options{end_time} " .
my $cmd_options = "monitor metrics list --metrics '" . join('\' \'', @{$options{metrics}}) . "' --start-time $options{start_time} --end-time $options{end_time} " .
"--interval $options{interval} --aggregation '" . join('\' \'', @{$options{aggregations}}) . "' --only-show-errors --output json --resource '$options{resource}' " .
"--resource-group '$options{resource_group}' --resource-type '$options{resource_type}' --resource-namespace '$options{resource_namespace}'";
$cmd_options .= " --subscription '$self->{subscription}'" if (defined($self->{subscription}) && $self->{subscription} ne '');
$cmd_options .= " --filter '$options{dimension}'" if defined($options{dimension});
$cmd_options .= " --namespace '$options{metric_namespace}'" if defined($options{metric_namespace});
return $cmd_options;
}