Class: ProxyAPI::Monitoring
- Inherits:
-
Resource
- Object
- Resource
- ProxyAPI::Monitoring
- Defined in:
- app/lib/proxy_api/monitoring.rb
Instance Method Summary collapse
- #create_host_downtime(host, args = {}) ⇒ Object
-
#initialize(args) ⇒ Monitoring
constructor
A new instance of Monitoring.
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 |