71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
# File 'lib/watch_list/driver.rb', line 71
def edit_monitor(monitor_id, monitor_name, attrs, exist_alert_contacts)
updated = false
log(:info, "Update Monitor: #{monitor_name}", :color => :green)
attrs.each do |key, value|
log(:info, " set #{key}=#{value}", :color => :green)
end
unless @options[:dry_run]
params = monitor_to_params(attrs, exist_alert_contacts)
params[:monitorID] = monitor_id
@uptimerobot.editMonitor(params)
updated = true
end
updated
end
|