Skip to content

Sensors fixes for state, restart configurations, death trigger emit - #6404

Open
guzzijones wants to merge 7 commits into
masterfrom
sensors_fixes
Open

Sensors fixes for state, restart configurations, death trigger emit#6404
guzzijones wants to merge 7 commits into
masterfrom
sensors_fixes

Conversation

@guzzijones

Copy link
Copy Markdown
Contributor
  • Added a new internal core.st2.sensor.process_abandoned trigger which is emitted when the sensor
    container permanently gives up on a sensor after exceeding the maximum number of respawn attempts.
    This lets users define their own alerting (email, Slack, workflow, etc.) via a rule instead of a
    sensor failing silently.
  • Added a SensorInstanceDB collection tracking each sensor's runtime health (status, hostname, pid,
    exit code, respawn count, last updated). The health fields are merged into the /v1/sensors API
    response and shown by st2 sensor list / st2 sensor get, and can be filtered with
    st2 sensor list --status=abandoned.
  • Added [sensorcontainer].max_respawn_count, [sensorcontainer].respawn_delay and
    [sensorcontainer].respawn_backoff_factor config options to control how many times a crashed
    sensor is respawned before being abandoned and how long to wait between attempts. The backoff
    factor defaults to 1 (a constant respawn_delay between attempts); a value greater than 1
    grows the delay exponentially.

@pull-request-size pull-request-size Bot added the size/XL PR that changes 500-999 lines. Consider splitting work into several ones that easier to review. label Aug 31, 2026
@pull-request-size pull-request-size Bot added size/XXL PR that changes 1000+ lines. You should absolutely split your PR into several. and removed size/XL PR that changes 500-999 lines. Consider splitting work into several ones that easier to review. labels Aug 31, 2026
@guzzijones guzzijones added this to the 3.11.0 milestone Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XXL PR that changes 1000+ lines. You should absolutely split your PR into several.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants