Icinga / Icinga/icinga2

Incorrect documentation for volatile hosts/services

Open
#9,254 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/checks area/documentation
Dominant language
C++
Stars
2.2k
Forks
616
Avg merge
5d 6h
Merged PRs (30d)
10

Description

Quote from the current documentation:

The volatile option, if enabled for a host or service, makes it treat every state change as a HARD state change. It is comparable to max_check_attempts = 1. With this any NOT-OK result will ignore max_check_attempts and trigger notifications etc.

However, this does not reflect the current behavior of the code:
https://github.com/Icinga/icinga2/blob/db321b9fcb659b19fbf2488da0050edd0fd92d53/lib/icinga/checkable-check.cpp#L309-L311

When we discussed this in the team some time ago, we said that it's probably better to document the current behavior because

  1. this obviously does not change any behavior.
  2. if we changed the implementation to force max_check_attemps = 1 when volatile = true, it would no longer be possible to get the current behavior of max_check_attempts > 1 and volatile = true.

Documenting the current behavior of course means going through the code and figuring out exactly what it does. Maybe the result of that is that one can argue, that the current behavior makes no sense at all, but you know.

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

Start with doc/08-advanced-topics.md and the linked section on volatile services and hosts. Read lib/icinga/checkable-check.cpp around lines 309-311, then trace the related state-handling behavior to determine what the documentation should say. Done means the documentation accurately describes the current behavior, including the interaction with max_check_attempts.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.