class DogapiDemo::V1::ServiceCheckService

Constants

API_VERSION

Public Instance Methods

service_check(check, host, status, options = {}) click to toggle source
   # File lib/dogapi-demo/v1/service_check.rb
10 def service_check(check, host, status, options = {})
11   begin
12     params = {
13       :api_key => @api_key,
14       :application_key => @application_key
15     }
16 
17     body = {
18       'check' => check,
19       'host_name' => host,
20       'status' => status
21     }.merge options
22 
23     request(Net::HTTP::Post, "/api/#{API_VERSION}/check_run", params, body, true)
24   rescue Exception => e
25     suppress_error_if_silent e
26   end
27 end