Class: SensuPluginsAzureRM::Common

Inherits:
Object
  • Object
show all
Defined in:
lib/sensu-plugins-azurerm/common.rb

Instance Method Summary collapse

Instance Method Details

#retrieve_usage_stats(client, location, name) ⇒ Object



3
4
5
6
7
8
# File 'lib/sensu-plugins-azurerm/common.rb', line 3

def retrieve_usage_stats(client, location, name)
  usage_statistics = client.list(location)

  filtered_statistics = usage_statistics.select { |stat| stat.name.value == name }
  filtered_statistics[0]
end