mafernando / Git-Example

MIT License
1 stars 0 forks source link

Sensu Alert Params Markup #4

Open mafernando opened 9 years ago

mafernando commented 9 years ago

TODO: Determine logic to map services from Sensu to their corresponding order items is necessary atm

Mapping Sensu to Alerts

Alerts Sensu Note
id auto-populated api should look this up when this route is hit
project_id host/port/service api should be able to map host/port/service => project_id
order_item_id host/port/service api should be able to map host/port/service => order_item_id
staff_id sensu or system staff? either we use staff_id => 0 to indicate system generated alerts or create new staff specifically for posting alerts from Sensu
status status nothing to do
message message nothing to do
start_date ASAP TBD
end_date NONE TBD
created_at created_at nothing to do
updated_at updated_at nothing to do

POST Params for Sensu Alerts

Attribute Description
host name of host service is on
port port that the service is accessible on the host from
service name of the service
status [OK, WARNING, CRITICAL, UNKNOWN, PENDING] => defined here
message message accompanying alert
event addl string that can be passed back

Alerts Schema

Attribute Description
id auto-incremented unique key
project_id id of project this alert is associated with
order_item_id id of order item (a.k.a. service) associated with alert
staff_id id of staff who posted this alert
status [OK, WARNING, CRITICAL, UNKNOWN, PENDING] => defined here
message alert message
start_date when the alert is scheduled to begin appearing
end_date when the alert should stop appearing
created_at when the alert was created
updated_at when the alert as last updated