181 Commits

Author SHA1 Message Date
Alexander A. Klimov
363c1b2986 cluster-zone: consider own zone connected if there's only one endpoint
... because in this case only the checking node can be (not) connected to itself.

refs #8570
2023-07-04 11:12:29 +02:00
Yonas Habteab
43ba2da39c Replace std/boost::bind() function with lambda expression 2021-03-10 16:29:40 +01:00
Alexander A. Klimov
0ad1ab20aa Fix code style
refs #8034
2020-11-23 16:39:24 +01:00
Mattia Codato
c2f8d6df44 Use ternary operator to get ExecuteOverride or checkable command 2020-08-03 08:07:32 +02:00
Mattia Codato
9c4a3aed1b Use ExecuteOverride to override the command 2020-07-31 17:28:33 +02:00
Mattia Codato
d7dadbfc66 Use MacroResolver::OverrideMacros on *task files 2020-07-31 14:21:09 +02:00
Mattia Codato
96dc349240 Fix scriptfunc for dummychecktask, exceptionchecktask and sleepchecktask 2020-07-22 11:38:41 +02:00
Mattia Codato
867da09fb4 Revert "Use ExecuteCommandProcessFinishedHandler in TimePeriodTask"
This reverts commit abf164bceb1c8c3480537411cbc9d54dc27087d4.
2020-07-21 10:52:59 +02:00
Mattia Codato
abf164bceb Use ExecuteCommandProcessFinishedHandler in TimePeriodTask 2020-07-21 09:57:59 +02:00
Mattia Codato
986c07fd7d Use ExecuteCommandProcessFinishedHandler in NullEventTask 2020-07-21 08:33:43 +02:00
Mattia Codato
8758e58b92 Use ExecuteCommandProcessFinishedHandler for all lib/methods/*task.cpp 2020-07-20 16:29:26 +02:00
Mattia Codato
27f8bc5920 Call ExecuteCommandProcessFinishedHandler for notification and event commands 2020-07-15 09:14:01 +02:00
Mattia Codato
a3027d7177 Fix ExecuteCommandProcessFinishedHandler parameters 2020-07-13 16:54:37 +02:00
Mattia Codato
6bad8bbc0f Replace executeactiontask with a lambda function 2020-07-13 09:47:19 +02:00
Mattia Codato
15159b1632 Add ExecuteCommandProcessFinishedHandler and checkable param to ExecuteRemoteCheck 2020-07-10 16:56:07 +02:00
Mattia Codato
c3d9f6c17b Add ExecuteActionTask 2020-07-10 16:51:45 +02:00
Mattia Codato
a33560548c Refactor MacroResolver::OverrideMacros 2020-07-03 15:53:51 +02:00
Mattia Codato
be2701bc8a Add overrideMacros property to MacroResolver 2020-07-03 15:13:51 +02:00
Michael Friedrich
ae8a0b6a64 Introduce Application::GetUptime() 2020-02-11 16:47:50 +01:00
Michael Friedrich
152709071d Revert "Implement last_notification_result handling for Notification objects"
This reverts commit 1706b297a50aceafdbbfe8ed8d46c8d01c114464.
2020-01-07 14:21:06 +01:00
Michael Friedrich
55d7da30ca Metrics: Expose problem/handled counts for hosts/services
With the addition of problem/handled as checkable runtime
attributes in #7096 we should also expose them via CIB
into

- icinga check
- /v1/status/CIB
- IcingaApplication runtime macros

This originates from a request by @phil-or at the recent
Icinga meetup in Linz.
2019-08-29 17:04:23 +02: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
c2e1d023e2
Merge pull request #7421 from Icinga/feature/threadpool-metric
Expose metric current_pending_callbacks
2019-08-15 10:51:31 +02:00
Alexander A. Klimov
448a991404 Expose metric current_pending_callbacks 2019-08-14 17:22:27 +02:00
Michael Friedrich
5b36ff0787 Properly parse the Icinga version for minimum version in the 'icinga' check
fixes #7415
2019-08-14 13:15:05 +02:00
Michael Friedrich
8098f4d54d Improve type logging for notifications 2019-07-16 13:46:16 +02:00
Michael Friedrich
406ecb448c Internal methods must update the 'command' key in the check result
Currently this is `null` which isn't really correct.

As otherwise, it is tremendously hard to figure out which check
command was involved, if you're not looking at the `.check_command`
checkable object.
2019-07-10 10:15:15 +02:00
Michael Friedrich
2acf3a6941 Indicate a warning in the 'icinga' check when cluster stage validation failed
- success: clear the last failed attribute
- failed: populate it with the output and current timestamp

This can be used to highlight this in the 'icinga' check task.
Since 2.9 we don't have problems with circular library dependencies
with just one linked binary, therefore it is safe to include libremote
in libmethods here.
2019-06-19 14:46:11 +02:00
Michael Friedrich
2ba2134eda
Merge pull request #7156 from Icinga/feature/itl-sleep
Implement sleep CheckCommand
2019-05-24 15:42:46 +02:00
htriem
75df3879f2 Implement sleep CheckCommand in memory
Implements a check task with Utility::Sleep and custom var parameter sleep_time (default value: 1s)

refs #6964
2019-05-02 16:24:42 +02:00
Michael Friedrich
1706b297a5 Implement last_notification_result handling for Notification objects 2019-03-28 10:43:35 +01:00
Michael Friedrich
458f997a18 Replace Copyright header with a short version, part II 2019-02-25 15:09:36 +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
3d45d0bcf6 Minor styleguide 2018-10-29 13:45:18 +01:00
Max Rosin
2366df6057 Fix the Icinga2 version check for versions with more than 5 characters
The previous implementation assumed that every version number will have
5 characters. With the release of 2.10.0 this does not work anymore.
The new implementation extracts everything from the second character to
the first dash. This should work as long as the version string is in a
format like 'v2.10.1-8-gaebe6da'.

fixes Icinga#6703
2018-10-19 15:37:32 +02:00
Michael Friedrich
eabea68c56 icinga.com: Update config files (ITL, etc.) 2018-10-18 09:37:59 +02:00
Michael Friedrich
dea5ec614e icinga.com: Update CMakeLists.txt 2018-10-18 09:35:18 +02:00
Michael Friedrich
dab53448bc icinga.com: Update *.{h,c}pp 2018-10-18 09:27:04 +02:00
Michael Friedrich
617925374b Fix that check_timeout was used for Event/Notification commands too
We may add specific timeouts for event/notification commands
later, for now the original timeout inside the EventCommand/NotificationCommand
is used.

fixes #6304
2018-09-28 14:32:57 +02:00
Gunnar Beutner
1a8692d972 Implement support for namespaces 2018-08-13 13:44:31 +02:00
Gunnar Beutner
d9c0b6f806 Refactor REGISTER_SCRIPTFUNCTION_* macros 2018-08-13 13:44:31 +02:00
Christopher Schirner
b870e84904 Only check lag if connected 2018-07-31 10:41:14 +02:00
Christopher Schirner
35038f72d6 Invert connected check 2018-07-31 10:40:54 +02:00
Michael Friedrich
4a68ed9a5f Ensure that icinga_min_version parameter is optional
Seen that here: https://github.com/Icinga/icinga2/issues/6319#issuecomment-390195058

refs #5960
refs #3998
2018-05-18 15:11:56 +02:00
Michael Friedrich
5b19784b25 Change log level for failed event command execution
refs #5692
2018-05-11 15:24:37 +02:00
Noah Hilverling
d0a97ddf64 Add counter for current concurrent checks to Icinga check
fixes #4939
2018-03-01 15:01:55 +01:00
Jean Flach
a71ab1e126 Rename macro RequireNotNull to REQUIRE_NOT_NULL 2018-02-21 13:47:46 +01:00
Noah Hilverling
6bebdf8a87 Add marco RequireNotNull
This is used to fix a number of possible nullptr dereferences
2018-02-21 13:47:46 +01:00
Michael Friedrich
bdeba19a00 Add more metrics and details to built-in 'random' check
This helps us with demo graphs in Graphite/InfluxDB as well
as other historical views.

fixes #5787
2018-02-06 16:01:07 +01:00
Noah Hilverling
e1e06ce767
Merge pull request #5988 from Icinga/fix/concurrent-checks-limit-cluster
Fix concurrent checks limit while using command_endpoint
2018-02-06 14:13:49 +01:00