Class: ClearSkies::AWS::CloudWatch::Billing

Inherits:
Gauge
  • Object
show all
Defined in:
lib/clear_skies/aws/cloud_watch/billing.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Gauge

#aws_metrics, #labels_from_metric, #metrics, register

Constructor Details

#initialize(dimension, statistics, description: nil, &block) ⇒ Billing

Returns a new instance of Billing.



5
6
7
# File 'lib/clear_skies/aws/cloud_watch/billing.rb', line 5

def initialize(dimension, statistics, description: nil, &block)
  super("AWS/Billing", "EstimatedCharges", dimension, statistics, description: description, aws_parameters: {start_time: {days: -1}, end_time: {minutes: -5}, period: 60*60*24}, &block)
end

Class Method Details

.cloudwatch_clientObject



10
11
12
# File 'lib/clear_skies/aws/cloud_watch/billing.rb', line 10

def self.cloudwatch_client
  @client ||= Aws::CloudWatch::Client.new(region: "us-east-1")
end