Top Level Namespace
Defined Under Namespace
Modules: Capistrano
Instance Method Summary collapse
Instance Method Details
#create_check ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# 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) ⇒ Object
23 24 25 26 27 28 29 30 |
# 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) ⇒ Object
14 15 16 17 18 19 20 21 |
# 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 ⇒ Object
5 6 7 8 9 10 11 12 |
# 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 |