[icinga-checkins] icinga.org: icinga-core/dev/cgis: core: handle passive checks via external commands the same way as active checks, bypassing the temp check result file and reaper (Andreas Ericsson) #2687

git at icinga.org git at icinga.org
Wed Aug 1 03:00:26 CEST 2012


Module: icinga-core
Branch: dev/cgis
Commit: c88939b2207baac8c2ee7a47f14a0ea48162aeae
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=c88939b2207baac8c2ee7a47f14a0ea48162aeae

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Fri Jul  6 15:18:28 2012 +0200

core: handle passive checks via external commands the same way as active checks, bypassing the temp check result file and reaper (Andreas Ericsson) #2687

basically, what happens now:

- passive check is sent via external command
- passive check handler stashes the newly allocated passive check results
  onto a doubly linked list
- once in a while, the passive check result list is being dumped onto disk
  into the temporary check results directory
- the check result reaper is being run, and reading those passive check
  results as well
- calling the check result handlers

the patch changes that to:

- passive check is sent via external command
- passive check is treated as "active" check result
  - set check_time to start and end
  - set exited_ok = 1
- pass the check result directly to check result handlers in memory

so it does not use the way around the core, being put into the check
results dir waiting for being reaped.
since this can be a huge performance improvement in regards of passing
passive check results to the core, it needs to be profiled, how much
impact it will be passing it directly to check handlers instead of
pushing to a list only.

plus, memory fragmention on the core will decrease by removing another
linked list from memory, as well as open file descriptors from the
temporary check result files on disk for the reaper.

requires extensive testing and profiling on performance issues.

refs #2687

---

 Changelog          |    1 +
 base/commands.c    |  217 ++++++++++++---------------------------------------
 include/icinga.h   |   13 ---
 t-tap/test-stubs.c |    1 -
 4 files changed, 52 insertions(+), 180 deletions(-)

Diff:   https://git.icinga.org/?p=icinga-core.git;a=commitdiff;h=c88939b2207baac8c2ee7a47f14a0ea48162aeae




More information about the icinga-checkins mailing list