class Object

Public Instance Methods

create_check() click to toggle source
# File lib/pingdominator/built-in.rb, line 32
def create_check
  capture(
    "curl", "--request", "POST", "--silent",
    "--header", "\"App-Key: #{fetch(:pingdom_appkey)}\"",
    "--user", "\"#{fetch(:pingdom_userpass)}\"",
    "\"#{fetch(:pingdom_api_root)}/checks" +
    "?name=#{host}" +
    "&url=#{fetch(:pingdom_check_path)}" +
    "&alert_policy=#{fetch(:pingdom_alert_policy_id)}" +
    "&type=#{fetch(:pingdom_check_type)}" +
    "&host=#{host}" +
    "&encryption=#{fetch(:pingdom_check_https).to_s}" +
    "&resolution=#{fetch(:pingdom_check_interval)}\""
  )
end
delete_check(id) click to toggle source
# File lib/pingdominator/built-in.rb, line 23
def delete_check(id)
  capture(
    "curl", "--request", "DELETE", "--silent",
    "--header", "\"App-Key: #{fetch(:pingdom_appkey)}\"",
    "--user", "\"#{fetch(:pingdom_userpass)}\"",
    "\"#{fetch(:pingdom_api_root)}/checks/#{id.to_s}\""
  )
end
list_check(id) click to toggle source
# File lib/pingdominator/built-in.rb, line 14
def list_check(id)
  capture(
    "curl", "--request", "GET", "--silent",
    "--header", "\"App-Key: #{fetch(:pingdom_appkey)}\"",
    "--user", "\"#{fetch(:pingdom_userpass)}\"",
    "\"#{fetch(:pingdom_api_root)}/checks/#{id.to_s}\""
  )
end
list_checks() click to toggle source
# File lib/pingdominator/built-in.rb, line 5
def list_checks
  capture(
    "curl", "--request", "GET", "--silent",
    "--header", "\"App-Key: #{fetch(:pingdom_appkey)}\"",
    "--user", "\"#{fetch(:pingdom_userpass)}\"",
    "\"#{fetch(:pingdom_api_root)}/checks\""
  )
end