lib/newrelic-management/manager.rb
def remove_nonreporting_servers(keeptime = nil)
      list_nonreporting_servers.each do |server|
        next if keeptime && Time.parse(server[:last_reported_at]) >= Time.now - ChronicDuration.parse(keeptime)
        Notifier.msg(server[:name], 'Removing Stale, Non-Reporting Server')
        Client.delete_server(server[:id])
      end
    end
def remove_nonreporting_servers(keeptime = nil)
      list_nonreporting_servers.each do |server|
        next if keeptime && Time.parse(server[:last_reported_at]) >= Time.now - ChronicDuration.parse(keeptime)
        Notifier.msg(server[:name], 'Removing Stale, Non-Reporting Server')
        Client.delete_server(server[:id])
      end
    end
def remove_nonreporting_servers ( keeptime = nil ) list_nonreporting_servers . each do | server | next if keeptime && Time . parse ( server [ :last_reported_at ] ) >= Time . now - ChronicDuration . parse ( keeptime ) Notifier . msg ( server [ :name ] , 'Removing Stale, Non-Reporting Server' ) Client . delete_server ( server [ :id ] ) end end
=> Remove Non-Reporting Servers
= > Remove Non - Reporting Servers