Skip to content

Instantly share code, notes, and snippets.

@ashayh
Created March 2, 2015 03:43
Show Gist options
  • Select an option

  • Save ashayh/770ee8390578cbc6be8f to your computer and use it in GitHub Desktop.

Select an option

Save ashayh/770ee8390578cbc6be8f to your computer and use it in GitHub Desktop.
ruby fog script
cat list_aws_events.rb
require 'fog' # gem install fog
aws = Fog::Compute::AWS.new
status = aws.describe_instance_status.body["instanceStatusSet"]
events = {}
status.each do |st|
if st["eventsSet"].size > 0
events[st["instanceId"]] = st["eventsSet"]
end
end
# ToDo: show further information per event.
pp events
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment