Skip to content

Commit c15eb3c

Browse files
committed
fix baseurl for compliance report
Signed-off-by: Markus Blaschke <[email protected]>
1 parent b392b6f commit c15eb3c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

metrics_azurerm_security.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func (m *MetricsCollectorAzureRmSecurity) Collect(ctx context.Context, logger *l
7171

7272
func (m *MetricsCollectorAzureRmSecurity) collectAzureSecurityCompliance(ctx context.Context, logger *log.Entry, callback chan<- func(), subscription subscriptions.Subscription, location string) {
7373
subscriptionResourceId := fmt.Sprintf("/subscriptions/%v", *subscription.SubscriptionID)
74-
client := security.NewCompliancesClientWithBaseURI(subscriptionResourceId, location, azureEnvironment.ResourceManagerEndpoint)
74+
client := security.NewCompliancesClientWithBaseURI(azureEnvironment.ResourceManagerEndpoint, subscriptionResourceId, location)
7575
client.Authorizer = AzureAuthorizer
7676
client.ResponseInspector = azureResponseInspector(&subscription)
7777

@@ -87,7 +87,7 @@ func (m *MetricsCollectorAzureRmSecurity) collectAzureSecurityCompliance(ctx con
8787
for _, result := range *complienceResult.AssessmentResult {
8888
infoLabels := prometheus.Labels{
8989
"subscriptionID": to.String(subscription.SubscriptionID),
90-
"location" : location,
90+
"location": location,
9191
"assessmentType": to.String(result.SegmentType),
9292
}
9393
infoMetric.Add(infoLabels, to.Float64(result.Percentage))

0 commit comments

Comments
 (0)