This commit is contained in:
garnier-quentin 2021-04-19 17:27:02 +02:00
commit 4ebb725f52
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 ''); 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}' " . "--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}'"; "--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 .= " --subscription '$self->{subscription}'" if (defined($self->{subscription}) && $self->{subscription} ne '');
$cmd_options .= " --filter '$options{dimension}'" if defined($options{dimension}); $cmd_options .= " --filter '$options{dimension}'" if defined($options{dimension});
$cmd_options .= " --namespace '$options{metric_namespace}'" if defined($options{metric_namespace});
return $cmd_options; return $cmd_options;
} }