Skip to content

Add Advisor Cost impacted resource type count metric #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
metric_id: metric-azure-advisor-cost-saving
name: Cost Savings Recommendation
name: Cost Saving Recommendation
metric_type: GAUGE
resource_type: inventory.CloudService:azure.Advisor.Cost
query_options:
Expand All @@ -17,6 +17,8 @@ query_options:
default: true
- key: data.subscription_id
name: Subscription ID
- key: data.impacted_field
name: Impacted Resource Type
- key: data.impacted_value_display
name: Impacted Resource Name
- key: data.extended_properties.term
Expand All @@ -30,5 +32,5 @@ query_options:
key: data.potential_yearly_savings_based_on_retail_pricing_display
operator: sum
unit: USD
namespace_id: ns-azure-advisor-recommendations
namespace_id: ns-azure-advisor-cost
version: '1.1'
4 changes: 3 additions & 1 deletion src/plugin/metrics/Advisor/cost/recommendation_count.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ query_options:
default: true
- key: data.subscription_id
name: Subscription ID
- key: data.impacted_field
name: Impacted Resource Type
- key: data.impacted_value_display
name: Impacted Resource Name
- key: data.extended_properties.term
Expand All @@ -29,5 +31,5 @@ query_options:
value:
operator: count
unit: Count
namespace_id: ns-azure-advisor-recommendations
namespace_id: ns-azure-advisor-cost
version: '1.2'
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
metric_id: metric-azure-advisor-cost-saving
name: Cost Recommendation Impacted Resource Type Count
metric_type: GAUGE
resource_type: inventory.CloudService:azure.Advisor.Cost
query_options:
group_by:
- key: data.impact
name: Impact
default: true
- key: data.category
name: Category
- key: data.tenant_id
name: Tenant ID
- key: data.subscription_name
name: Subscription Name
default: true
- key: data.subscription_id
name: Subscription ID
- key: data.impacted_field
name: Impacted Resource Type
- key: data.impacted_value_display
name: Impacted Resource Name
- key: data.extended_properties.term
name: Term
default: true
- key: data.extended_properties.lookbackPeriod
name: Look-back period (days)
default: true
fields:
value:
key: data.impacted_field
operator: count
unit: Count
namespace_id: ns-azure-advisor-cost
version: '1.0'
Loading