Skip to content

Commit 92ef868

Browse files
committed
add filter for cost queries
fixes #136 Signed-off-by: Markus Blaschke <[email protected]>
1 parent f923277 commit 92ef868

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

config/config_cost.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import (
44
"fmt"
55
"strings"
66
"time"
7+
8+
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement"
79
)
810

911
type (
@@ -23,6 +25,7 @@ type (
2325
TimeFrames []string `json:"timeFrames"`
2426
Dimensions []string `json:"dimensions"`
2527
ExportType string `json:"exportType"`
28+
Filter *armcostmanagement.QueryFilter `json:"filter"`
2629
Granularity string `json:"granularity"`
2730
ValueField string `json:"valueField"`
2831
Labels map[string]string `json:"labels"`

metrics_azurerm_costs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ func (m *MetricsCollectorAzureRmCosts) collectCostManagementMetrics(logger *slog
262262
},
263263
},
264264
Configuration: nil,
265-
Filter: nil,
265+
Filter: query.Filter,
266266
Granularity: &granularity,
267267
Grouping: queryGrouping,
268268
},

0 commit comments

Comments
 (0)