Class: Scalingo::Endpoint::Alerts

Inherits:
Collection show all
Defined in:
lib/scalingo/endpoint/alerts.rb

Overview

  • container_type: can be any container type of an application (e.g. web, clock…)

  • limit: Any float value. For any resource consumption, please provide 0.1 if you need to be alerted when the consumption goes above 10%.

  • metric: e.g. RPM per container, RAM consumption…

  • notifiers: list of notifier ID that will receive the alerts (optional)

  • send_when_below: will the alert be sent when the value goes above or below the limit (optional)

  • duration_before_trigger: the alert is triggered if the value is above the limit for the specified duration. Duration is expressed in nanoseconds. (optional)

  • remind_every: send the alert at regular interval when activated (optional)

Instance Attribute Summary

Attributes included from Base

#api, #auth_api, #prefix

Instance Method Summary collapse

Methods inherited from Collection

#all, #collection_name, #each, #find, #find_by, #resource_class

Methods included from Scalingo::Endpoint

included

Methods included from ClassMethods

#resources

Methods included from Base

#initialize

Instance Method Details

#create(params) ⇒ Object



11
12
13
# File 'lib/scalingo/endpoint/alerts.rb', line 11

def create(params)
  post(nil, alert: params)
end