Skip to content

Commit

Permalink
Use netapp harvester metrics
Browse files Browse the repository at this point in the history
As part of netapp exporter migration, new metrics will be provided by
netapp harvest exporter.
  • Loading branch information
chuan137 committed Dec 16, 2024
1 parent 8284712 commit f74bf00
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions internal/liquids/manila/liquid.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Check failure on line 223 in internal/liquids/manila/liquid.go

View workflow job for this annotation

GitHub Actions / Checks

syntax error: unexpected type, expected name

Check failure on line 223 in internal/liquids/manila/liquid.go

View workflow job for this annotation

GitHub Actions / Checks

expected 'IDENT', found 'type' (typecheck)

Check failure on line 223 in internal/liquids/manila/liquid.go

View workflow job for this annotation

GitHub Actions / CodeQL

syntax error: unexpected type, expected name

Check failure on line 223 in internal/liquids/manila/liquid.go

View workflow job for this annotation

GitHub Actions / Build

syntax error: unexpected type, expected name
AvailabilityZone liquid.AvailabilityZone
Expand Down

0 comments on commit f74bf00

Please sign in to comment.