Icinga / Icinga/icinga2

Different perfdata at same time

Open
#9,405 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Describe the bug

I noticed that in the output of PerfdataWriter I sometimes have two different perfdata-values for the same host at the same second:

DATATYPE::HOSTPERFDATA	TIMET::1655526958	HOSTNAME::DC	HOSTPERFDATA::rta=0.160ms;1000.000;2000.000;0; pl=0%;25;45;; rtmax=0.287ms;;;; rtmin=0.122ms;;;;	HOSTCHECKCOMMAND::icmp	HOSTSTATE::UP	HOSTSTATETYPE::HARD
DATATYPE::HOSTPERFDATA	TIMET::1655526958	HOSTNAME::DC	HOSTPERFDATA::rta=0.153ms;1000.000;2000.000;0; pl=0%;25;45;; rtmax=0.211ms;;;; rtmin=0.113ms;;;;	HOSTCHECKCOMMAND::icmp	HOSTSTATE::UP	HOSTSTATETYPE::HARD

How can this happen?
These checks are supposed to run once a minute...

To Reproduce

I dont know how to trigger it.
It happens sometimes, but apparently only with host-checks (so far).

Expected behavior

Output perfdata only as often as the check runs.

Your Environment

  • Version used (icinga2 --version): 2.13.3-1
  • Operating System and version: Ubuntu 22.04
  • Enabled features (icinga2 feature list): api checker ido-mysql mainlog notification perfdata

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 by tracing PerfdataWriter and the host-check scheduling path, using the two HOSTPERFDATA records and the Icinga 2.13.3 environment as the reproduction context. Determine why a host can emit different perfdata at the same timestamp; done means the output is emitted only as often as the check runs, with a regression test covering the behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
observability-sre
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.