Commit Graph

119 Commits

Author SHA1 Message Date
Alexander A. Klimov 4585a404d6 Checkable#ExecuteCheck(): set #last_check_started to now before #UpdateNextCheck()
refs #7888
2020-07-28 11:54:13 +02:00
Noah Hilverling 4c9e4959f3
Merge pull request #7823 from Icinga/bugfix/unify-application-start-times
Fix timing point for Application::GetStartTime() (related to command endpoint grace period)
2020-03-09 09:45:57 +01:00
Noah Hilverling 8f061ae80e Fix OnHostProblemChanged signal 2020-03-04 10:55:07 +01:00
Michael Friedrich 8e62fc8efb Fix 'check_timeout' not being forwarded to agent command endpoints
fixes #6992
2020-02-27 11:46:52 +01:00
Michael Friedrich d53eb34520 Unify Application::GetStartTime() and drop GetMainTime()
This essentially moves the start time into the scope when main
starts to "do something", after the reload and configuration handling
is done.
2020-02-11 17:26:15 +01:00
Noah Hilverling 71ef1de964
Merge pull request #7667 from Icinga/feature/icingadb-acks-history
IcingaDB: populate icinga:history:stream:acknowledgement
2019-12-05 09:20:36 +01:00
Alexander A. Klimov 798c56b809 IcingaDB: update service state on Host#problem change
refs #7673
2019-12-03 17:37:51 +01:00
Alexander A. Klimov ea5403a55c Extend Checkable::OnAcknowledgementCleared by removedBy 2019-12-03 17:00:54 +01:00
Alexander A. Klimov 6c7a9eb651 IcingaDB#SendStatusUpdate(): add icinga:history:stream:state#previous_soft_state 2019-11-04 12:59:57 +01:00
Alexander A. Klimov 746a48e2ca RedisWriter: add icinga:history:stream:{state,notification}#previous_hard_state 2019-11-02 14:00:24 +01:00
Alexander A. Klimov efc7f2cf8d Correct current_concurrent_checks to actually running checks
refs #7416
2019-08-15 13:39:01 +02:00
Michael Friedrich a3c6797310 Fix compiler warnings and style 2019-07-10 11:51:58 +02:00
Alexander A. Klimov ed56fa34dc Re-send suppressed notifications
refs #5919
2019-07-09 16:38:50 +02:00
Alexander Stoll 471dbc79a3 Remove double whitespaces for notifications log message
Add space to checkable debug message to unify timestamp format
2019-05-22 14:13:14 +02:00
Michael Friedrich 93030709f5 Implement previous_state_change 2019-03-27 11:43:14 +01:00
Michael Friedrich d14a88235d Replace Copyright header with a short version, part I
CLion -> replace in path
2019-02-25 14:48:22 +01:00
Michael Friedrich d1fb1a8eda Refactor conditions and add debug log messages for future crs and skipped crs 2019-02-08 13:32:13 +01:00
Jean Flach c97f3c80f5 Fix checkresults from the future breaking checks 2019-02-08 12:08:40 +01:00
Michael Friedrich 6b7f651478
Merge pull request #6899 from Icinga/bugfix/localtime-zero-windows
Log: Ensure not to pass negative values to localtime()
2019-01-24 10:58:43 +01:00
Michael Friedrich 2fc33996b6 Log: Ensure not to pass negative values to localtime()
refs #6887
2019-01-16 17:27:38 +01:00
Alexander A. Klimov 9ae738d17f Allow Checkable#retry_interval to be 0
refs #6871
2019-01-09 11:27:33 +01:00
Michael Friedrich dab53448bc icinga.com: Update *.{h,c}pp 2018-10-18 09:27:04 +02:00
Jordi van Scheijen bc1dc9c7a7 Fix issue 5022 2018-09-27 07:52:37 +02:00
Bas Couwenberg 0891380789 Fix spelling errors.
* occured -> occurred
 * dosen't -> doesn't
2018-07-21 10:38:09 +02:00
Michael Friedrich ab9a32d67d Fix missing next check update causing the scheduler to execute checks too often
Regression from #6217, only in git master.

fixes #6421
2018-07-02 16:17:53 +02:00
Michael Friedrich 601c54e44e Add more debug logging for check scheduling 2018-07-02 16:17:33 +02:00
Noah Hilverling d8b400dc17 Fix that checks with command_endpoint don't return any check results
fixes #6337
2018-05-29 13:51:34 +02:00
Jean Flach 1a9c1591c0 Fix check behavior on restart
This patch changes the way checkresults are handled during a restart.

  1. Check results coming in during a shutdown are ignored.
  2. Upon start, checks which should have ran (next_check in the past),
  are re-scheduled within the first minute.

This new behavior means there will be no more "Unknown - Terminated"
checkresults during a restart and checks with high check_interval will
be run earlier if they were already scheduled to run. The downside is
that after Icinga2 was down for a while, there will be a lot of checks
within the first minute. Our max concurrent check should take care of
this though.
2018-04-10 15:52:50 +02:00
Noah Hilverling e28277175b Implement concurrent checks limit for remote checks
fixes #4841
2018-01-29 14:50:14 +01:00
Gunnar Beutner c2fb9fe226 Use initializer lists for arrays and dictionaries 2018-01-16 12:27:44 +01:00
Michael Friedrich 211a07f49a Add 'ttl' support for check result freshness via REST API
The `process-check-result` action can now optionally set the
`ttl` parameter. This overrules the configured freshness
check (check_interval).

The main idea behind this is to allow the external sender
to specify when the next check result is coming in.

For example, a backup script which should be run every
24h can specify the exact expected next check result.

The addition to the CheckResult class is necessary to
forward the check result throughout the cluster and
calculate the `next_check` value on each node. This
allows us to send in a check result on a satellite,
and the master determines the freshness and possible
notifications/state changes for Icinga Web 2.
2018-01-15 13:54:11 +01:00
Gunnar Beutner ac155d1dda Apply clang-tidy fix 'modernize-redundant-void-arg' 2018-01-04 12:24:57 +01:00
Michael Insel 158ae2188e Change copyright header for 2018 2018-01-02 12:08:55 +01:00
Jean Flach 2636e6a77a Whitespace fix
What does this change?
* Remove use of spaces for formatting
These could be found by using `grep -r -l -P '^\t+ +[^*]'
* Removal of training whitespaces
* A few lines longer than 120 chars
2017-12-20 14:53:52 +01:00
Gunnar Beutner 1ad83886ac Replace a few more NULLs with nullptr 2017-12-14 15:37:20 +01:00
Gunnar Beutner 325e4a2fb9 Use nullptr instead of <Type>::Ptr() 2017-11-30 17:47:09 +01:00
Michael Friedrich 41d54029c8 Fix log messages for flapping 2017-11-08 12:12:27 +01:00
Jean Flach a21ffd6fe4 Fix flapping
Re-implement flapping following the 'old way' of just observing the last
20 stage changes.

refs #4982
2017-10-24 15:54:05 +02:00
Michael ac0fdd7144 Change more loglines for checkables so checkable is quoted
refs #5528
2017-08-24 13:35:55 +02:00
Thomas Widhalm de9a097a97 Change loglines for checkables so checkable is quoted 2017-08-23 19:11:46 +02:00
Michael Friedrich b7caf0820d Ensure that *.icinga.com is used everywhere
fixes #13897
fixes #13277
2017-01-10 17:19:12 +01:00
Michael Friedrich 7e0c48643b Fix Flapping{Start,End} notifications in SOFT states or downtimes
fixes #12560
fixes #12892
2016-11-10 14:16:02 +01:00
Gunnar Beutner 5fdc874377 Don't generate 'UNKNOWN' results when the endpoint's log is still being resynced
fixes #12844
2016-10-24 08:38:58 +02:00
Michael Friedrich 3571965fef Fix SOFT/HARD state counting logic for check attempts <= 2
fixes #12592
2016-09-27 11:30:57 +02:00
Michael Friedrich ae75575874 Remove unused last_in_downtime field
fixes #12602
2016-08-31 15:21:26 +02:00
Gunnar Beutner 288413f046 Replace BOOST_FOREACH with range-based for loops
fixes #12538
2016-08-25 06:46:17 +02:00
Gunnar Beutner deb938d412 Fix incorrect notifications for soft recoveries
fixes #12529
2016-08-24 12:22:08 +02:00
Michael Friedrich cd1b2cdddd Fix that recovery notifications are sent in SOFT NOT-OK states
fixes #12517
2016-08-23 14:58:24 +02:00
Michael Friedrich 42818ab758 Fix downtime notification events and missing author/comment
fixes #12333
fixes #11851
2016-08-10 16:04:37 +02:00
Gunnar Beutner 1beef64dc4 Fix crash in Checkable::ProcessCheckResult when cr is NULL
refs #12329
2016-08-08 14:17:44 +02:00