211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
|
# File 'lib/perus/pinger/pinger.rb', line 211
def send_response
payload = {}
add_to_payload(payload, 'metrics', @metric_results)
add_to_payload(payload, 'actions', @action_results)
@metric_errors.reject! {|metric, errors| errors.empty?}
add_to_payload(payload, 'metric_errors', @metric_errors)
pinger_path = URI("systems/#{@system_id}/ping")
pinger_url = (@server_uri + pinger_path).to_s
begin
RestClient.post(pinger_url, payload)
rescue => e
puts 'Ping failed with exception'
puts format_exception(e)
end
end
|