Class: ProxyAPI::Monitoring

Inherits:
Resource
  • Object
show all
Defined in:
app/lib/proxy_api/monitoring.rb

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Monitoring

Returns a new instance of Monitoring.



3
4
5
6
# File 'app/lib/proxy_api/monitoring.rb', line 3

def initialize(args)
  @url = args[:url] + '/monitoring'
  super args
end

Instance Method Details

#create_host_downtime(host, args = {}) ⇒ Object



8
9
10
11
12
# File 'app/lib/proxy_api/monitoring.rb', line 8

def create_host_downtime(host, args = {})
  parse(post(args, "downtime/host/#{host}"))
rescue => e
  raise ProxyException.new(url, e, N_('Unable to set downtime for %s') % host)
end