From f74bf00cd7eac54043d9de8b2cd8cf071d21c333 Mon Sep 17 00:00:00 2001 From: Chuan Miao Date: Mon, 16 Dec 2024 13:57:26 +0100 Subject: [PATCH] Use netapp harvester metrics As part of netapp exporter migration, new metrics will be provided by netapp harvest exporter. --- internal/liquids/manila/liquid.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/internal/liquids/manila/liquid.go b/internal/liquids/manila/liquid.go index 67f2d3e9..c2843d15 100644 --- a/internal/liquids/manila/liquid.go +++ b/internal/liquids/manila/liquid.go @@ -215,11 +215,10 @@ const ( snapshotCapacityQuery = `sum by (availability_zone_name, project_id, share_type_id) (max by (availability_zone_name, id, project_id, share_id, share_type_id) (last_over_time(openstack_manila_snapshot_size_gauge[15m])))` // queries for netapp-exporter metrics - sharePhysicalUsageQuery = `sum by (availability_zone, project_id, share_type) (max by (availability_zone, project_id, share_id, share_type) (last_over_time(netapp_volume_used_bytes {project_id!="",share_type!="",volume_type!="dp",volume_state="online"}[15m])))` - snapshotPhysicalUsageQuery = `sum by (availability_zone, project_id, share_type) (max by (availability_zone, project_id, share_id, share_type) (last_over_time(netapp_volume_snapshot_used_bytes{project_id!="",share_type!="",volume_type!="dp",volume_state="online"}[15m])))` - snapmirrorUsageQuery = `sum by (availability_zone, project_id, share_type) (max by (availability_zone, project_id, share_id, share_type) (last_over_time(netapp_volume_total_bytes {project_id!="",share_type!="",volume_type!="dp",volume_state="online",snapshot_policy="EC2_Backups"}[15m])))` - snapmirrorPhysicalUsageQuery = `sum by (availability_zone, project_id, share_type) (max by (availability_zone, project_id, share_id, share_type) (last_over_time(netapp_volume_used_bytes {project_id!="",share_type!="",volume_type!="dp",volume_state="online",snapshot_policy="EC2_Backups"}[15m])))` -) + sharePhysicalUsageQuery = `sum by (project_id, availability_zone, share_type) (max by (availability_zone, project_id, share_id, share_type) (last_over_time(netapp_volume_size_used{app="netapp-harvest-exporter-manila"}[15m]) * on(app, volume) group_left() max by (app, volume) (netapp_volume_labels{project_id!="",share_type!="",volume_type!="dp",state="online"})))` + snapshotPhysicalUsageQuery = `sum by (project_id, availability_zone, share_type) (max by (availability_zone, project_id, share_id, share_type) (last_over_time(netapp_volume_snapshots_size_used{app="netapp-harvest-exporter-manila"}[15m]) * on(app, volume) group_left() max by (app, volume) (netapp_volume_labels{project_id!="",share_type!="",volume_type!="dp",state="online"})))` + snapmirrorUsageQuery = `sum by (project_id, availability_zone, share_type) (max by (availability_zone, project_id, share_id, share_type) (last_over_time(netapp_volume_size_total{app="netapp-harvest-exporter-manila"}[15m]) * on(app, volume) group_left() max by (app, volume) (netapp_volume_labels{project_id!="",share_type!="",volume_type!="dp",state="online",snapshot_policy="EC2_Backups"})))` + snapmirrorPhysicalUsageQuery = `sum by (project_id, availability_zone, share_type) (max by (availability_zone, project_id, share_id, share_type) (last_over_time(netapp_volume_size_used{app="netapp-harvest-exporter-manila"}[15m]) * on(app, volume) group_left() max by (app, volume) (netapp_volume_labels{project_id!="",share_type!="",volume_type!="dp",state="online",snapshot_policy="EC2_Backups"})))` type azMetricsKey struct { AvailabilityZone liquid.AvailabilityZone