Icinga / Icinga/icinga2

Gracefully stop/restart/reload icinga2

Open
#9,286 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/checks good first issue
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.