Sha256: b866193a0db8bc42efcaeab2a84bb842bea444237e71f7e690a829f5cd545a3f

Contents?: true

Size: 676 Bytes

Versions: 1

Compression:

Stored size: 676 Bytes

Contents

class Sysdig::UpdateAlert < Sysdig::Request
  def real(alert_id, alert)
    #{"alert":{"version":7,"createdOn":1438965688000,"modifiedOn":1442349562000,"name":"Memory usage critical","description":"Memory utilization is currently >= 98%","enabled":false,"filter":null,"type":"MANUAL","condition":"timeAvg(memory.used.percent) >= 98","timespan":60000000,"severity":2,"notify":["SNS"],"segmentBy":["agent.tag.id"],"segmentCondition":{"type":"ANY"}}}
    # @todo alert[version] might mean lock version which should be fun
    service.request(
      :method => :put,
      :path   => File.join("/api/alerts", alert_id.to_s),
      :body   => { "alert" => alert },
    )
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sysdig-0.1.0 lib/sysdig/update_alert.rb