Commit Graph

1260 Commits

Author SHA1 Message Date
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 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 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 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 
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 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 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 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 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 
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 
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 
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 
2017-10-24 15:54:05 +02:00
Michael Friedrich 68cae91378 Remove bottom-up cluster messages
refs 
2017-09-22 14:04:53 +02:00
Gunnar Beutner 043106242d Remove API stubs for now
refs 
2017-09-12 12:52:49 +02:00
Gunnar Beutner c02742925e Refactor PkiUtility class
refs 
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 
2017-08-28 19:54:26 +02:00
Michael ac0fdd7144 Change more loglines for checkables so checkable is quoted
refs 
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 
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 
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 
2017-05-15 16:32:29 +02:00
Michael Friedrich f282126bb4 Don't allow acknowledgement expire timestamps in the past
fixes 
2017-05-15 10:23:21 +02:00
Michael Friedrich 0f1aa23575 Add target object in cluster error messages to debug log
fixes 
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 
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 

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 
2017-05-03 12:02:19 +02:00
Michael Friedrich dc7980586b Implement severity attribute for host/service objects
refs 
2017-04-13 16:09:31 +02:00
Gunnar Beutner c32badaff5 Add missing base class call for ScheduledDowntime::ValidateRanges()
fixes 
2017-04-06 11:25:40 +02:00
Gunnar Beutner 50310fb5bc Add missing arguments
refs 
2017-03-28 13:24:21 +02:00
Gunnar Beutner 5d45c74be3 Improve function metadata by adding arguments
fixes 
2017-03-27 14:43:19 +02:00
Gunnar Beutner 95093bae3e Move log message
refs 
2017-03-27 11:01:14 +02:00
Gunnar Beutner a73c1580ca Don't try to remove comments that were statically configured
fixes 
2017-03-27 10:46:35 +02:00
Michael Friedrich 60f334df52 Fix notify/sticky parameter handling in 'acknowledge-problem' API action
refs 
2017-02-23 12:30:28 +01:00
Gunnar Beutner 06c2a4088d Ensure that only child processes for checks are reniced
fixes 
2017-02-21 11:31:07 +01:00
Michael Friedrich d4277b4d70 Require that max_check_attempts is greater than 0
fixes 
2017-02-07 13:27:27 +01:00
Michael Friedrich b51a2c1c25 MacroProcessor: Add the argument name for set_if error messages
fixes 
2017-01-11 12:26:09 +01:00
Michael Friedrich b7caf0820d Ensure that *.icinga.com is used everywhere
fixes 
fixes 
2017-01-10 17:19:12 +01:00
Gunnar Beutner 56e9a23a65 Don't try to delete Downtime objects that were statically configured
fixes 
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 
2016-11-17 11:53:35 +01:00
Gunnar Beutner 23e30ccb67 Revert "Implement the 'evaluate-macros' API action"
This reverts commit 851135d3a1.

fixes 
2016-11-17 10:39:27 +01:00
Michael Friedrich 35ce166bd2 Fix that recovery notifications are sent if notified for !Problem type before
fixes 
2016-11-17 10:35:16 +01:00
Michael Friedrich 1bfb91f065 Ensure that DowntimeStart notifications are not immediately sent
fixes 
2016-11-11 19:36:19 +01:00
Michael Friedrich e7a6124924 Fix crash in CheckResult cluster handlers
fixes 
2016-11-11 16:29:51 +01:00
Michael Friedrich 7e0c48643b Fix Flapping{Start,End} notifications in SOFT states or downtimes
fixes 
fixes 
2016-11-10 14:16:02 +01:00
Gunnar Beutner 06e4b4e9da Fix crash in Checkable::OnAllConfigLoaded
fixes 
2016-11-10 13:42:50 +01:00
Gunnar Beutner 851135d3a1 Implement the 'evaluate-macros' API action
fixes 
2016-11-09 09:13:42 +01:00
Michael Friedrich 09658f6d0e Add child_options for API action 'schedule-downtime'
fixes 
fixes 
2016-11-02 09:54:48 +01:00
Michael Friedrich ea1f8727da Implement GetAllChildren() for dependency resolution
refs 
refs 
2016-11-02 08:55:11 +01:00
Michael Friedrich 86f162af85 Add SCHEDULE_AND_PROPAGATE{,_TRIGGERED}_HOST_DOWNTIME external commands
refs 
refs 
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 
2016-10-24 08:38:58 +02:00
Michael Friedrich 3571965fef Fix SOFT/HARD state counting logic for check attempts <= 2
fixes 
2016-09-27 11:30:57 +02:00
Gunnar Beutner 8fd454fbb1 Fix crash in ClusterEvents::SendNotificationsAPIHandler
fixes 
2016-09-13 22:14:11 +02:00
Gunnar Beutner efbdce803f Fix incorrect attribute name on the validator for the Notification class
fixes 
2016-09-04 17:50:44 +02:00
Michael Friedrich ae75575874 Remove unused last_in_downtime field
fixes 
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 
2016-08-28 17:03:08 +02:00
Gunnar Beutner 78cd56e277 Implement support for default templates
fixes 
2016-08-28 10:27:43 +02:00
Gunnar Beutner e8b0797ec4 Use 'auto' keyword for iterator declarations (part 2)
refs 
2016-08-27 19:56:12 +02:00
Gunnar Beutner 8f2477db46 Fix incorrect variable type in the FilterArrayToInt function
refs 
2016-08-27 12:23:09 +02:00
Gunnar Beutner 6e384f81a0 Remove unused #includes
refs 
2016-08-27 10:59:52 +02:00
Gunnar Beutner b5b09216c6 Use lambda functions for INITIALIZE_ONCE
fixes 
2016-08-27 09:48:36 +02:00