bin/metrics-rds.rb in sensu-plugins-aws-11.5.1 vs bin/metrics-rds.rb in sensu-plugins-aws-11.6.0

- old
+ new

@@ -55,10 +55,17 @@ long: '--end-time TIME', default: Time.now, proc: proc { |a| Time.parse a }, description: 'CloudWatch metric statistics end time' + option :fetch_age, + description: 'How long ago to fetch metrics from', + short: '-f AGE', + long: '--fetch-age', + default: 0, + proc: proc(&:to_i) + option :period, short: '-p N', long: '--period SECONDS', default: 60, proc: proc(&:to_i), @@ -93,11 +100,11 @@ { name: 'DBInstanceIdentifier', value: value } ], - start_time: config[:end_time] - config[:period], - end_time: config[:end_time], + start_time: config[:end_time] - config[:fetch_age] - config[:period], + end_time: config[:end_time] - config[:fetch_age], statistics: [config[:statistics].to_s.capitalize], period: config[:period] ) end