Michael Friedrich
f2fe165ccb
Drop useless CompatUtility::GetCustomAttributeConfig() wrapper
2018-01-15 13:39:34 +01:00
Michael Friedrich
b5f5d167dc
Drop dead CompatUtility::GetCustomAttributeConfig
2018-01-15 13:39:34 +01:00
Michael Friedrich
cbea0c13f5
Drop Freshness wrappers from CompatUtility class
2018-01-15 13:39:34 +01:00
Michael Friedrich
db6ed405e4
Remove more redundant wrappers from CompatUtility class
2018-01-15 13:39:34 +01:00
Michael Friedrich
5466197d29
Drop CompatUtility::*Command helpers
2018-01-15 13:39:34 +01:00
Michael Friedrich
b4af0971af
Drop dead code in Livestatus feature
2018-01-15 13:39:34 +01:00
Michael Friedrich
2d1f772a6e
Replace CompatUtility's enabled wrappers with native implementation getters
...
Many conversions were not necessary, or could be dealt inside the actual
feature. libcompat and liblivestatus can take care about such specifics
on their own, lib_db_ido doesn't need boolean conversion in fields, that
is done inside the db driver.
2018-01-15 13:39:34 +01:00
Michael Friedrich
334f633b0a
Drop CompatUtility::GetCheckableHasBeenChecked() and use Checkable::HasBeenChecked()
2018-01-15 13:39:34 +01:00
Michael Friedrich
3847e37df1
Drop CompatUtility::GetCheckableAcknowledgementType()
...
This already returns an integer.
2018-01-15 13:39:34 +01:00
Michael Friedrich
7bf2e07032
Move CompatUtility::GetCheckableProblemHasBeenAcknowledged() into feature specific dumps
2018-01-15 13:39:34 +01:00
Michael Friedrich
92c565d744
Move CompatUtility::GetCheckableCheckType() into IDO/Livestatus features
...
It is just boolean mapping to numbers, each modules does that in a sort of different way.
DB IDO automatically transforms boolean to numbers.
Livestatus would return JSON which keeps true booleans, but requires a number (just a guess,
there is no spec for this message format).
2018-01-15 13:39:34 +01:00
Michael Friedrich
70af1a3545
Move CompatUtility::GetHostAlias into DB IDO host object method
...
This is the only place where this mapping is used.
2018-01-15 13:39:34 +01:00
Michael Friedrich
36a10cb65d
Merge pull request #5970 from Icinga/feature/stack-allocate-configitembuilder
...
Allocate ConfigItemBuilder objects on the stack
2018-01-11 13:50:23 +01:00
Gunnar Beutner
a36e847c6c
Allocate ConfigItemBuilder objects on the stack
2018-01-11 10:52:26 +01:00
Gunnar Beutner
21254fb610
Avoid accessing attributes for validators where not necessary
2018-01-11 08:20:16 +01:00
Gunnar Beutner
91c256261a
Apply clang-tidy fix 'modernize-use-default-member-init'
2018-01-04 12:24:58 +01:00
Gunnar Beutner
becfa85094
Apply clang-tidy fix 'modernize-use-emplace'
2018-01-04 12:24:57 +01:00
Gunnar Beutner
e3ad0be769
Apply clang-tidy fix 'modernize-use-auto'
2018-01-04 12:24:57 +01:00
Gunnar Beutner
621eed3f13
Apply clang-tidy fix 'modernize-pass-by-value'
2018-01-04 12:24:57 +01:00
Gunnar Beutner
9ca682496c
Apply clang-tidy fix 'modernize-use-override'
2018-01-04 12:24:57 +01:00
Gunnar Beutner
ac155d1dda
Apply clang-tidy fix 'modernize-redundant-void-arg'
2018-01-04 12:24:57 +01:00
Gunnar Beutner
41f0fbfd30
Add the final keyword to methods
2018-01-04 05:45:40 +00:00
Gunnar Beutner
efe99a3e5e
Add the final keyword to classes
2018-01-04 05:20:20 +00:00
Michael Friedrich
cd33b8b508
Merge pull request #5936 from Icinga/feature/source-lists
...
Clean up source lists in the CMakeLists.txt files
2018-01-03 11:59:35 +01:00
Gunnar Beutner
75e2473616
Clean up source lists in the CMakeLists.txt files
2018-01-03 11:47:46 +01:00
Michael Friedrich
0e6f4b1966
Merge pull request #5939 from Icinga/fix/build-fix-wheezy
...
Build fix for Debian wheezy
2018-01-03 11:28:57 +01:00
Gunnar Beutner
abe3f8a959
Build fix for Debian wheezy
2018-01-03 10:32:33 +01:00
Gunnar Beutner
90496b5456
Build libraries as static libraries
2018-01-02 23:29:48 +01:00
Michael Insel
158ae2188e
Change copyright header for 2018
2018-01-02 12:08:55 +01:00
Michael Friedrich
8bdd16bb42
Do not replace colons in plugin output
...
This affects all interfaces which are using the CompatUtility class
format helpers for short and long output.
fixes #4785
2017-12-21 09:49:34 +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
b63caaa756
Workaround for GCC bug 51494
2017-12-20 08:02:17 +01:00
Gunnar Beutner
02dc3a9507
Workaround for GCC bug 61321
2017-12-20 08:02:17 +01:00
Gunnar Beutner
1ad83886ac
Replace a few more NULLs with nullptr
2017-12-14 15:37:20 +01:00
Gunnar Beutner
42744fde5b
Remove extraneous whitespace
2017-12-14 08:50:09 +01:00
Gunnar Beutner
75def4b074
Merge pull request #5753 from Icinga/fix/ringbuffer-does-not-get-updated-if-nothing-is-written-5750
...
Fix that RingBuffer does not get updated and add metrics about communication between endpoints
2017-12-12 11:32:18 +01:00
Michael Friedrich
da056b052b
Merge pull request #5827 from Icinga/feature/replace-statsfunction-with-function
...
Replace StatsFunction with Function
2017-11-30 21:28:32 +01:00
Michael Friedrich
a238613fdc
Merge pull request #5825 from Icinga/feature/boost-assign
...
Replace boost::assign::list_of with initializer lists
2017-11-30 21:20:46 +01:00
Gunnar Beutner
a344f11e6c
Replace StatsFunction with Function
2017-11-30 19:02:25 +01:00
Gunnar Beutner
83f17b5bfa
Replace boost::assign::list_of with initializer lists
2017-11-30 18:09:38 +01:00
Gunnar Beutner
325e4a2fb9
Use nullptr instead of <Type>::Ptr()
2017-11-30 17:47:09 +01:00
Gunnar Beutner
3c60fbf75d
Use std::vector::emplace_back instead of std::vector::push_back
2017-11-30 17:47:09 +01:00
Gunnar Beutner
59fca5d5ac
Use std::vector instead of std::set where appropriate
2017-11-30 17:47:09 +01:00
Gunnar Beutner
2e87c280ed
Use initializer lists instead of std::vector::push_back
2017-11-30 17:47:09 +01:00
Gunnar Beutner
63fd6e3905
Get rid of INITIALIZE_ONCE for the ExternalCommandProcessor
2017-11-30 17:47:09 +01:00
Gunnar Beutner
9ce950b0f1
Replace boost::ref/boost::cref with std::ref/std::cref
2017-11-30 17:47:09 +01:00
Gunnar Beutner
df8266631d
Replace boost::tuple with std::tuple
2017-11-30 17:41:02 +01:00
Gunnar Beutner
160ab21e59
Replace CheckResult::StaticInitialize with a lambda function
2017-11-30 17:41:02 +01:00
Gunnar Beutner
6739023678
Dynamically create and destroy the timer thread
2017-11-30 17:41:02 +01:00
Gunnar Beutner
d5961bb76c
Re-implement WrapFunction() using C++11 features
2017-11-29 11:53:45 +01:00
Gunnar Beutner
858873b940
Replace boost::bind/boost::function with std::bind/std::function
2017-11-27 15:15:11 +01:00
Jean Flach
27aaa10ee9
Merge pull request #5718 from Icinga/fix/verify-error-codes-and-returned-log-messages-in-api-actions-5550
...
API: Fix http status codes
2017-11-27 14:41:29 +01:00
Noah Hilverling
e31b236cba
API: Fix http status codes
...
fixes #5550
2017-11-27 14:06:38 +01:00
Michael Friedrich
35f0df3fe5
Disable Flapping detection on Windows
2017-11-17 12:59:07 +01:00
Noah Hilverling
2acaccd028
Fix that RingBuffer does not get updated if nothing is written
...
refs #5750
2017-11-13 16:17:59 +01:00
Michael Friedrich
41d54029c8
Fix log messages for flapping
2017-11-08 12:12:27 +01:00
Jean Flach
872d4895f0
Fix flapping endianness and events
...
fixes #5720
2017-11-07 11:13:17 +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 Friedrich
68cae91378
Remove bottom-up cluster messages
...
refs #4799
2017-09-22 14:04:53 +02:00
Gunnar Beutner
043106242d
Remove API stubs for now
...
refs #5450
2017-09-12 12:52:49 +02:00
Gunnar Beutner
c02742925e
Refactor PkiUtility class
...
refs #5450
2017-09-12 12:52:49 +02:00
Federico Cuello
a6b4bd48e2
Fix parameter order for Acknowledge{,Svc,Host}Problem in API actions/external commands
...
It was preventing email notifications with default settings, as `persistent` defaults to false and therefore `notify` was not set.
Signed-off-by: Michael Friedrich <michael.friedrich@icinga.com>
2017-09-05 08:50:22 +02:00
Michael Friedrich
261bd93c0b
Implement get_services(host {name,object}) and add host object support for get_service()
...
This includes some debug console examples too which involve advanced
map() and filter examples for better readability.
refs #4912
2017-08-28 19:54:26 +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
e88b97079c
API: Add execution_{start,end} attribute to 'process-check-result' action
...
fixes #5002
2017-08-21 17:20:56 +02:00
Gunnar Beutner
7ca485f63c
Improve validation for attributes which must not be 'null'
2017-05-30 14:47:28 +02:00
mcktr
9e1016dd4f
Fix missing apostrophe in notification log
...
refs #5294
2017-05-26 17:58:04 +02:00
Michael Friedrich
79dcb789c2
Move PerfdataValue() class into base library
...
This is required for libremote and ApiListener stats in #5133
2017-05-15 16:32:29 +02:00
Michael Friedrich
f282126bb4
Don't allow acknowledgement expire timestamps in the past
...
fixes #5250
2017-05-15 10:23:21 +02:00
Michael Friedrich
0f1aa23575
Add target object in cluster error messages to debug log
...
fixes #4288
2017-05-11 16:10:40 +02:00
Michael Friedrich
8d56f8e951
Fix that host downtimes might be triggered even if their state is Up
...
If the checkresult's state is 1, this is internally mapped to Up.
The added downtime will check for triggers and might cause a wrong
downtime start event.
refs #5202
2017-05-11 15:05:50 +02:00
Gunnar Beutner
d05b7c4178
Allow expressions for the type in object/template declarations
2017-05-11 14:21:30 +02:00
Rune Darrud
273ca6a2cc
Fix persistent comments for Acknowledgements
...
fixes #4818
Signed-off-by: Michael Friedrich <michael.friedrich@icinga.com>
2017-05-10 17:10:22 +02:00
Gunnar Beutner
4134f7fe42
Make sure modified attributes are applied before calling the objects' Start method
...
refs #4696
2017-05-03 12:02:19 +02:00
Michael Friedrich
dc7980586b
Implement severity attribute for host/service objects
...
refs #5117
2017-04-13 16:09:31 +02:00
Gunnar Beutner
c32badaff5
Add missing base class call for ScheduledDowntime::ValidateRanges()
...
fixes #5146
2017-04-06 11:25:40 +02:00
Gunnar Beutner
50310fb5bc
Add missing arguments
...
refs #5087
2017-03-28 13:24:21 +02:00
Gunnar Beutner
5d45c74be3
Improve function metadata by adding arguments
...
fixes #5087
2017-03-27 14:43:19 +02:00
Gunnar Beutner
95093bae3e
Move log message
...
refs #5094
2017-03-27 11:01:14 +02:00
Gunnar Beutner
a73c1580ca
Don't try to remove comments that were statically configured
...
fixes #5094
2017-03-27 10:46:35 +02:00
Michael Friedrich
60f334df52
Fix notify/sticky parameter handling in 'acknowledge-problem' API action
...
refs #13939
2017-02-23 12:30:28 +01:00
Gunnar Beutner
06c2a4088d
Ensure that only child processes for checks are reniced
...
fixes #4989
2017-02-21 11:31:07 +01:00
Michael Friedrich
d4277b4d70
Require that max_check_attempts is greater than 0
...
fixes #4832
2017-02-07 13:27:27 +01:00
Michael Friedrich
b51a2c1c25
MacroProcessor: Add the argument name for set_if error messages
...
fixes #13345
2017-01-11 12:26:09 +01:00
Michael Friedrich
b7caf0820d
Ensure that *.icinga.com is used everywhere
...
fixes #13897
fixes #13277
2017-01-10 17:19:12 +01:00
Gunnar Beutner
56e9a23a65
Don't try to delete Downtime objects that were statically configured
...
fixes #13275
2016-11-22 15:13:43 +01:00
Michael Friedrich
a13e6b3e87
Fix that custom notifications do not reset force_next_notification
...
This attribute is stored in the state file forever as well.
Will cause forced notifications ignoring state/type filters.
fixes #12670
2016-11-17 11:53:35 +01:00
Gunnar Beutner
23e30ccb67
Revert "Implement the 'evaluate-macros' API action"
...
This reverts commit 851135d3a1
.
fixes #13091
2016-11-17 10:39:27 +01:00
Michael Friedrich
35ce166bd2
Fix that recovery notifications are sent if notified for !Problem type before
...
fixes #13205
2016-11-17 10:35:16 +01:00
Michael Friedrich
1bfb91f065
Ensure that DowntimeStart notifications are not immediately sent
...
fixes #12549
2016-11-11 19:36:19 +01:00
Michael Friedrich
e7a6124924
Fix crash in CheckResult cluster handlers
...
fixes #13151
2016-11-11 16:29:51 +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
06e4b4e9da
Fix crash in Checkable::OnAllConfigLoaded
...
fixes #13103
2016-11-10 13:42:50 +01:00
Gunnar Beutner
851135d3a1
Implement the 'evaluate-macros' API action
...
fixes #13091
2016-11-09 09:13:42 +01:00
Michael Friedrich
09658f6d0e
Add child_options for API action 'schedule-downtime'
...
fixes #10896
fixes #10897
2016-11-02 09:54:48 +01:00
Michael Friedrich
ea1f8727da
Implement GetAllChildren() for dependency resolution
...
refs #10896
refs #10897
2016-11-02 08:55:11 +01:00
Michael Friedrich
86f162af85
Add SCHEDULE_AND_PROPAGATE{,_TRIGGERED}_HOST_DOWNTIME external commands
...
refs #10896
refs #10897
2016-11-02 08:54:32 +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
Gunnar Beutner
8fd454fbb1
Fix crash in ClusterEvents::SendNotificationsAPIHandler
...
fixes #12718
2016-09-13 22:14:11 +02:00
Gunnar Beutner
efbdce803f
Fix incorrect attribute name on the validator for the Notification class
...
fixes #12633
2016-09-04 17:50:44 +02:00
Michael Friedrich
ae75575874
Remove unused last_in_downtime field
...
fixes #12602
2016-08-31 15:21:26 +02:00
Gunnar Beutner
903db81fe0
Make sure that libmethods is automatically loaded even when not using the ITL
...
fixes #12578
2016-08-28 17:03:08 +02:00
Gunnar Beutner
78cd56e277
Implement support for default templates
...
fixes #12575
2016-08-28 10:27:43 +02:00
Gunnar Beutner
e8b0797ec4
Use 'auto' keyword for iterator declarations (part 2)
...
refs #12561
2016-08-27 19:56:12 +02:00
Gunnar Beutner
8f2477db46
Fix incorrect variable type in the FilterArrayToInt function
...
refs #12509
2016-08-27 12:23:09 +02:00
Gunnar Beutner
6e384f81a0
Remove unused #includes
...
refs #12481
2016-08-27 10:59:52 +02:00
Gunnar Beutner
b5b09216c6
Use lambda functions for INITIALIZE_ONCE
...
fixes #12562
2016-08-27 09:48:36 +02:00
Gunnar Beutner
5058c5d75b
Use 'auto' for iterator declarations
...
fixes #12561
2016-08-27 08:37:19 +02:00
Gunnar Beutner
30762e5330
Set versions for all internal libraries
...
fixes #12552
2016-08-25 17:56:18 +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
429d11daa8
Fix compiler warnings
...
fixes #12534
2016-08-24 20:33:34 +02:00
Gunnar Beutner
ae1ab5f865
Implement unit tests for state changes
...
fixes #12530
2016-08-24 19:45:52 +02:00
Gunnar Beutner
deb938d412
Fix incorrect notifications for soft recoveries
...
fixes #12529
2016-08-24 12:22:08 +02:00
Gunnar Beutner
82b6ef4301
Don't update TimePeriod ranges for inactive objects
...
fixes #12511
2016-08-23 15:01:40 +02:00
Gunnar Beutner
218e780a44
Avoid unnecessary string copies
...
fixes #12509
2016-08-23 15:01:40 +02:00
Gunnar Beutner
43a4acd5a2
Remove deprecated functions
...
fixes #12507
2016-08-23 15:01:40 +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
b8d3bcad6a
Cluster: Fix notified users for NotificationSentToAllUsers event
...
refs #12449
refs #12444
2016-08-22 10:47:09 +02:00
Michael Friedrich
e5566a6bd8
API: Fix missing attributes for DowntimeTriggered event
...
fixes #12464
2016-08-17 16:57:22 +02:00
Michael Friedrich
520be9513b
API: Fix that schedule-downtime action requires duration for fixed=true
...
fixes #12454
2016-08-16 17:09:25 +02:00
Gunnar Beutner
b7a1b58069
Improve performance for type lookups
...
fixes #12448
2016-08-16 11:02:33 +02:00
Michael Friedrich
a34e01d0bb
Fix NotificationSentToAllUsers cluster event
...
refs #12444
2016-08-16 09:30:10 +02:00
Michael Friedrich
d909c0945c
Add an explicit flag for disabling reminder notifications
...
refs #12402
2016-08-15 18:32:51 +02:00
Michael Friedrich
17544d7b54
Fix: ClusterEvents::NotificationSentAllUsersAPIHandler() does not set notified_users
...
fixes #12444
2016-08-15 17:26:01 +02:00
Michael Friedrich
d341783a51
API: Implement 'generate-ticket' action and update distributed monitoring docs
...
fixes #12433
2016-08-15 15:19:28 +02:00
Gunnar Beutner
ebaf239d3b
Replace GetType()->GetName() calls with GetReflectionType()->GetName()
...
fixes #12438
2016-08-15 14:42:03 +02:00
Gunnar Beutner
8ced75b7d2
Fix the load order for Host/Service vs. Endpoint/Zone
...
refs #12432
2016-08-14 23:04:55 +02:00
Gunnar Beutner
39ded04e1a
Improve validation for the command_endpoint attribute
...
fixes #12432
2016-08-14 22:11:29 +02:00
Gunnar Beutner
fda032c0c4
Fix incorrect return values for some of the CompatUtility methods
...
fixes #12425
2016-08-14 17:06:50 +02:00
Gunnar Beutner
9f8cb8dd36
Clean up the code a bit
...
refs #11423
2016-08-13 21:43:59 +02:00
Michael Friedrich
8f03adf76f
Remove Downtime objects w/o reference to ScheduledDowntime objects
...
fixes #11423
2016-08-13 15:18:50 +02:00
Gunnar Beutner
99f944ac28
Remove extraneous space in a log message
...
refs #12304
2016-08-12 16:38:05 +02:00
Michael Friedrich
e28f30a727
Enhance log messages for {,reminder} notifications
...
refs #12402
2016-08-12 14:49:29 +02:00
Gunnar Beutner
31f816562f
Add namespace qualifier for some assert() calls
...
refs #12408
2016-08-12 13:44:51 +02:00
Gunnar Beutner
24431b3dab
Register deprecated methods in the 'Deprecated' namespace
...
refs #12408
2016-08-12 13:42:22 +02:00
Gunnar Beutner
c5a170a972
Implement support for namespaces
...
fixes #12408
2016-08-12 11:32:16 +02:00
Michael Friedrich
f5d5eaf344
Add log message if notifications are forced (i.e. filters are not checked)
...
fixes #12404
2016-08-11 16:23:58 +02:00
Michael Friedrich
8389d01998
Fix flexible downtimes expiry time and removal
...
fixes #12395
2016-08-10 17:15:27 +02:00
Gunnar Beutner
e09fb88cae
Make sure functions are registered with the correct prefix
...
refs #12393
2016-08-10 16:33:17 +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
54bbaf9f7d
Implement support for marking functions as deprecated
...
fixes #12393
2016-08-10 15:48:05 +02:00
Gunnar Beutner
dc06209e4a
Move internal script functions into the 'Internal' namespace
...
fixes #12338
2016-08-10 06:55:44 +02:00
Gunnar Beutner
4c7e2994a7
Handle I/O errors while writing the Icinga state file more gracefully
...
fixes #12334
2016-08-09 10:59:08 +02:00
Gunnar Beutner
1beef64dc4
Fix crash in Checkable::ProcessCheckResult when cr is NULL
...
refs #12329
2016-08-08 14:17:44 +02:00
Gunnar Beutner
c7602a0f34
Implement process_check_result script method for the Checkable class
...
fixes #12329
2016-08-08 14:14:45 +02:00
Gunnar Beutner
8deeb73bb8
Register a new script frame in Function::Invoke
...
fixes #9848
2016-08-08 14:12:08 +02:00
Gunnar Beutner
597dc0dea2
Fix incorrect behavior for max_check_attempts
...
fixes #11898
2016-08-08 11:02:08 +02:00
Gunnar Beutner
d0658c465b
Fix incorrect parameter name for NotificationSentAllUsersHandler
...
fixes #12310
2016-08-05 06:57:50 +02:00
Michael Friedrich
43a177fb16
Fix that notifications with empty times.{begin,end} are not sent
...
fixes #10363
2016-08-04 17:27:35 +02:00
Michael Friedrich
3f89a6dd09
Disable immediate hard state for first check result
...
fixes #7354
2016-08-04 16:16:58 +02:00
Gunnar Beutner
905380b436
Fix duplicate notifications on HA failover
...
fixes #12267
2016-08-04 10:12:55 +02:00
Michael Friedrich
34655d77d3
Ensure to send recovery notifications if the was a problem notification before a downtime
...
fixes #12293
2016-08-03 18:28:09 +02:00
Michael Friedrich
83f07c7ee2
Add the notification type into the log message
...
fixes #12304
2016-08-03 17:32:55 +02:00
Michael Friedrich
5498dc5e4f
Fix that the first notification interval is incorrect
...
fixes #12257
2016-08-02 18:41:01 +02:00
Conrad Clement
3f0b6ec003
Optimize two ObjectLocks into one in Notification::BeginExecuteNotification method
...
object is locked twice to update values of
NotificationNumber, LastNotification and LastProblemNotification.
LastNotificaiton is updated inside each ObjectLock
merge two ObjectLocks into one and remove duplicate update
fixes #12188
Signed-off-by: Michael Friedrich <michael.friedrich@netways.de>
2016-08-02 18:36:29 +02:00
Rune Darrud
54eb9540b1
Fix min/max execution_time
...
fixes #12225
Signed-off-by: Gunnar Beutner <gunnar.beutner@netways.de>
2016-07-26 09:56:21 +02:00
Rune Darrud
730d959374
Set min_latency and min_execution_time to 0 when there have been no checkresults processed
...
fixes #12216
Signed-off-by: Gunnar Beutner <gunnar.beutner@netways.de>
2016-07-26 09:54:08 +02:00
Michael Friedrich
743a726752
state_filters_real shouldn't be visible in the API
...
fixes #12171
2016-07-19 20:09:39 +02:00
Gunnar Beutner
9075de67b1
Fix message routing for command_endpoint checks in satellite zones with >2 instances
...
refs #12179
2016-07-19 18:32:01 +02:00
Michael Friedrich
3d06df96bc
Fix duplicate CheckResult messages for command_endpoint
...
fixes #12179
2016-07-19 17:36:14 +02:00
Michael Friedrich
c73e4d3328
Fix Downtime validation function signature
...
refs #11483
2016-07-05 13:17:18 +02:00
Michael Friedrich
c688a94f8a
API: Add missing downtime_depth attribute
...
fixes #12041
2016-06-25 17:32:12 +02:00
Michael Friedrich
ab4ba18238
Allow strings in Dependency states filter
...
refs #11445
2016-06-24 14:17:24 +02:00
Michael Friedrich
14fdb794e2
Allow strings in state and type filters (config, API)
...
fixes #11445
2016-06-23 14:52:45 +02:00
Gunnar Beutner
e3f1c1ec6f
Make sure timestamps are formatted as integers in macro strings
...
refs #11483
2016-06-21 11:29:12 +02:00
Gunnar Beutner
b5a38f6707
Fix compatibility issue with the $icinga.timet$ macro
...
fixes #11483
2016-06-21 08:23:31 +02:00
Michael Friedrich
b4c56e5f47
Remove duplicate last_check runtime macro
...
Already available as {host,service}.last_check attribute.
refs #11483
2016-06-16 17:39:59 +02:00
Gunnar Beutner
bc6f7d7a21
Fix incorrect formatting for some macro values
...
fixes #11483
2016-06-16 15:14:35 +02:00
Michael Friedrich
cdd858a0ec
Flapping{Start,End} notifications must not depend on state changes
...
fixes #11899
2016-06-15 17:43:37 +02:00
Michael Friedrich
399ae42a8c
DB IDO: Fix comment/downtime entry_time reset
...
fixes #11182
2016-06-15 11:28:57 +02:00
Gunnar Beutner
8a714d66f1
Ensure that sent notifications are synced between Icinga instances
...
fixes #11562
2016-06-15 11:27:01 +02:00
Michael Friedrich
f7f976b962
DB IDO: Ensure that SOFT state changes with the same state are logged
...
fixes #11933
2016-06-14 11:08:28 +02:00
Gunnar Beutner
a8209c1a1a
Change which instance is responsible for initiating notifications in a HA setup
...
refs #9242
2016-06-14 07:57:52 +02:00
Gunnar Beutner
eb4aa4415c
Fix cluster permissions for SendNotifications messages
...
refs #9242
2016-06-13 11:13:25 +02:00
Gunnar Beutner
cb01f96dad
Don't forward SendNotifications messages to non-local zones
...
refs #9242
2016-06-13 10:48:59 +02:00
Markus Frosch
8808e709c9
Make change to OK always a hard state
...
refs #11654
2016-06-13 10:43:57 +02:00
Gunnar Beutner
0eb0992d5e
Fix custom notifications in a HA zone
...
fixes #9242
2016-06-07 12:44:12 +02:00
Gunnar Beutner
aeb7a4a70b
Fix incorrect check interval for SOFT->HARD transitions
...
fixes #11825
2016-05-24 11:05:29 +02:00
Philipp Dallig
54e1c8a9d5
Implement exclude and include ability for TimePeriod objects
...
This feature allows to exclude and include specific time period
objects and their time ranges from an existing time period object.
This comes in handy when e.g. excluding holidays.
fixes #7355
Signed-off-by: Michael Friedrich <michael.friedrich@netways.de>
2016-05-21 20:33:09 +02:00
Michael Friedrich
d49b63d2ab
Fix: First HARD state does not change retry_interval to check_interval
...
refs #11825
2016-05-21 18:58:19 +02:00
Michael Friedrich
3f1a9f150b
Silence compiler warnings
...
refs #11823
2016-05-21 14:16:47 +02:00
Michael Friedrich
b4843dc81b
Fix: Volatile check results for OK->OK transitions are logged into DB IDO statehistory
...
fixes #11823
2016-05-21 13:41:43 +02:00
Michael Friedrich
e27dee5476
Windows: Fix missing path for repository handler
...
fixes #11817
2016-05-21 13:05:35 +02:00
Gunnar Beutner
97a5091abc
Fix incorrect re-scheduling behavior for command_endpoint checks
...
refs #8137
2016-05-12 13:47:32 +02:00
Michael Friedrich
3c852311e1
Fix possible crash in Add{Comment,Downtime}
...
refs #11112
2016-05-11 16:12:09 +02:00
Gunnar Beutner
0b95be7b99
Fix incorrect calculation in Downtime::IsInEffect
...
fixes #11589
2016-05-11 14:13:43 +02:00
Gunnar Beutner
ed27130402
Fix: "day -X" time specifications are parsed incorrectly
...
fixes #11147
2016-05-11 09:23:55 +02:00
Michael Friedrich
ba82d2eb20
Move CalculateExecutionTime and CalculateLatency into the CheckResult class
...
fixes #11751
2016-05-10 12:16:49 +02:00
Gunnar Beutner
f6f3bd1e4c
Implement support for limiting the number of concurrent checks
...
fixes #8137
2016-05-10 11:26:55 +02:00
Gunnar Beutner
1fb378ef4a
Remove unused cluster commands
...
fixes #11748
2016-05-10 07:05:10 +02:00
Gunnar Beutner
b8e911b0e5
Make sure the dependency graph is properly updated when adding and removing objects
...
fixes #11686
fixes #11374
2016-05-09 14:30:12 +02:00
Michael Friedrich
23ab6cf78b
Fix: Expired downtimes are not removed
...
fixes #11711
2016-05-02 15:32:46 +02:00
Jean Flach
360e0ad548
Fix external commands comments crashing icinga
...
Now an exception will be thrown when AddSvcComment or AddHostComment are
run with and empty Author or comment
fixes #11112
2016-04-25 16:58:00 +02:00
Michael Friedrich
7442cd94f5
Fix crash with empty ScheduledDowntime 'ranges' attribute
...
fixes #11158
2016-04-22 11:00:21 +02:00
Gunnar Beutner
c6a015e317
Fix crash in Checkable::ExecuteCheck
...
fixes #11582
2016-04-19 09:37:04 +02:00
Gunnar Beutner
974ca9f38b
Fix crash in Downtime::DowntimesExpireTimerHandler
...
fixes #11534
fixes #11559
2016-04-12 12:05:43 +02:00
Michael Friedrich
2b2e250def
Implement support for overriding check command timeout
...
fixes #9283
2016-04-07 15:07:17 +02:00
Michael Friedrich
83e0bcddce
IDO: Ensure that the notification insert id is passed to contactnotification inserts
...
We cannot add the notification insert id directly
to the following contactnotifications queries. Instead
we need to pass a DbValue reference which gets set after
the notification insert id is calculated.
The contactnotifications insert queries are fired as query
group calling CanExecuteQuery() and FieldToEscapedString().
If the notification id does not exist yet, the queries are
moved to the end of the queue.
Once the contactnotifications queries are fired the DbValue
reference is destroyed.
This patch also removes the old notification insert id cache
which was broken in many ways.
fixes #11387
2016-03-29 15:12:24 +02:00
Michael Friedrich
12dadfdfb3
Fix: Downtimes/Comments not being synced to child zones
...
fixes #11227
2016-03-29 12:09:51 +02:00
Gunnar Beutner
5de9a988d9
Improve validation for arrays
...
fixes #11434
2016-03-24 09:15:39 +01:00
Michael Friedrich
0447e81d99
Ensure that the legacy_id attribute for comment/downtime objects is restored on restart
...
This has been changed when moving comments/downtimes to config objects
in 050c520b2a
It may cause trouble with DB IDO DELETE and UPDATE statements
depending on the old value.
refs #11382
2016-03-23 14:05:09 +01:00
Michael Friedrich
a30cb86ca1
Only call UpdateNextCheck() for soft states
...
refs #11336
2016-03-15 14:02:19 +01:00
Michael Friedrich
d682f56c38
Use UpdateNextCheck() for determining the retry_interval in ProcessCheckResult()
...
This patch also moves the next check updates for passive
check results into ProcessCheckResult(). That way the
next check status updates for DB IDO work in a sane way
again.
refs #11336
2016-03-15 13:02:38 +01:00
Michael Friedrich
3bd6848763
Refactor patch for host recovery notifications
...
refs #10225
2016-03-15 09:47:59 +01:00
Gunnar Beutner
a8ee6b2009
Fix crash in ScheduledDowntime::TimerProc
...
fixes #11352
2016-03-14 08:37:13 +01:00
Michael Friedrich
3e050bd0cd
Fix: Volatile transitions from HARD NOT-OK->NOT-OK do not trigger notifications
...
fixes #11320
2016-03-11 13:19:03 +01:00
Michael Friedrich
7fb8bcd933
Use retry_interval on first OK -> NOT-OK state change
...
Only valid for active check results. The API actions were
missing that marker similar to the external command processor.
The initial OK -> NOT-OK transition should use the retry_interval
but nothing else.
fixes #11336
2016-03-11 12:00:30 +01:00
Michael Friedrich
5b6a6f86b1
Fix host recovery notifications for warning states
...
fixes #10225
2016-03-11 09:29:07 +01:00
Julian Brost
7439633965
Fix max number of args for DEL_DOWNTIME_BY_HOST_NAME
...
The RegisterCommand call for DEL_DOWNTIME_BY_HOST_NAME was missing the
max args parameter. This prevented the optional service name, start time
and comment arguments to be passed.
Signed-off-by: Michael Friedrich <michael.friedrich@netways.de>
fixes #11240
2016-03-05 18:43:02 +01:00
Michael Friedrich
ef532f20eb
Revert "Fix check scheduling w/ retry_interval"
...
This reverts commit a51e647cc7
.
This patch causes trouble with check results received
1) passively 2) throughout the cluster. A proper patch
for setting the retry_interval on NOT-OK state changes
is required.
refs #11248
refs #11257
refs #11273
(the old issue)
refs #7287
2016-03-05 18:16:49 +01:00
Michael Friedrich
b8e3d61820
Revert "Properly set the next check time for active and passive checks"
...
This reverts commit 2a11b27972
.
This patch does not properly work and breaks the check_interval setting
for passive checks. Requires a proper patch.
refs #11248
refs #11257
refs #11273
(the old issue)
refs #7287
2016-03-05 18:15:03 +01:00
Vytenis Darulis
6729679f38
Try to queue all PROCESS_FILE commands instead of exploding the stack
...
fixes #10426
Signed-off-by: Michael Friedrich <michael.friedrich@netways.de>
2016-02-24 23:25:22 +01:00
Michael Friedrich
894aaaecb1
Ensure that config files are readable by the daemon
...
refs #11212
refs #11211
2016-02-24 14:24:08 +01:00
Michael Friedrich
47c5425137
Fix permissions for temporary files
...
fixes #11212
fixes #11211
2016-02-24 11:00:44 +01:00
Sebastian Chrostek
83845e609e
Fix problem notifications while flapping is active
...
fixes #9969
fixes #9642
2016-02-23 16:27:22 +01:00
Michael Friedrich
4cb5b97e52
Fix unique creation of temp files
...
fixes #10948
2016-02-23 12:30:59 +01:00
Adam James
e04b70856b
Fix parsing of YYYY-MM-DD in LegacyTimePeriod::ParseTimeSpec
...
fixes #11132
Signed-off-by: Jean Flach <jean-marcel.flach@netways.de>
2016-02-10 16:24:36 +01:00
Jean Flach
8dbd84daed
Remove unused variable
2016-02-08 16:40:34 +01:00
Jean Flach
964cfcebd3
Make schedule-downtime default fixed
...
fixes #10923
2016-02-08 16:04:41 +01:00
Gunnar Beutner
e224e74994
Make sure the "syncing" attribute is set to false
...
refs #11083
2016-02-08 13:15:24 +01:00
Gunnar Beutner
6d5014b610
Increase grace period for agent-based checks
...
refs #11020
2016-02-08 09:46:01 +01:00
Michael Friedrich
7a3848af1e
Remove debug output
...
refs #11014
2016-01-29 14:03:58 +01:00
Michael Friedrich
b960850ce3
DB IDO: Only update 'next_check' column when manually scheduling a check
...
Otherwise the changes from #7287 already take care of setting
the proper next check time from inside ProcessCheckResult().
There is no need to use the generic OnNextCheckChanged signal
but instead we're using a new one, locally just for DB IDO.
fixes #11019
2016-01-22 18:42:15 +01:00
Michael Friedrich
2a11b27972
Properly set the next check time for active and passive checks
...
fixes #7287
refs #11019
2016-01-22 18:40:14 +01:00
Michael Friedrich
730db0cba1
Fix: Modified attributes do not work for the IcingaApplication object w/ external commands
...
fixes #10974
2016-01-21 19:07:54 +01:00
Gunnar Beutner
6ca054e618
Ensure that checks are not scheduled for command_endpoint fake hosts
...
refs #10963
2016-01-21 16:37:52 +01:00
Gunnar Beutner
72c3b6d75b
Make sure we're not running command_endpoint-based checks more than once
...
refs #10963
2016-01-21 10:37:47 +01:00
Michael Friedrich
a51e647cc7
Fix check scheduling w/ retry_interval
...
fixes #7287
2016-01-20 16:29:01 +01:00
Michael Friedrich
d9fac2b613
Raise a config error for "Checkable" objects in global zones
...
fixes #10807
2016-01-14 15:34:38 +01:00
Gunnar Beutner
599929b0f6
Update copyright headers for 2016
2016-01-12 08:29:59 +01:00
Michael Friedrich
737c574cdf
Fix missing num_hosts_pending in /v1/status/CIB
...
fixes #10736
2015-11-26 20:03:46 +01:00
Michael Friedrich
9289971829
Remove IcingaStatusWriter feature
...
fixes #10140
2015-11-26 19:30:40 +01:00
Michael Friedrich
6518f78af0
Fix attribute validation for PUT queries
...
fixes #10601
2015-11-12 10:13:46 +01:00
Gunnar Beutner
e3c75faabc
Implement support for recursive object locks
...
fixes #10596
2015-11-11 10:21:30 +01:00
Michael Friedrich
f5da37b7df
Remove obsolete checks from API actions
...
refs #10561
2015-11-10 16:13:14 +01:00
Gunnar Beutner
2cc33b7fb3
Don't validate arguments/parameters that aren't strings
...
refs #10539
2015-11-10 07:59:10 +01:00
Michael Friedrich
1d2606cbfe
Add filter targets for remove-{comment,downtime} actions
...
Drop remove-all-{comments,downtimes}. This is provided
by using host and service filters.
fixes #10561
2015-11-08 14:22:10 +01:00
Michael Friedrich
64c936d387
API Actions: Remove -by-id from actions and require names for comments and downtimes
...
The documentation is updated as well. Furthermore actions provide
detailed error information in case of an exception.
Includes DB IDO schema updates.
fixes #10512
2015-11-06 17:06:12 +01:00
Gunnar Beutner
09b2b054f5
Don't validate custom attributes that aren't strings
...
fixes #10539
2015-11-04 19:04:33 +01:00
Michael Friedrich
7589c61b38
Add missing override
...
refs #10508
refs #10509
2015-11-02 17:36:13 +01:00
Michael Friedrich
43976d3989
Add host.last_state_{up,down} and last_check attribute, hide *_raw attributes
...
fixes #10508
fixes #10509
2015-11-02 14:10:44 +01:00
Michael Friedrich
439dad5d6a
API actions: Check if removal of comments and downtimes was succesful
...
refs #9080
2015-11-01 16:33:43 +01:00
Gunnar Beutner
15addb4e7c
Use the correct zone name for parent_zone when running 'icinga2 node update-config'
...
fixes #10479
2015-10-29 08:14:55 +01:00
Gunnar Beutner
0013d26425
Build fix for Windows
...
refs #9777
2015-10-29 08:14:55 +01:00
Gunnar Beutner
050c520b2a
Convert Comment/Downtime to config objects
...
fixes #9777
2015-10-28 17:56:29 +01:00
Jean Flach
2fc042e231
Update API actions and documentation
...
refs #9080 #9105
2015-10-27 14:15:07 +01:00
Gunnar Beutner
dd77863910
Implement Array::ToString and Dictionary::ToString
...
fixes #10329
2015-10-26 11:05:24 +01:00
Jean Flach
be320b2f77
Update API actions
...
fixes #10180
refs #9080
2015-10-22 11:33:26 +02:00