The time to live (TTL) in seconds until check Events are considered stale. If an Agent stops publishing Events for the check, and the TTL expires, an Event will be created for the Agent Entity. Check TTLs are optional.
should validate that the TTL is greater than the check interval on creation
should fail (create an event with status = 1) if the time since the last check result is greater than the TTL
Check TTLs in 1.x do not validate against interval or timeout. In v2, they should return an error if the TTL is less time than the interval unless they are set to a default value (a default value would be -1 or 0).
The meat of this work will be to implement a keepalive for check results within eventd. We'll need to create a process to keep tabs on stale check result events that have a TTL, and to create a failing event if we haven't received a new check result within the given TTL time.
Sensu 1.x provides Check TTL.
The time to live (TTL) in seconds until check Events are considered stale. If an Agent stops publishing Events for the check, and the TTL expires, an Event will be created for the Agent Entity. Check TTLs are optional.
1.x docs https://sensuapp.org/docs/1.1/reference/checks.html#check-attributes
1.x code https://github.com/sensu/sensu/blob/b32a0c1a88cf8f6f1b377ababcc8d5804a8698a6/lib/sensu/server/process.rb#L1154-L1235
1.x tests https://github.com/sensu/sensu/blob/b32a0c1a88cf8f6f1b377ababcc8d5804a8698a6/spec/server/process_spec.rb#L875-L922