Sha256: ef3f4fae4163b149de45d78aea0a2512346598dfc08888f3d4b69b6156a1236d
Contents?: true
Size: 777 Bytes
Versions: 12
Compression:
Stored size: 777 Bytes
Contents
require 'opsicle/instances' module Opsicle module Monitor module Spy class Instances include Spy::Dataspyable def initialize @instances = Opsicle::Instances.new(Opsicle::Monitor::App.client) refresh end def refresh h = [] @instances.data.each do |instance| # Massage the API data for our uses h << { :ec2_instance_id => instance[:ec2_instance_id], :hostname => instance[:hostname], :status => instance[:status], :zone => instance[:availability_zone], :ip => instance[:elastic_ip] || instance[:public_ip] } end @data = h end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems