Gracefully stop/restart/reload icinga2
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 2.2k
- Forks
- 616
- Avg merge
- 5d 6h
- Merged PRs (30d)
- 10
Description
Is your feature request related to a problem? Please describe.
Sometimes it is necessary to stop or restart/reload icinga2 (configuration changes, OS updates, crashes caused by communication problemes between icinga2 nodes,...), these are usualy triggered by Director or on CLI.
This will kills all currently running processes with signal 15 (SIGTERM): checks, notifications and icinga itself.
It seems that killed checks and notifications are marked as timed out and this state is stored persistant (internal and in IDO?).
After a restart all this hardly interupted checks are shown as UNKNOWN and you have to wait for the next regular scheduled check to gain a "real" status. This sometimes leads to confusing states and dashboards with hundreds of apparent of problems.
Describe the solution you'd like
Implement a graceful shutdown of running check and notification scripts by waiting a (configurable) time for completion, prevent starting new scripts by disabling the scheduler.
Describe alternatives you've considered
Do not store state information of hardly killed scripts during shutdown process.
Additional context
Medium to large deployment with (redundant) satellites, systems running latest releases on Linux OS.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start by tracing the shutdown path alongside scheduler, check, and notification execution, then review how interrupted work is persisted across restart. Done means the proposed configurable graceful-stop behavior is implemented and its effects on interrupted checks and notifications are verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend, distributed-systems, observability-sre
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100