Commit graph

2125 commits

Author SHA1 Message Date
Gunnar Beutner
0c2fd8e1d8
Merge pull request #5957 from mcktr/fix/year-2017-reference
Change a bunch more copyright headers for 2018
2018-01-09 04:58:25 +01:00
Michael Insel
6eccdff621 Change a bunch more copyright headers for 2018
This changes more copyright headers for 2018.
2018-01-08 18:05:12 +01:00
Gunnar Beutner
d9010c7b9f Avoid mutex contention in the config parser 2018-01-08 15:59:55 +01:00
Gunnar Beutner
71ee5ac698 Build fix 2018-01-04 12:33:51 +01:00
Gunnar Beutner
f05459b40c Move inline functions to their .cpp files 2018-01-04 12:24:58 +01:00
Gunnar Beutner
91c256261a Apply clang-tidy fix 'modernize-use-default-member-init' 2018-01-04 12:24:58 +01:00
Gunnar Beutner
e0174b8f3f Apply clang-tidy fix 'modernize-return-braced-init-list' 2018-01-04 12:24:57 +01:00
Gunnar Beutner
e0c350b8a5 Apply clang-tidy fix 'modernize-use-nullptr' 2018-01-04 12:24:57 +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
6da7d48d25 Apply clang-tidy fix 'modernize-loop-convert' 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
Gunnar Beutner
6a1ac6a902 Fix incorrect ::Start call 2018-01-03 18:57:01 +01: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
fe8572d75b Remove inline methods and use explicit template instantiation to minimize the number of weak symbols 2018-01-03 11:04:58 +01:00
Gunnar Beutner
abe3f8a959 Build fix for Debian wheezy 2018-01-03 10:32:33 +01:00
Gunnar Beutner
2f953d6204 Implement shim for libmysqlclient and libpq 2018-01-02 23:29:48 +01:00
Gunnar Beutner
90496b5456 Build libraries as static libraries 2018-01-02 23:29:48 +01:00
Michael Friedrich
f843f92ee3
Merge pull request #5928 from Icinga/fix/build-fix-msvc
Fix build problem with MSVC
2018-01-02 14:01:15 +01:00
Michael Friedrich
e08da4267b
Merge pull request #5930 from Icinga/feature/boost-function
Replace boost::function with std::function
2018-01-02 13:46:23 +01:00
Michael Insel
158ae2188e Change copyright header for 2018 2018-01-02 12:08:55 +01:00
Gunnar Beutner
dac71b3960 Replace boost::function with std::function 2018-01-02 08:55:50 +01:00
Gunnar Beutner
6737a0fa8f Make MSVC happy 2018-01-01 09:24:28 +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
Jean Flach
f40f366e9e Remove unnecessary inline statements
fixes #5886
2017-12-20 13:22:38 +01:00
Jean Flach
6d9a0fe3a9 Remove string_iless
It's unused
2017-12-20 11:18:28 +01:00
Gunnar Beutner
02dc3a9507 Workaround for GCC bug 61321 2017-12-20 08:02:17 +01:00
Gunnar Beutner
4866f777cc Avoid unnecessary allocations for script frames 2017-12-18 13:40:29 +01:00
Gunnar Beutner
80b72cfb1c Avoid allocations in ScriptUtils::Match 2017-12-18 13:40:21 +01:00
Michael Friedrich
20d7221dfe
Merge pull request #5865 from Icinga/fix/uuid
Add missing initializer in Utility::NewUniqueID()
2017-12-15 09:08:26 +01:00
Gunnar Beutner
85f3865718
Merge pull request #5861 from Icinga/fix/invalid-memory-access
Fix incorrect memory access
2017-12-15 06:25:10 +01:00
Gunnar Beutner
3403844b74
Merge pull request #5863 from Icinga/fix/glob-5859
Fix glob error handling
2017-12-14 19:08:54 +01:00
Gunnar Beutner
a6887b1ae9 Add missing initializer in Utility::NewUniqueID() 2017-12-14 19:07:14 +01:00
Jean Flach
e45ede6271 Fix glob error handling
fixes #5859
2017-12-14 17:04:35 +01:00
Gunnar Beutner
1ad83886ac Replace a few more NULLs with nullptr 2017-12-14 15:37:20 +01:00
Gunnar Beutner
0629ea0a98 Fix incorrect memory access 2017-12-14 15:05:04 +01:00
Gunnar Beutner
1bf12c9685
Merge pull request #5857 from Icinga/fix/compiler-warnings
Fix compiler warnings
2017-12-14 13:49:25 +01:00
Gunnar Beutner
3c5af89d5f Fix compiler warnings 2017-12-14 09:15:37 +01:00
Gunnar Beutner
ff0b6ba630 Fix build problems with Visual Studio 2017 2017-12-14 08:55:36 +01:00
Gunnar Beutner
42744fde5b Remove extraneous whitespace 2017-12-14 08:50:09 +01:00
Gunnar Beutner
96e214221d Remove unused variables 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
Noah Hilverling
5519626f84 Add metrics about communication between endpoints
refs #5509
2017-12-11 10:20:25 +01:00
Michael Friedrich
a72a7b7c89
Merge pull request #5760 from Icinga/fix/http-client-bugs
Fix incorrect socket handling for the HTTP client
2017-12-08 12:51:50 +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
2e87c280ed Use initializer lists instead of std::vector::push_back 2017-11-30 17:47:09 +01:00
Gunnar Beutner
ebc11d41a5 Tidy up INITIALIZE_ONCE use in console.cpp a bit 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
6739023678 Dynamically create and destroy the timer thread 2017-11-30 17:41:02 +01:00
Gunnar Beutner
6d09efc907 Use std::shared_ptr instead of boost::shared_ptr 2017-11-30 17:41:00 +01:00
Gunnar Beutner
245feca0e7 Move the Timer::Holder class to timer.cpp 2017-11-30 17:39:22 +01:00
Gunnar Beutner
7d7eaa8dd3 Replace boost::thread with std::thread 2017-11-30 17:39:20 +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
Gunnar Beutner
6b3931973e
Merge pull request #5555 from Icinga/feature/ecc-certs
Implement support for ECC certificates
2017-11-27 15:11:04 +01:00
Gunnar Beutner
1b4206e5b1
Merge pull request #5725 from Icinga/feature/proper-uuids
Use real UUIDs for Utility::NewUniqueID
2017-11-27 10:18:52 +01:00
Gunnar Beutner
52692a008e Fix incorrect socket handling for the HTTP client 2017-11-15 09:53:38 +01:00
Noah Hilverling
c10f0a639b RingBuffer: Add CalculateRate()
refs #5750
2017-11-14 11:06:56 +01:00
Noah Hilverling
054faa54d5 Return bytes sent/written in SendMessage() and WriteStringToStream()
refs #5509
2017-11-14 08:18:23 +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
Lee Clemens
9fdfa5ee10 Handle mis-detection with clang on RHEL/CentOS 7
C++11 features available: BOOST_NO_CXX11_HDR_TUPLE

refs #5257
2017-11-08 08:34:45 +01:00
Gunnar Beutner
6f8b62333f Use real UUIDs for Utility::NewUniqueID 2017-11-07 13:53:04 +01:00
Noah Hilverling
3e8f78e2cc Process: Fix fork error handling
refs #5617
2017-10-23 11:01:42 +02:00
Noah Hilverling
7930ae5094 Process: Remove log message from child process 2017-10-23 11:01:16 +02:00
Gunnar Beutner
f2d437e96c Implement support for migrating certificates to /var/lib/icinga2/certs
This commit includes documentation too.

Signed-off-by: Michael Friedrich <michael.friedrich@icinga.com>
2017-10-20 14:06:02 +02:00
Michael Friedrich
9d68ae9f1f Merge pull request #5602 from Icinga/fix/config-validation-fails-on-windows-with-unprivileged-account-5515
Add windows process elevation and log message if user does not have privileges to read/write files
2017-10-13 16:31:12 +02:00
Michael Friedrich
0b1ce7111c Merge pull request #5231 from Al2Klimov/bugfix/failure-to-kill-check-command-after-exceeding-timeout-is-not-reported-4981
Report failure to kill check command after exceeding timeout
2017-10-13 13:57:26 +02:00
Michael Friedrich
9a04a99400 Merge pull request #5554 from Icinga/feature/cn-check-for-san
Add subjectAltName extension for all non-CA certificates
2017-10-10 17:50:01 +02:00
Michael Friedrich
c0a3de64fb Fix match(), regex(), cidr_match() behaviour with MatchAll and empty arrays
fixes #5634
2017-09-29 14:45:15 +02:00
Noah Hilverling
aab50f669c Add process elevation & log message if user does not have enough privileges
refs #5515
2017-09-22 10:25:17 +02:00
Noah Hilverling
ea24af6590 SyslogLogger: Implement option to set syslog facility
fixes #3964
2017-09-20 14:09:51 +02:00
Gunnar Beutner
5179faceab Implement new script functions: path_exists, glob and glob_recursive 2017-09-18 13:59:03 +02:00
Gunnar Beutner
774936bfe8 Implement support for pki::UpdateCertificate messages
refs #5450
2017-09-12 12:52:49 +02:00
Gunnar Beutner
0ec07bce51 Implement support for updating client certificates
refs #5450
2017-09-12 12:52:49 +02:00
Gunnar Beutner
abdd4b307b Implement the 'ca list' and 'ca sign' CLI commands
refs #5450
2017-09-12 12:52:49 +02:00
Gunnar Beutner
510e2d622a Implement support for ticket-less certificate requests
refs #5450
2017-09-12 12:52:49 +02:00
Michael Friedrich
344b047ea0 Move Base64 class into libbase
refs #5538
2017-09-12 12:52:49 +02:00
Gunnar Beutner
10691db5b1 Implement support for ECC certificates 2017-09-06 12:29:30 +02:00
Gunnar Beutner
3385122bc3 Add subjectAltName extension for all non-CA certificates 2017-09-06 12:25:36 +02:00
Michael Friedrich
732a5849d5 Change FIFO::Optimize() frequency for large messages
refs #5513
2017-08-21 11:24:39 +02:00
Noah Hilverling
5b9337e130 Process: Fix JSON parsing error on process helper crash 2017-08-14 08:27:04 +02:00
Gunnar Beutner
c8b4fee843 Make rlimits configurable by adding three variables: RLimitFiles, RLimitProcesses and RLimitStack
refs #5367
2017-06-23 12:42:12 +02:00
Michael Friedrich
6036ec20f5 Build fix for Debian Wheezy
fixes #5350
2017-06-16 16:57:05 +02:00
Gunnar Beutner
f9feb41877 Implement support for handling exceptions in user scripts 2017-06-13 14:03:41 +02:00
Michael Friedrich
79c45ea811 Build fix for OpenSSL 0.9.8 and stack_st_X509_EXTENSION 2017-05-26 13:16:20 +02:00
Michael Friedrich
456cfdc636 Implement WorkQueue metric stats and periodic logging
refs #5133
2017-05-23 16:00:21 +02:00
Michael Friedrich
52d986d02b Revert "Add LogstashWriter feature"
This reverts commit f5a971f5b0.

refs #4054
2017-05-23 12:05:01 +02:00
Michael Friedrich
4c7660190f Revert "Review LogstashWriter feature implementation"
This reverts commit bd5ff814f2.

refs #4054
2017-05-23 12:04:08 +02:00
Gunnar Beutner
fa874e659b Build fix for I2_LEAK_DEBUG 2017-05-22 11:42:47 +02:00
Gunnar Beutner
7130e5e387 Merge pull request #5264 from Icinga/feature/array-match
Implement new array match functionality

fixes #5264 
fixes #5263
2017-05-16 14:22:35 +02:00
Gunnar Beutner
958d3982c5 Add 'mode' argument for match, regex and cidr_match 2017-05-16 13:22:10 +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
Gunnar Beutner
dc9f129060 Implement the Array#any and Array#all protoype functions 2017-05-15 15:59:44 +02:00
Gunnar Beutner
1b77f4b336 Implement the Dictionary#values prototype function 2017-05-15 15:54:48 +02:00
Alexander A. Klimov
8bf3ab0285 Produce an unknown check result if we failed to kill the process
refs #4981
2017-05-12 15:25:22 +02:00
Gunnar Beutner
b366483466 Add subjectAltName X509 ext for certificate requests 2017-05-11 15:38:17 +02:00
Alexander A. Klimov
c45529b407 Report failure to kill check command after exceeding timeout
refs #4981
2017-05-05 17:31:14 +02:00
Gunnar Beutner
f9f3358d09 Make sure all objects are set to 'active' before calling the Start() method
fixes #5224
2017-05-04 10:37:34 +02:00
Jean Flach
7c70d51b27 Add a few extra log messages
fixes #5212
2017-05-02 10:54:06 +02:00
Andreas Scherbaum
775bee8fe1 Replace http:// links with https:// links where a secure website exists
Leave out tests and third party tools, and license strings

fixes #5151

Signed-off-by: Michael Friedrich <michael.friedrich@icinga.com>
2017-04-20 11:33:27 +02:00
Gunnar Beutner
0f81c357c0 Implement source_location attribute for the ConfigObject class
refs #5120
2017-04-19 15:30:11 +02:00
Michael Friedrich
e4ae789a7c Set zone attribute to no_user_modify for API POST requests
fixes #5166
2017-04-12 09:25:28 +02:00
Gunnar Beutner
0c25d14d0c Fix crash in SHA1
refs #4991
2017-03-29 10:17:03 +02:00
Michael Friedrich
0b466aabc0 Start working on checksum config dump
refs #4991
2017-03-29 10:17:03 +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
Michael Friedrich
bd5ff814f2 Review LogstashWriter feature implementation
refs #4054
2017-03-20 14:30:03 +01:00
Kai Goller
f5a971f5b0 Add LogstashWriter feature
This adds the UdpSocket class.

refs #4054
2017-03-20 14:30:03 +01:00
Gunnar Beutner
645e260f9b Make function names available in the API
fixes #5064
2017-03-15 11:18:08 +01:00
Sebastian Marsching
118d36f384 Fixed return code check in CRL loading
The code for loading CRLs was incorrectly assuming that OpenSSL's
X509_LOOKUP_load_file function returns zero on success, but actually it
returns one on success. This commit fixes this return code check so
that a CRL can be loaded.

fixes #5040

Signed-off-by: Gunnar Beutner <gunnar.beutner@icinga.com>
2017-02-28 14:08:24 +01:00
Gunnar Beutner
06c2a4088d Ensure that only child processes for checks are reniced
fixes #4989
2017-02-21 11:31:07 +01:00
Edgar Fuß
1fc6d8c899 Fix for traditional glob(3) behaviour
fixes #4778
2017-02-09 09:08:48 +01:00
Edgar Fuß
7414df4ef8 Fix lsb_release/sw_vers errors on NetBSD
fixes #4779
2017-02-08 17:47:09 +01:00
Michael Friedrich
763fb64fff Update issue tracker to GitHub
fixes #4923
2017-01-17 16:50:22 +01:00
Gunnar Beutner
060e20f5a3 Clean up the patch for the crash issue in the Process class
fixes #13655
2017-01-16 14:15:42 +01:00
Lucas Fairchild-Madar
9fa3f3b122 Fix crash when sending/receiving messages longer than 4 kB to/from the child process for the Process class
refs #13655

Signed-off-by: Michael Friedrich <michael.friedrich@icinga.com>
2017-01-16 14:15:39 +01:00
Gunnar Beutner
751ca67e0a Ignore SIGPIPE earlier in the start-up process
fixes #13567
2017-01-12 10:50:43 +01: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
fb8f4105ad Block SIGPIPE signal for check processes
refs #13567
2016-12-15 11:47:07 +01:00
Gunnar Beutner
78fa197b9f Properly unmask signals for child processes
fixes #13269
2016-11-22 13:53:58 +01:00
Gunnar Beutner
f48e99c710 Fix integer truncation in Convert::ToString
fixes #12995
2016-11-02 08:42:24 +01:00
Gunnar Beutner
c0bc156696 Don't mask all signals in the subprocess handler
fixes #12940
2016-10-24 08:42:40 +02:00
Jean Flach
069de6c121 Don't use InitializeSpawnHelper on Windows
refs #8900
2016-10-05 15:10:43 +02:00
Gunnar Beutner
a7b0cb5f7e Ensure we don't leak file descriptors to child processes
fixes #8900
2016-10-04 14:08:48 +02:00
Gunnar Beutner
0df4b4edfb Fix incorrect #ifdef
fixes #12749
2016-09-28 08:30:47 +02:00
Gunnar Beutner
5960753015 Build fix for Windows
fixes #12614
2016-09-04 16:53:24 +02:00
Gunnar Beutner
58cdce8d7c Improve error handling for event filters
fixes #12621
2016-09-02 08:51:51 +02:00
Gunnar Beutner
b92a139a4c Fix incorrect assignment in String::operator=
refs #12619
2016-09-02 08:14:46 +02:00
Gunnar Beutner
02442ff36f Remove unused Value::GetPtr method
refs #12619
2016-09-01 15:26:25 +02:00
Gunnar Beutner
b5d4d9aba3 Fix move assignment operator for the String class
fixes #12619
2016-09-01 15:25:14 +02:00
Gunnar Beutner
7879c09789 Avoid unnecessary dictionary lookups
refs #12555
2016-09-01 07:41:41 +02:00
Gunnar Beutner
06cb3cf875 Another build fix for Windows
refs #9182
2016-08-31 13:43:50 +02:00
Gunnar Beutner
2729e98c69 Disable Value&& constructor for the String class on Windows
refs #12555
2016-08-31 13:38:55 +02:00
Gunnar Beutner
ba14c6e7ff Build fix for Windows
refs #9182
2016-08-31 13:37:13 +02:00
Gunnar Beutner
54f0cb2c2c Add another rvalue constructor to the String class
refs #12555
2016-08-31 13:27:59 +02:00
Gunnar Beutner
5127a193b4 Avoid unnecessary copies when using Dictionary::Pair in loops
refs #12509
2016-08-30 23:01:54 +02:00
Gunnar Beutner
8c50c6f91f Add context traces to most exceptions
fixes #9182
2016-08-30 20:46:23 +02:00
Gunnar Beutner
68dceaab06 Replace boost::exception_ptr with std::exception_ptr
refs #9182
2016-08-30 20:46:23 +02:00
Gunnar Beutner
dca185a636 Implement support for libcxxabi
refs #9182
2016-08-30 20:46:23 +02:00
Gunnar Beutner
96ee214c57 Add rvalue constructor for the Task class
refs #12555
2016-08-29 09:00:12 +02:00
Gunnar Beutner
f12b52f465 Use lambdas in the ConfigItem class
refs #12509
2016-08-29 08:16:33 +02:00
Gunnar Beutner
78cd56e277 Implement support for default templates
fixes #12575
2016-08-28 10:27:43 +02:00
Gunnar Beutner
ed72112d4b Remove even more unnecessary copies
refs #12509
2016-08-27 20:37:25 +02:00
Gunnar Beutner
ef50c57ed0 Make VS 2013 happy
refs #12555
2016-08-27 20:07:48 +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
eafe4c578d Avoid unnecessary copies for the DebugHint class
refs #12509
2016-08-27 18:43:14 +02:00
Gunnar Beutner
f1cac2f20a Fix compatibility with boost <= 1.53
refs #12555
2016-08-27 12:43:56 +02:00
Gunnar Beutner
27a23fcff6 Avoid an unnecessary case in the Encode function
refs #12509
2016-08-27 12:20:54 +02:00
Gunnar Beutner
00eec13338 Avoid unnecessary string copies in the JSON encoder
refs #12509
2016-08-27 11:47:36 +02:00
Gunnar Beutner
170c3624e3 Use 'default' for move constructors
refs #12555
2016-08-27 11:39:08 +02:00
Gunnar Beutner
7c273d7748 Add another rvalue constructor for the String class
refs #12555
2016-08-27 11:00:04 +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
56ba6089d0 Add rvalue support for the Array and Dictionary classes
refs #12555
2016-08-27 07:42:28 +02:00
Gunnar Beutner
c1a58446af Add another rvalue constructor for the Value class
refs #12555
2016-08-26 18:11:28 +02:00
Gunnar Beutner
4f46e59af3 Implement an rvalue constructor for the String and Value classes
fixes #12555
2016-08-26 09:11:36 +02:00
Gunnar Beutner
49a130242c Add missing #include in loader.cpp
refs #12552
2016-08-25 20:59:22 +02:00
Gunnar Beutner
30762e5330 Set versions for all internal libraries
fixes #12552
2016-08-25 17:56:18 +02:00
Gunnar Beutner
092f2ee099 Add missing initializer for WorkQueue::m_NextTaskID
fixes #12545
2016-08-25 11:57:00 +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
218e780a44 Avoid unnecessary string copies
fixes #12509
2016-08-23 15:01:40 +02:00
Gunnar Beutner
aeaca5e803 Revert "Fix incorrect detection of the 'Concurrency' variable"
This reverts commit 585f0537d2.

refs #12456
2016-08-19 11:58:52 +02:00
Gunnar Beutner
27e6db6af6 Remove some unused #includes
fixes #12481
2016-08-18 15:46:01 +02:00
Gunnar Beutner
62a6d5667d Fix: IDO marks objects as inactive on shutdown
fixes #12418
2016-08-17 19:24:22 +02:00
Gunnar Beutner
585f0537d2 Fix incorrect detection of the 'Concurrency' variable
fixes #12456
2016-08-17 09:20:05 +02:00
Rune Darrud
5c0b3c58bd Do not escape backslashes and separators twice
fixes #12227

Signed-off-by: Gunnar Beutner <gunnar.beutner@netways.de>
2016-08-17 06:10:41 +02:00
Gunnar Beutner
162e31b083 Remove unnecessary Dictionary::Contains calls
fixes #12457
2016-08-16 22:03:42 +02:00
Gunnar Beutner
ec87b9e795 Use hash-based serial numbers for new certificates
fixes #12453
2016-08-16 15:03:01 +02:00
Gunnar Beutner
2d551db9d8 Remove the ConfigTypeIterator class
refs #12448
2016-08-16 13:26:24 +02:00
Gunnar Beutner
b7a1b58069 Improve performance for type lookups
fixes #12448
2016-08-16 11:02:33 +02:00
Gunnar Beutner
2e8d3d3934 Implement support for incremental IDO updates
fixes #12435
2016-08-15 14:43:11 +02:00
Gunnar Beutner
ebaf239d3b Replace GetType()->GetName() calls with GetReflectionType()->GetName()
fixes #12438
2016-08-15 14:42:03 +02:00
Gunnar Beutner
6af9e61e9b Implement comparison operators for the Array class
fixes #12426
2016-08-14 17:21:47 +02:00
Gunnar Beutner
ed53366490 Avoid duplicate IDO config updates at startup
fixes #12417
2016-08-13 23:31:22 +02:00
Gunnar Beutner
afc1b9bdc5 Move type variables into the 'Types' namespace
refs #12408
2016-08-12 17:05:19 +02:00
Gunnar Beutner
91577713fd Fix incorrect function name for deprecated functions
refs #12408
2016-08-12 15:41:03 +02:00
Gunnar Beutner
b74014fa5e Fix auto-completion suggestions for "icinga2 console"
refs #12408
2016-08-12 15:36:47 +02:00
Gunnar Beutner
12ea2a6445 Implement the System#sleep function
fixes #12411
2016-08-12 15:22:10 +02:00
Gunnar Beutner
491acb62ea Fix crash in ScriptFrame::AddImport
refs #12408
2016-08-12 15:22:10 +02:00
Gunnar Beutner
c6a753b67e Make sure base classes are registered in the right order
refs #12408
2016-08-12 14:18:59 +02:00
Gunnar Beutner
24431b3dab Register deprecated methods in the 'Deprecated' namespace
refs #12408
2016-08-12 13:42:22 +02:00
Gunnar Beutner
2a40a71ffa Change scoping mechanism for the __using keyword
refs #12408
2016-08-12 13:14:10 +02:00
Gunnar Beutner
9f67b185b8 Make sure all constructors properly initialize the ScriptFrame object
refs #12408
2016-08-12 11:42:59 +02:00
Gunnar Beutner
c5a170a972 Implement support for namespaces
fixes #12408
2016-08-12 11:32:16 +02:00
Gunnar Beutner
132ee6c558 Use InterlockedIncrement instead of a mutex in CreatePipeOverlapped
refs #10075
2016-08-11 09:48:01 +02:00
Gunnar Beutner
e09fb88cae Make sure functions are registered with the correct prefix
refs #12393
2016-08-10 16:33:17 +02:00
Gunnar Beutner
54bbaf9f7d Implement support for marking functions as deprecated
fixes #12393
2016-08-10 15:48:05 +02:00
Timo Buhrmester
148b4da285 Don't violate POSIX by ensuring that the argument to usleep(3) is less than 1000000
fixes #12391

Signed-off-by: Gunnar Beutner <gunnar.beutner@netways.de>
2016-08-10 12:29:52 +02:00
Gunnar Beutner
37bd5ad800 Fix race condition in CreatePipeOverlapped
fixes #10075
2016-08-10 12:12:56 +02:00
Gunnar Beutner
39bde8078c Disallow casting "" to an Object
fixes #12390
2016-08-10 11:14:33 +02:00
Gunnar Beutner
e8ae1dc4a6 Include compiler name/version and build host name in --version
fixes #12389
2016-08-10 08:09:44 +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
f3bb628d6e Improve logging for the WorkQueue class
fixes #12336
2016-08-09 12:39:07 +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
ff293661fc Rename/Remove experimental script functions
fixes #12332
2016-08-09 10:43:55 +02:00
Gunnar Beutner
9f425cdcaf Fix building Icinga with -fvisibility=hidden
fixes #12331
2016-08-09 09:00:19 +02:00
Gunnar Beutner
231fd8d38b Build fix for CentOS 5
refs #11292
2016-08-08 15:27:16 +02:00
Gunnar Beutner
8deeb73bb8 Register a new script frame in Function::Invoke
fixes #9848
2016-08-08 14:12:08 +02:00
Uwe Ebel
b2ac05ad7d Make the minimum TLS protocol version configurable
The ApiListener accepts all TLS versions that the underlying
OpenSSL library supports. This patch give the ability to restrict
the connection to a minimum TLS version.

fixes #11292

Signed-off-by: Gunnar Beutner <gunnar.beutner@netways.de>
2016-08-03 07:46:50 +02:00
Gunnar Beutner
546bdbcf6a 'Sandboxed' property isn't properly propagated to child frames
refs #12247
2016-07-29 14:11:52 +02:00
Gunnar Beutner
ee75094128 Change how Array#reduce works
refs #12247
2016-07-29 11:09:46 +02:00
Gunnar Beutner
a3815e4efd Add map/reduce and filter functionality for the Array class
fixes #12247
2016-07-29 10:48:15 +02:00
Gunnar Beutner
cdda3bad8c Include client IP address and port in HTTP requests
fixes #11706
2016-07-25 09:43:13 +02:00
Stephan Tesch
431c110056 Improve error reporting for the client certificate check
Until now, client certificates that have failed verification were reported as not being signed by the CA. That is not true for all cases. This patch adds an explanation in the debug log why verification failed.

fixes #12201
2016-07-25 09:22:35 +02:00
Gunnar Beutner
caf2812f0d Implement the __ptr function
fixes #12205
2016-07-22 09:43:59 +02:00
Michael Friedrich
e712d6ffe7 Fix error message for specified ciphers
refs #11063
2016-07-19 20:13:34 +02:00
Uwe Ebel
1ca8b293cb Make the cipher list configurable for TLS streams
fixes #11063

Signed-off-by: Gunnar Beutner <gunnar.beutner@netways.de>
2016-07-18 13:40:00 +02:00
Gunnar Beutner
60c52f2109 Fix crash on Windows
fixes #11730
2016-07-12 15:33:44 +02:00
Michael Friedrich
915ebe17cd ConfigCompiler should not log included files by default
fixes #11419
2016-07-05 15:43:48 +02:00
Michael Friedrich
9b873d60c2 Ensure to clear the SSL error queue before calling SSL_{read,write,do_handshake}
fixes #12100
2016-07-05 15:25:02 +02:00
Michael Friedrich
85afec8952 Fix setsockopt() error on Windows
refs #12003
2016-07-05 13:16:14 +02:00
Gunnar Beutner
6de6ea5e42 Build fix for OpenSSL 1.1.0
fixes #12044
2016-06-27 08:28:22 +02:00
Gunnar Beutner
428850a6b3 Fix: ConfigWriter::EmitScope incorrectly quotes dictionary keys
fixes #12016
2016-06-22 12:35:47 +02:00
Simon Murray
e3645aa2f7 Fix hanging API connections
There was a problem identified where an upstream API connection was found hanging waiting
for a TLS handshake to complete.  Seeingly the TCP connection was ESTABLISHED locally but
not cleanly terminated remotely.  The Socket events layer never triggered the TLS handshake
oddly.  This however enables TCP keep alive packets to detect broken connections, raising
EPOLLERR and breaking the deadlock condition so that the agent will attempt to reconnect
at a later time.

fixes #12003

Signed-off-by: Gunnar Beutner <gunnar.beutner@netways.de>
2016-06-22 09:25:00 +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
039461e218 Fix unit tests for Convert::ToString
refs #11483
2016-06-16 15:32:29 +02:00
Gunnar Beutner
bc6f7d7a21 Fix incorrect formatting for some macro values
fixes #11483
2016-06-16 15:14:35 +02:00
Gunnar Beutner
ff57b0ccd6 Add name attribute for the WorkQueue class
fixes #10816
2016-06-14 09:08:04 +02:00
Markus Frosch
a5abe1a972 Allow debugging of Utility::GetTime
So we can run unit tests that expect a certain behavior based on time.

When Icinga 2 is compiled with I2_DEBUG one can use Utility::SetTime to
override the current system time, and lock it to this value.

fixes #11875
2016-06-09 14:25:51 +02:00
Gunnar Beutner
bc12d6c0d6 Fix race condition in ConfigObject::SetAuthority
fixes #11784
2016-05-12 14:06:28 +02:00
Gunnar Beutner
1ad4d9cd27 Report failed reload attempts for the icinga check
fixes #9060
fixes #9997
fixes #11129
2016-05-11 16:07:28 +02:00
Gunnar Beutner
fc1168ed3e Only activate HARunOnce objects once there's a cluster connection
fixes #11765
2016-05-11 12:50:40 +02:00
Gunnar Beutner
2adfcb56fe Improve error handling for TlsStream::Handshake
fixes #11046
2016-05-11 10:09:54 +02:00
Gunnar Beutner
eab2fb79ad Fix crash in UnameHelper()
fixes #11714
2016-05-10 09:46:48 +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
Gunnar Beutner
8b7d59eb34 Implement support for subjectAltName in SSL certificates
fixes #11556
2016-04-21 15:25:57 +02:00
Gunnar Beutner
2d55cf1341 Implement validation for the Logger#severity attribute
fixes #11646
2016-04-21 13:50:47 +02:00
Gunnar Beutner
22cf939086 Build fix for Windows
refs #11612
2016-04-19 14:48:13 +02:00
Gunnar Beutner
d2cd4b6667 Improve performance for locks and value conversions
refs #11612
2016-04-19 09:38:22 +02:00
Gunnar Beutner
ab95670833 Build fix for older boost versions
refs #11612
2016-04-18 17:21:45 +02:00
Gunnar Beutner
3008d5ef31 Improve performance for field accesses
fixes #11612
2016-04-18 17:05:22 +02:00
Gunnar Beutner
955df528d7 Fix error message for the EventEngine variable
refs #11522
2016-04-18 15:02:02 +02:00
Gunnar Beutner
d8b0502d67 Make the socket event engine configurable
fixes #11522
2016-04-18 14:38:59 +02:00
Gunnar Beutner
327d12295c Implement support for upgrading NSIS-based installations
refs #11449
2016-04-01 08:42:58 +02:00
Gunnar Beutner
6bf3225e84 Implement support for running custom install/uninstall actions
refs #11449
2016-03-31 14:53:54 +02:00
Gunnar Beutner
112f024810 Build fix for GCC
refs #9839
2016-03-29 14:52:48 +02:00
Michael Friedrich
5dd685cef9 Fix socket exceptions while querying the API
fixes #11224
2016-03-29 13:52:37 +02:00
Gunnar Beutner
eb0892273e Implement the DateTime class
fixes #9839
2016-03-29 13:27:20 +02:00
Gunnar Beutner
016f47d6e6 Fix Utility::MkDirP on Windows
fixes #11455
2016-03-29 09:44:05 +02:00
Gunnar Beutner
796884343b Another build fix for Win64
refs #11462
2016-03-29 08:42:02 +02:00
Gunnar Beutner
b863a84471 Build fix for Win64
refs #11462
2016-03-29 07:54:41 +02:00
Gunnar Beutner
6ba0c5fe01 Implement recursion limit for AST expressions which don't use a separate stack frame
fixes #11106
2016-03-23 09:03:49 +01:00
Gunnar Beutner
71060be89a Follow symlinks in Utility::GlobRecursive
fixes #11347
2016-03-22 08:22:11 +01:00
Michael Friedrich
65cbf04454 Fix: MkDirP supports '/' and '\' on Windows
fixes #10231
2016-03-07 09:22:07 +01:00
Tobias von der Krone
ce3062904f Use the server's preferred cipher for the API connection
When using SSL_OP_CIPHER_SERVER_PREFERENCE the server's preferred cipher
is used instead of the client preference, see
https://www.openssl.org/docs/manmaster/ssl/SSL_CTX_set_options.html

fixes #11290
2016-03-04 14:57:06 +01:00
Michael Friedrich
d14477c242 Fix MkDirP() on Windows
fixes #10231
2016-03-03 15:54:35 +01:00
Gunnar Beutner
47521904c1 Attempt to fix race condition problem with epoll_ctl()
refs #11289
2016-03-03 13:38:13 +01:00
Michael Friedrich
47c5425137 Fix permissions for temporary files
fixes #11212
fixes #11211
2016-02-24 11:00:44 +01:00
Michael Friedrich
4cb5b97e52 Fix unique creation of temp files
fixes #10948
2016-02-23 12:30:59 +01:00
Gunnar Beutner
bc6d82c560 Build fix for CentOS 5
fixes #11179
2016-02-22 08:12:35 +01:00
Gunnar Beutner
9a8458fd67 Rename the IOTHREADS macro
refs #11014
2016-02-16 13:30:55 +01:00
Jean Flach
58a31e8166 Use ConfigWriter class in repositoryutility.cpp
refs #10989
2016-02-09 15:59:19 +01:00
Jean Flach
fa1d633484 Rephrase some log messages
refs #11122
2016-02-09 15:59:19 +01:00
Gunnar Beutner
674badd3ce Build fix
fixes #11096
2016-02-09 13:56:17 +01:00
Gunnar Beutner
9e7da9837e Revert "Windows build fix"
This reverts commit f06f6d4d86.
2016-02-09 13:54:19 +01:00
Jean Flach
4d87c96d06 Refactor String-Escape in repositoryutility
fixes #10989
2016-02-09 09:38:12 +01:00
Jean Flach
393a6bf641 Remove unused variables
fixes #11111
2016-02-08 17:10:12 +01:00
Michael Friedrich
f06f6d4d86 Windows build fix
fixes #11096
2016-02-05 10:55:16 +01:00
Gunnar Beutner
611ff869e1 Implement support for epoll
refs #11014
2016-02-04 16:31:59 +01:00
Gunnar Beutner
caf3380e73 Fix memory leak in Stream::Close
refs #10655
2016-02-03 13:02:49 +01:00
Gunnar Beutner
2dc385e31b Fix memory/thread leak in the HttpServerConnection class
fixes #10655
2016-02-03 09:54:31 +01:00
Gunnar Beutner
fabf37e79c Improve performance for TlsStream::OnEvent
refs #11014
2016-02-02 13:51:17 +01:00
Gunnar Beutner
532655d482 Use multiple threads for socket IO
refs #11014
2016-02-02 11:17:33 +01:00
Gunnar Beutner
3f95e86c73 Remove debug log message
refs #11014
2016-02-02 09:54:31 +01:00
Gunnar Beutner
ecfaf019fd Avoid unnecessary pollfd updates
refs #11014
2016-02-02 09:52:23 +01:00
Gunnar Beutner
83889dcbb0 Increase the buffer size in TlsStream::OnEvent to avoid unnecessary poll() calls
refs #11014
2016-02-02 08:28:54 +01:00
Gunnar Beutner
e6a972f975 Fix incorrect memcpy() with overlapping buffers
refs #11014
2016-02-01 12:58:42 +01:00
Gunnar Beutner
c03e458e13 Avoid unnecessary new/deletes
refs #11014
2016-02-01 09:33:33 +01:00
Gunnar Beutner
6fc91a38eb Avoid unnecessary reallocs in FIFO::Optimize
refs #11014
2016-01-28 13:09:17 +01:00
Gunnar Beutner
56e7c24f1f Avoid unnecessary dictionary lookups in SocketEvents::ThreadProc
refs #11014
2016-01-28 13:07:09 +01:00
Gunnar Beutner
fe421d76fb Remove debug output
refs #11014
2016-01-28 12:23:07 +01:00
Gunnar Beutner
4237c6eaaa Avoid unnecessary wake-ups in SocketEvents::ChangeEvents (part 2)
refs #11014
2016-01-28 11:55:31 +01:00
Gunnar Beutner
75f7fe10e1 Avoid unnecessary wake-ups in SocketEvents::ChangeEvents
refs #11014
2016-01-28 09:05:49 +01:00
Gunnar Beutner
3c76e70fe2 Avoid updating the file descriptor list for poll() unless we really need to
refs #11014
2016-01-28 08:24:33 +01:00
Michael Friedrich
22c21ebd61 Implement String#trim
fixes #11037
2016-01-26 16:01:14 +01:00
Michael Friedrich
627814b8e7 Fix incorrect --version information
fixes #10784
2016-01-26 15:17:48 +01:00
Gunnar Beutner
23edd6cb8f Add missing comment
refs #10988
2016-01-26 08:35:29 +01:00
Michael Friedrich
a4562fb433 Only set SSL_OP_NO_COMPRESSION if supported
OpenSSL 0.9.8 does not support this flag.

fixes #10988
2016-01-25 14:53:26 +01:00
Tobias von der Krone
1c67bf394c Support TLSv1.1 and TLSv1.2 for the cluster transport encryption
From https://wiki.openssl.org/index.php/SSL/TLS_Client:
SSLv23_method specifies the protocols used and behavior of the handshake.
The method essentially means SSLv2 or above, and includes the TLS protocols.
The protocols are further tuned through SSL/TLS options. By using
SSLv23_method (and removing the SSL protocols with SSL_OP_NO_SSLv2 and
SSL_OP_NO_SSLv3), then you will use TLS v1.0 and above, including TLS v1.2.
You will also use a TLS handshake in the TLS Record.

If you use TLSv1_method, then you will only use TLS v1.0.

fixes #10988
2016-01-20 16:48:00 +01:00
Gunnar Beutner
db0c6ef187 Only build leak detection code when I2_LEAK_DEBUG is set
refs #10963
2016-01-19 16:43:46 +01:00
Gunnar Beutner
e4b7111577 Check the certificate name when reconnecting to an instance
refs #10963
2016-01-19 16:24:12 +01:00
Gunnar Beutner
b1aa6cc98a Decrease memory usage for the Object class
refs #10963
2016-01-19 16:24:07 +01:00
Gunnar Beutner
d50c8e1085 Improve debug support for analyzing memory leaks
refs #10963
2016-01-19 15:24:17 +01:00
Jean Flach
cb70d97dcf Plug two memory leaks
refs #10963
2016-01-15 10:11:52 +01:00
Gunnar Beutner
7f4af89a56 Ensure that HttpServerConnections are properly closed
fixes #10655
2016-01-13 10:30:38 +01:00
Gunnar Beutner
599929b0f6 Update copyright headers for 2016 2016-01-12 08:29:59 +01:00
Michael Friedrich
da3d21091c Fix priority ordering for IDO queries
fixes #10829
refs #8714
2015-12-15 11:58:50 +01:00
Gunnar Beutner
15ca9987fa Implement support for priorities in the WorkQueue class
fixes #8714
2015-12-10 17:06:00 +01:00
Gunnar Beutner
fba0b493cd Make sure that all strings in the IDO database are UTF8-encoded
fixes #10554
2015-12-10 12:26:19 +01:00
Michael Friedrich
407a7502ae Fix crash on startup with incorrect directory permissions
fixes #10739
2015-12-08 15:12:13 +01:00
Michael Friedrich
2a5a9d2f4b Fix missing path in mkdir() exception
fixes #10748
2015-11-30 10:37:57 +01:00
Gunnar Beutner
3916ef0904 Build fix for Windows
refs #10693
2015-11-26 11:18:05 +01:00
Gunnar Beutner
b76fee5b98 Use the ZoneName and NodeName constants for 'node setup' and 'node wizard'
refs #10716
2015-11-25 17:43:12 +01:00
Michael Friedrich
3adedcd0a5 Improve performance for Zone::CanAccessObject
fixes #10711
2015-11-25 12:06:20 +01:00
Gunnar Beutner
9705e08ee0 Build fix for systems where strsignal() returns a const char * 2015-11-24 14:45:30 +01:00
Gunnar Beutner
2320f7a32a Implement Platform* global variables
refs #10693
2015-11-23 13:10:25 +01:00
Gunnar Beutner
af441191f3 Fix crash in Process::IOThreadProc when building Icinga 2 with GCC 4.7.2
fixes #10648
2015-11-17 22:07:40 +01:00
Gunnar Beutner
7d8c8aac5a Use notify_one in WorkQueue::Enqueue
fixes #10639
2015-11-16 08:13:55 +01:00
Gunnar Beutner
eb67f3779f Fix incorrect error messages on Windows
fixes #10637
2015-11-15 21:18:27 +01:00
Michael Friedrich
545607be9f Fix that custom attribute with function value cannot be cloned
fixes #10583
2015-11-11 14:18:25 +01:00
Gunnar Beutner
e3c75faabc Implement support for recursive object locks
fixes #10596
2015-11-11 10:21:30 +01:00
Gunnar Beutner
2d2e7ecdb2 Improve location information for exceptions
fixes #10568
2015-11-10 17:05:40 +01:00
Gunnar Beutner
1667fbaf31 Build fix for Windows 2015-11-10 13:09:34 +01:00
Gunnar Beutner
0a6505ce2d Use poll() for the command pipe fd
refs #10410
2015-11-10 11:41:21 +01:00
Gunnar Beutner
2cc33b7fb3 Don't validate arguments/parameters that aren't strings
refs #10539
2015-11-10 07:59:10 +01:00
Gunnar Beutner
9ea51aa86e Use non-blocking open() for the command pipe
fixes #10410
2015-11-09 20:39:26 +01:00
Gunnar Beutner
5a74f69819 Fix memory leak for JSON-RPC/HTTP connections
fixes #10517
2015-11-09 10:22:52 +01:00
Gunnar Beutner
7621870278 Implement a debugger for Icinga scripts
fixes #10547
2015-11-05 14:29:45 +01:00
Gunnar Beutner
645f054980 Fix invalid field IDs in Type::GetField
refs #10387
2015-11-05 10:58:09 +01:00
Gunnar Beutner
783b58536f Fix 'Invalid field ID' error when serializing Type objects
refs #10387
2015-11-05 10:52:25 +01:00
Gunnar Beutner
701961b73b Fix the 'type' attribute for the Object class
refs #10387
2015-11-05 10:29:02 +01:00
Gunnar Beutner
a3fd33f8a1 Fix race condition in ConfigWriter::EmitIdentifier
fixes #10538
2015-11-04 19:05:47 +01:00
Gunnar Beutner
fe1c5e9507 Improve formatting for arrays
refs #10527
2015-11-04 17:06:33 +01:00
Gunnar Beutner
7378964f31 Fix indentation for nested dictionaries
refs #10527
2015-11-04 16:42:19 +01:00
Michael Friedrich
5d46f661ea Implement 'console' cli command using the API
fixes #10387
2015-11-04 16:01:06 +01:00
Gunnar Beutner
a51bc4010a Fix indentation for Dictionary::ToString
fixes #10527
2015-11-04 08:44:56 +01:00
Gunnar Beutner
51f473d08a Implement the current_filename and current_line keywords
fixes #10243
2015-11-03 16:34:34 +01:00
Gunnar Beutner
ae23e456a6 Fix race condition in ConfigWriter::GetKeywords
fixes #10518
2015-11-03 09:46:45 +01:00
Gunnar Beutner
ed90d9a847 Fix race condition in CreatePipeOverlapped
fixes #10510
2015-11-01 12:59:57 +01:00
Gunnar Beutner
b2829ca522 Fix plural name for the Array type
fixes #10501
2015-11-01 10:35:31 +01:00
Gunnar Beutner
050c520b2a Convert Comment/Downtime to config objects
fixes #9777
2015-10-28 17:56:29 +01:00
Gunnar Beutner
dd77863910 Implement Array::ToString and Dictionary::ToString
fixes #10329
2015-10-26 11:05:24 +01:00
Gunnar Beutner
fd2cd7a3a5 Use operator[] instead of insert() for Dictionary::Set
refs #10428
2015-10-23 06:19:46 +02:00
Michael Friedrich
d516d16c9a Fix restore_attribute not working in clusters
fixes #10386
2015-10-22 14:50:43 +02:00
Michael Friedrich
286538c17e Implement api event streams
Documentation is not yet complete.

refs #9078
2015-10-21 15:34:26 +02:00
Gunnar Beutner
e93dd3cf15 Ensure that the main thread pool gets re-initialized properly after fork()
refs #10410
2015-10-21 09:18:52 +02:00
Gunnar Beutner
d01f09f3ef Hide internal attributes in the API
fixes #10393
2015-10-20 08:25:10 +02:00
Gunnar Beutner
5aa91551a5 Improve validation for CIDR masks
fixes #10375
2015-10-19 10:40:48 +02:00
Michael Friedrich
ed00ab04c7 Fix OSX control sequence
refs #9095
2015-10-16 13:46:43 +02:00
Michael Friedrich
6cc4f85c66 Disallow modify attribute for certain object attributes
fixes #9095
2015-10-16 12:44:08 +02:00
Gunnar Beutner
74aa5c1d6b Make sure that the 'version' attribute is updated when config attributes are changed
fixes #10355
2015-10-14 13:04:39 +02:00
Thomas Gelf
29188a4a10 Improve error handling in cidr_match function
refs #10354

Signed-off-by: Gunnar Beutner <gunnar@beutner.name>
2015-10-14 12:23:59 +02:00
Gunnar Beutner
06a0f182a5 Implement the cidr_match function
fixes #10354
2015-10-14 10:14:01 +02:00
Gunnar Beutner
e92b7beeb4 Fix parsing performance data labels which contain '='
fixes #10254
2015-10-13 09:38:31 +02:00
Gunnar Beutner
2484016c54 Fix crash in RepositoryUtility::AddObject
fixes #10326
2015-10-13 09:15:06 +02:00
Michael Friedrich
f0a5a0c23c Fix openssl certificate not after overflow on rhel5
refs #10266
2015-10-02 12:11:21 +02:00
Gunnar Beutner
124d3f71f7 Change field type for ConfigObject::version to double
refs #10257
2015-10-01 04:49:35 +02:00
Gunnar Beutner
55616209ae Only update version when config attributes are changed
refs #10257
2015-10-01 04:45:50 +02:00
Michael Friedrich
9dcb33e8f4 Change object version to timestamps for diff updates on config sync
fixes #10257
2015-09-30 16:58:18 +02:00
Gunnar Beutner
08ccb4e323 Build fix
refs #10245
2015-09-30 11:05:20 +02:00
Gunnar Beutner
254c076dd4 Fix incorrectly escaped arguments for CreateProcess
fixes #10245
2015-09-30 10:56:31 +02:00
Gunnar Beutner
0e40c3ee1d Fix deadlock in TlsStream::Close
fixes #10235
2015-09-29 10:31:16 +02:00
Jean-Marcel Flach
4ef9761fee Implement status api handler
Global statistics, features, etc.

fixes #10116
2015-09-23 16:59:07 +02:00
Michael Friedrich
84536da221 Implement global modified attributes for the IcingaApplication class
fixes #9859
2015-09-23 15:02:53 +02:00
Michael Friedrich
12cf90c67c Fix persisting and restoring modified attributes for custom attribute indexers
fixes #9935
fixes #9968
2015-09-23 13:29:30 +02:00
Gunnar Beutner
ff59402a10 Remove unnecessary check in Value::IsObject
refs #10199
2015-09-23 10:48:49 +02:00
Gunnar Beutner
c15c9cce5e Detect infinite recursion in user scripts
fixes #10198
2015-09-23 09:21:45 +02:00
Gunnar Beutner
eeb01831c0 Implement the Array#reverse and String#reverse methods
fixes #10197
2015-09-23 09:06:15 +02:00
Gunnar Beutner
48bdd0ebf4 Fix: null + null should not be ""
fixes #10192
2015-09-22 13:13:38 +02:00
Gunnar Beutner
1a6b41787a Implement joins for status queries
fixes #10060
2015-09-22 09:45:23 +02:00
Michael Friedrich
95bcbec5b5 Implement support for restoring modified attributes
Also fix a glitch with ModifyAttribute and original_attributes
storage.

fixes #9935
2015-09-18 15:01:44 +02:00
Michael Friedrich
f7b5aa33ce Fix a couple of wrong white spaces 2015-09-18 13:04:09 +02:00
Michael Friedrich
b2715943c6 Config Sync: Properly modify attributes and object version
refs #9927
2015-09-17 14:20:44 +02:00
Gunnar Beutner
6fa58a520c Implement config object sync
Adds object version.

refs #9927
2015-09-17 14:20:43 +02:00
Michael Friedrich
9a2ae6e58f Fix missing zero padding for generated CA serial
fixes #10074
2015-09-03 17:12:01 +02:00
Gunnar Beutner
35acba7dc1 Remove default WQ limits
refs #10002
2015-09-02 09:16:20 +02:00
Michael Friedrich
da83bae660 Rename config/modules to config/packages
fixes #9953
2015-09-01 20:09:04 +02:00
Gunnar Beutner
c37a23ccba Implement the Icinga Studio application
fixes #10042
2015-08-31 07:50:01 +02:00
Jean Flach
f1a1dfb26e Update use of String::Trim()
fixes #9704
2015-08-27 18:06:20 +02:00
Jean Flach
5bbc8cacbd Add String ToLower, ToUpper, change Trim
fixes #9704 #9944
2015-08-27 17:18:21 +02:00
Gunnar Beutner
373b88df33 Implement the escape_shell_arg and escape_shell_cmd functions
fixes #10004
2015-08-27 09:02:21 +02:00
Jean Flach
73d8ffb462 Fix range() with negative increments
fixes #9999
2015-08-26 16:38:26 +02:00
Gunnar Beutner
3afe9a35d8 Implement the 'name' field for types
refs #9076
2015-08-26 13:05:09 +02:00
Gunnar Beutner
3ea71e82c5 Fix incorrect field type for the Type.base field
refs #9076
2015-08-26 11:00:05 +02:00
Gunnar Beutner
ae214db0fc Change base type for 'Type' to 'Object'
refs #9076
2015-08-26 10:58:03 +02:00
Gunnar Beutner
f45f6ccd82 Implement support for tracking dependencies between config objects
refs #9096
2015-08-25 13:54:05 +02:00
Michael Friedrich
7eca257784 Fix return value of Utility::MkDir/MkDirP
None as there are exceptions thrown.

fixes #9689
2015-08-24 15:11:49 +02:00
Gunnar Beutner
b43a3135cc Fix: Utility::Glob on Windows doesn't support wildcards in all but the last path component
fixes #9962
2015-08-19 07:54:06 +02:00
Gunnar Beutner
5a72eaa768 Make sure the serial number field is always initialized
fixes #9947
2015-08-18 15:05:53 +02:00
Gunnar Beutner
d8cab2f0e8 Add 'override' keyword to methods
refs #9929
2015-08-18 12:45:30 +02:00
Gunnar Beutner
d118b71a2a Fix compiler warnings
fixes #9929
2015-08-18 07:46:04 +02:00
Michael Friedrich
0f5287c2b1 Add module attribute for ConfigObject and set its origin
fixes #9852
2015-08-17 16:08:57 +02:00
Michael Friedrich
13b5acec90 Implement support for . in modify_attribute
fixes #9852
2015-08-17 14:55:51 +02:00
Michael Friedrich
428be72bab Implement Object#clone and rename Array/Dictionary#clone to shallow_clone
fixes #9931
2015-08-17 13:59:49 +02:00
Gunnar Beutner
7d6a920b3d Build fix 2015-08-17 11:20:52 +02:00
Gunnar Beutner
ff974d4eee Fix compiler warnings
refs #9081
2015-08-17 10:09:15 +02:00
Gunnar Beutner
db8b4afa58 Fix incorrect base class name for Array/Dictionary/etc.
refs #9921
2015-08-17 08:14:04 +02:00
Gunnar Beutner
9ecfd9c830 Allow comments in JSON
fixes #9919
2015-08-17 08:03:25 +02:00
Gunnar Beutner
a546a67934 Implement the 'base' field for the Type class
fixes #9921
2015-08-17 07:59:44 +02:00
Gunnar Beutner
071d2f18fb Rename DynamicObject/DynamicType to ConfigObject/ConfigType
fixes #9914
2015-08-15 20:40:41 +02:00
Gunnar Beutner
e2290d5012 Implement support for unregistering objects
refs #9101
2015-08-15 20:07:11 +02:00
Gunnar Beutner
f405a26052 Implement validation for modified attributes 2015-08-15 20:07:11 +02:00
Gunnar Beutner
3d78870339 Implement support for modified attributes in the API
refs #9081
2015-08-15 20:07:11 +02:00
Gunnar Beutner
a092c13ace Implement support for persisting modified attributes
fixes #9093
2015-08-15 20:07:10 +02:00
Michael Friedrich
d7970f5bb1 Implement modified attributes v2
refs #9081
refs #9093
2015-08-15 20:07:10 +02:00
Gunnar Beutner
d30d1d4dda Implement the Dictionary#keys method
fixes #9882
2015-08-11 13:58:29 +02:00
Gunnar Beutner
930dc603af Build fix for Windows 2015-08-10 15:38:45 +02:00
Gunnar Beutner
7890e20da7 Implement reload functionality for Windows
fixes #7880
2015-08-10 15:28:31 +02:00
Gunnar Beutner
f541a62a34 Fix: Make sure we're continuously reading from child processes' pipes
fixes #9867
2015-08-10 15:28:30 +02:00
Gunnar Beutner
8f3396ae0d Implement support for attaching GDB to the Icinga process on crash
fixes #9866
2015-08-08 09:41:39 +02:00
Gunnar Beutner
276f491762 Fix: Operator + is inconsistent when used with empty and non-empty strings
fixes #9806
2015-08-01 04:38:12 +02:00
Gunnar Beutner
1314cba61b Implement Dictionary#get and Array#get
fixes #9796
2015-07-30 20:58:52 +02:00
Gunnar Beutner
9d098482dd Fix: Operator - should not work with "" and numbers
fixes #9793
2015-07-30 20:01:08 +02:00
Gunnar Beutner
df6deb1b3e Fix: "" should not be equal to 0
fixes #9792
2015-07-30 19:58:22 +02:00
Gunnar Beutner
a82c65692c Fix accessor for field 0 ("prototype")
fixes #9778
2015-07-30 08:23:43 +02:00
Gunnar Beutner
0b495d1858 Set correct X509 version for certificates
fixes #9769
2015-07-29 12:59:12 +02:00
Michael Friedrich
fca7a33aac Implement config file management for the API
refs #9083

fixes #9102
fixes #9103
fixes #9104

fixes #9705
2015-07-23 17:57:24 +02:00
Michael Friedrich
a786dfa2ca Add Array::FromVector() method
fixes #9693
2015-07-21 16:09:19 +02:00
Michael Friedrich
59b81168ff Add exceptions for Utility::MkDir{,P}
fixes #9689
2015-07-21 15:56:57 +02:00
Jean-Marcel Flach
b9a4a64249 Move url handler to /lib/remote
fixes #9647
2015-07-16 13:35:32 +02:00
Jean-Marcel Flach
aa16438298 Change decode - check order in path decoding
refs #9470
2015-07-15 15:36:17 +02:00
Gunnar Beutner
afc5db1299 Build fix for Windows 2015-07-15 11:24:47 +02:00
Gunnar Beutner
26338c0fa6 Add missing lock in ScriptUtils::Union
fixes #9622
2015-07-15 08:26:58 +02:00
Gunnar Beutner
d98f9a3c92 Fix failed assertion in ScriptUtils::Intersection
fixes #9621
2015-07-15 08:20:16 +02:00
Gunnar Beutner
b357012ded Implement HTTP support
refs #9447
2015-07-09 11:42:34 +02:00
Jean-Marcel Flach
65227e311b Fix path interpretion in URL parser
The URL parser incorrectly used to interpret the path
"/" as a path "/" instead of as empty.
Test cases were added.

refs #9470
2015-07-08 13:14:05 +02:00
Jean-Marcel Flach
a98d2f585d Implement URL parser
fixes #9470
2015-07-07 15:33:19 +02:00
Jean-Marcel Flach
2560a9733d Add reverse_iterator to String 2015-07-07 15:33:19 +02:00
Gunnar Beutner
8dcb4efa5e Fix stability issues with the TlsStream/Stream classes
fixes #9481
2015-06-24 09:48:55 +02:00
Gunnar Beutner
cfcb8675c7 Fix unexpected exception in Utility::DirName when specifying an empty path
refs #9263
2015-06-15 14:04:38 +02:00
Michael Friedrich
228e1a11a2 Fix unregistered function failure including <nscp> on Linux
fixes #9394
2015-06-15 10:30:13 +02:00
Gunnar Beutner
24ae02386a Implement the basename and dirname script functions
refs #9256
2015-05-13 09:46:59 +02:00
Gunnar Beutner
62c755f88c Determine NSClient++ installation path using MsiGetComponentPath
fixes #9256
2015-05-12 15:45:40 +02:00
Jean Flach
bac76a4350 Add Windows version string to --version
fixes #8888
2015-04-28 12:34:33 +02:00
Jean-Marcel Flach
b30069c282 Update ReleaseHelper to work with most Linux distributions
refs #8888
2015-04-27 16:21:59 +02:00
Jean-Marcel Flach
0eead93c69 Make --version work with systemd
fixes #8888
2015-04-20 12:52:34 +02:00
Gunnar Beutner
d93bcedaad Implement sandbox mode for the config parser
fixes #9068
2015-04-16 08:48:17 +02:00
Gunnar Beutner
91da55872d Avoid unnecessary dictionary lookups
fixes #8922
2015-03-31 11:45:38 +02:00
Gunnar Beutner
43f709c22a Fix complexity class for Dictionary::Get
fixes #8919
2015-03-31 10:39:02 +02:00
Gunnar Beutner
339b8aef48 Avoid unnecessary allocations in ScriptFrame::SetCurrentFrame 2015-03-29 22:26:07 +02:00
Gunnar Beutner
111b154a6d Remove unused #includes 2015-03-29 00:03:47 +01:00
Gunnar Beutner
42a7ca4e78 Avoid most other unnecessary PLT indirections
refs #8890
2015-03-28 17:40:01 +01:00
Gunnar Beutner
2cbc3142dc Avoid some unnecessary PLT indirections for constructor calls
refs #8890
2015-03-28 16:13:44 +01:00
Gunnar Beutner
72a7b08480 Move implementation code from thpp files into separate files
fixes #8890
2015-03-28 11:08:12 +01:00
Gunnar Beutner
ec7224e3ed Generate C++ code for type validators
fixes #7709
fixes #8867
2015-03-27 07:59:27 +01:00
Gunnar Beutner
c08aa37c99 Fix crash in MakeX509CSR when using ancient versions of OpenSSL
fixes #8844
2015-03-26 08:23:24 +01:00
Gunnar Beutner
dda273dbcc Add missing include in loader.cpp 2015-03-22 15:04:00 +01:00
Gunnar Beutner
ed29d06ab6 Implement constructor-style casts
fixes #8832
2015-03-21 22:48:23 +01:00
Gunnar Beutner
76b0c6d89d Flush stderr in Application::Exit
fixes #8734
2015-03-20 12:28:43 +01:00
Gunnar Beutner
5588b8ed75 Don't allow users to instantiate the StreamLogger class
fixes #8823
2015-03-20 08:16:10 +01:00
Gunnar Beutner
16ef84fd35 Use TypeInstance field instead of looking up types by name
fixes #8817
2015-03-20 08:15:07 +01:00
Gunnar Beutner
e22386e63f Make load order for objects more reliable
fixes #8770
2015-03-19 15:58:38 +01:00
Gunnar Beutner
05e55ab79d Fix initialization order for type objects
refs #8791
2015-03-18 14:24:55 +01:00
Gunnar Beutner
3e08f2e0b5 Make order for deferred initializers deterministic
refs #8791
2015-03-18 13:24:31 +01:00
Gunnar Beutner
6c96d5bc98 Clean up the start-up process a bit
fixes #8791
2015-03-18 11:14:51 +01:00
Gunnar Beutner
37736caa5c Implement support for libedit
fixes #8776
2015-03-17 15:05:47 +01:00
Gunnar Beutner
0d7a382b82 Add OS details in 'icinga2 --version'
fixes #8761
2015-03-16 13:32:13 +01:00
Gunnar Beutner
7877292685 Don't ignore extraneous arguments for functions
fixes #8748
2015-03-15 11:24:09 +01:00
Gunnar Beutner
cd20044e4f Implement the pending_queries metric for the IDO check task
refs #8688
2015-03-13 12:00:30 +01:00
Michael Friedrich
6abbafe810 Fix log message for cli commands breaks the init script
fixes #8721
2015-03-12 15:53:56 +01:00
Michael Friedrich
8573636cc9 Fix crash in Dependency::Stop()
This partially reverts the fix in #8436

fixes #8687
refs #8436
2015-03-12 11:44:55 +01:00
Michael Friedrich
f198249eb1 Fix formatting for the GDB stacktrace
fixes #8684
2015-03-11 16:31:30 +01:00
Michael Friedrich
334cbbb722 Make sure that the /var/log/icinga2/crash directory exists
fixes #8683
2015-03-11 16:08:06 +01:00
Gunnar Beutner
5e39fbbdf5 Make sure that 'icinga2 console' serializes temporary attributes (rather than just config + state)
fixes #8690
2015-03-11 16:07:24 +01:00
Gunnar Beutner
ca27c8769e Kill entire process group after plugin timeout
fixes #8540
2015-03-11 07:12:59 +01:00
Gunnar Beutner
bf6d19c50b Fix argument type for the StringContains function
refs #8659
2015-03-11 06:42:45 +01:00
Michael Friedrich
330c93fa77 Implement String#contains
fixes #8659
2015-03-11 00:11:18 +01:00
Gunnar Beutner
37aa3413d8 Allow some of the Array and Dictionary methods to be inlined by the compiler
fixes #8666
2015-03-10 13:46:24 +01:00
Gunnar Beutner
9181d7ae05 Add missing service name in check results
refs #8257
2015-03-05 20:50:27 +01:00
Gunnar Beutner
fd9dc32a3d Implement SNI support for the TlsStream class
fixes #8610
2015-03-05 14:15:42 +01:00
Gunnar Beutner
4b15ec7774 Remove the macro argument for IMPL_TYPE_LOOKUP
fixes #8599
2015-03-05 07:42:13 +01:00
Gunnar Beutner
767ddbdec7 Fix compiler warning in Process::Run 2015-03-04 16:41:53 +01:00
Gunnar Beutner
afd1927a98 Improve Livestatus query performance
fixes #8594
2015-03-04 10:58:22 +01:00
Gunnar Beutner
3615716983 Include GDB backtrace in crash reports
fixes #8575
2015-03-03 13:53:11 +01:00
Gunnar Beutner
2867d79514 Add VERIFY check in Utility::ExecuteDeferredInitializers
Coverity Bug ID: 1167738
2015-03-03 09:26:21 +01:00
Gunnar Beutner
3e12bfef25 Remove redundant error check in Utility::GetTime
Coverity Bug ID: 1167732
2015-03-03 09:23:29 +01:00
Gunnar Beutner
7c31654552 Remove the return type for Utility::LoadExtensionLibrary 2015-03-03 07:19:34 +01:00
Gunnar Beutner
bdb2a15e27 Use _exit instead of Exit in Application::SetResourceLimits 2015-03-02 17:19:41 +01:00
Michael Friedrich
dd5ca24210 Fix compiler warnings 2015-03-02 14:10:26 +01:00
Gunnar Beutner
4d25a2cb22 Implement the assignment operator for the Value class 2015-03-02 12:55:48 +01:00
Gunnar Beutner
bb393a9d4f Remove unused variables 2015-03-02 12:52:37 +01:00
Gunnar Beutner
1bcc1a7b92 Fix incorrect operator in Value::operator^ 2015-03-02 12:51:11 +01:00
Gunnar Beutner
79a69d3e89 Fix incorrect header length check in NetString::ReadStringFromStream 2015-03-02 12:47:24 +01:00
Gunnar Beutner
1e9e5edcff Fix incorrect assignment in Logger::EnableConsoleLog 2015-03-02 12:47:24 +01:00
Gunnar Beutner
d913089a14 Remove redundant function 2015-03-02 12:47:20 +01:00
Gunnar Beutner
81e821b60c Make copy constructor private for the Log class 2015-03-02 12:42:33 +01:00
Gunnar Beutner
b6ca140ee2 Fix incorrect return type for Application::Run 2015-03-02 12:41:44 +01:00
Gunnar Beutner
f7ca0c5b52 Fix incorrect format specifier for fprintf 2015-03-02 12:41:44 +01:00
Gunnar Beutner
a296147839 Fix uninitialized fields in the StreamLogger class
Coverity Bug ID: 1272329
2015-03-02 10:14:15 +01:00
Gunnar Beutner
2ee1a197a9 Fix uninitialized field in the ScriptError class
Coverity Bug ID: 1272322
2015-03-02 10:14:14 +01:00
Gunnar Beutner
5b286dae31 Fix leak in SocketEvents::Threadproc
Coverity Bug ID: 1272338
2015-03-02 10:14:14 +01:00
Gunnar Beutner
b4be584679 Fix uninitialized fields
Coverity Bug ID: 1272331
2015-03-02 10:14:14 +01:00
Gunnar Beutner
2d65489f3a Make sure the WQ status timer is stopped properly
refs #8550
2015-03-01 22:25:48 +01:00
Gunnar Beutner
cd380a8494 Fix another crash in Timer::Call
fixes #8550
2015-02-28 08:43:49 +01:00
Gunnar Beutner
985c6bc7d9 Fix a deadlock in WorkQueue::WorkerThreadProc
refs #8554
2015-02-27 18:32:20 +01:00
Gunnar Beutner
5d1e549063 Fix a crash in Timer::Reschedule
refs #8554
2015-02-27 16:44:33 +01:00
Gunnar Beutner
5eb32efb05 Fix crash in SocketEvents::ThreadProc
fixes #8554
2015-02-27 15:53:38 +01:00
Jean-Marcel Flach
9ed21563ff Use RequestShutdown with exitcode instead of Application::Exit
fixes #8436
2015-02-27 14:43:30 +01:00
Gunnar Beutner
d397933eff Fix a crash in Timer::Call
fixes #8473
2015-02-27 14:07:12 +01:00
Gunnar Beutner
9567cd663b Fix another potential hang in TlsStream::Handshake
refs #8550
2015-02-27 09:03:23 +01:00
Gunnar Beutner
4e8c5706e1 Don't send heartbeats during log replay
fixes #8461
refs #8485
2015-02-26 14:59:39 +01:00
Gunnar Beutner
0c51857084 Fix another crash in SocketEvents::Register
fixes #8547
2015-02-26 13:11:50 +01:00
Gunnar Beutner
aef5bc2f3a Fix a crash in TlsStream::Close
fixes #8537
2015-02-25 14:41:23 +01:00
Jean-Marcel Flach
1d0f6ed457 Fix a missing import 2015-02-25 14:04:02 +01:00
Gunnar Beutner
4972364f42 Fix another problem where Icinga doesn't detect that a cluster connection is dead
refs #8485
2015-02-25 13:21:38 +01:00
Gunnar Beutner
4da3b1c5b3 Make sure that Notification objects are activated after Host/Service objects
fixes #8517
2015-02-25 12:43:38 +01:00
Gunnar Beutner
5ceb64d649 Implement the get_time() function 2015-02-24 09:08:31 +01:00
Gunnar Beutner
7504f3a3dc Prevent unnecessary thread wake-ups
refs #8485
2015-02-24 08:41:06 +01:00
Gunnar Beutner
2922d5d9bd Fix another potential problem where TLS connection might get stalled
refs #8485
2015-02-24 07:11:22 +01:00
Gunnar Beutner
37e075c38a Move some of the initialization code into icinga-app
refs #6257
2015-02-20 19:57:26 +01:00
Gunnar Beutner
0fb55060d2 Fix another potential deadlock in SocketEvents::WakeUpThread
refs #8484
2015-02-20 15:25:56 +01:00
Gunnar Beutner
e2815de8a6 Fix stalled reconnection attempts for the cluster
refs #8485
2015-02-20 14:43:55 +01:00
Jean Flach
1a9c4ceef6 Restructure troubleshootcollect, more after the jump
Changed `--output-file` to `--output`
Default output file now has a timestamp in the name, no more overwriting
Added Section headers and file markers
Taken time is now measured and output
And some format changes were made

refs #3446
2015-02-19 17:12:32 +01:00
Gunnar Beutner
31786fdaa1 Fix crash in SocketEvents::ChangeEvents
refs #6109
2015-02-17 13:21:43 +01:00
Gunnar Beutner
8d5b270812 Fix another crash in SocketEvents::OnEvent
fixes #8446
2015-02-16 11:41:11 +01:00
Gunnar Beutner
3c6ca2957b Fix a crash in SocketEvents::OnEvent
fixes #8446
2015-02-15 18:50:25 +01:00
Michael Friedrich
7a93cf8cce Don't attempt to restore program state from non-existing state file
fixes #8444
2015-02-14 23:39:10 +01:00
Gunnar Beutner
8903c7e379 Close TLS connections more aggressively
refs #6109
2015-02-14 19:14:45 +01:00
Gunnar Beutner
1c7a0d03a1 Fix a case where NetString::ReadStringFromStream might incorrectly return StatusEof
refs #6109
2015-02-14 18:48:33 +01:00
Gunnar Beutner
9e936cbea4 Fix unit tests for the Stream class
refs #6109
2015-02-14 17:40:29 +01:00
Gunnar Beutner
f097e48889 Don't use separate threads for each ApiClient object
fixes #6109
2015-02-14 16:34:36 +01:00
Gunnar Beutner
e0bbfb175c Move most of the socket I/O to a separate thread
fixes #8300
fixes #8243
2015-02-14 09:42:11 +01:00
Michael Friedrich
2cab6fbb9d Make the argments for the stats functions const-ref
fixes #8433
2015-02-13 11:29:15 +01:00
Michael Friedrich
24852e05c7 Move ValidateMacroString into the MacroProcessor class
refs #7311
2015-02-11 16:14:59 +01:00
Michael Friedrich
8ca57cba03 Add macro config validator for command args, env, custom attr, perfdata templates
fixes #7311
2015-02-11 15:32:10 +01:00
Gunnar Beutner
0490fe73f7 Implement line continuation for "icinga2 console"
fixes #8133
2015-02-10 13:27:02 +01:00
Gunnar Beutner
61684891a0 Set LC_NUMERIC=C for all processes on *NIX
fixes #6857
2015-02-09 14:21:42 +01:00
Gunnar Beutner
97fc5bb10b Implement additional attributes for the Host class
refs #7564
2015-02-09 08:50:17 +01:00
Gunnar Beutner
bb12704a31 Implement the Json.encode and Json.decode methods
fixes #8393
2015-02-09 08:14:06 +01:00
Michael Friedrich
ea2ac81003 Remove name and return value for stats functions
fixes #6171
2015-02-07 22:36:17 +01:00
Gunnar Beutner
e3dcc8a610 Implement a unit test for nullary lambdas
fixes #7805
2015-02-03 14:02:32 +01:00
Gunnar Beutner
1bff5eb706 Fix missing files in the Windows package
fixes #8200
2015-02-02 10:36:58 +01:00
Gunnar Beutner
fec8e15d9e Implement the Array#join method
fixes #8322
2015-02-02 08:39:16 +01:00
Gunnar Beutner
ac959a72aa Don't allow comparison of strings and numbers
fixes #8305
2015-01-30 10:30:31 +01:00
Gunnar Beutner
e0be9cd743 Improve error message for failed casts
refs #6070
2015-01-29 16:51:47 +01:00
Gunnar Beutner
fb323ee215 Evaluate apply filters in the for loop
fixes #7610
2015-01-29 12:38:25 +01:00
Gunnar Beutner
88788685d3 Make sure the Livestatus listener thread terminates after SIGTERM
fixes #8295
2015-01-29 11:39:06 +01:00
Gunnar Beutner
03a509f419 Fix setting global variables with --define
fixes #8307
2015-01-29 11:06:08 +01:00
Gunnar Beutner
eb2f2dd8a2 Implement get_object() and get_objects()
fixes #7564
2015-01-28 08:36:17 +01:00
Michael Friedrich
78bfd0204c Update copyright year 2015-01-22 12:00:23 +01:00
Gunnar Beutner
981d645028 Update documentation 2015-01-21 08:48:38 +01:00
Gunnar Beutner
363f23b1d8 Rename ScriptFunction to Function
fixes #8258
2015-01-21 08:48:38 +01:00
Gunnar Beutner
604b080c59 Implement the Array#sort method
refs #8069
2015-01-20 16:56:08 +01:00
Gunnar Beutner
b4c74efde0 Implement some more utility functions
refs #8169
2015-01-16 10:35:20 +01:00
Gunnar Beutner
6bb054caa8 Implement the Function#callv helper function
refs #8169
2015-01-15 12:52:23 +01:00
Gunnar Beutner
5d8356f6d2 Implement more utility functions
refs #8169
2015-01-15 12:34:50 +01:00
Gunnar Beutner
c0a5ed81f4 Improve argument validation for the String#substr and String#find methods
refs #8169
2015-01-14 17:03:56 +01:00
Gunnar Beutner
dd1cbb6fe7 Fix incorrect exception type
refs #81659
2015-01-14 15:57:48 +01:00
Gunnar Beutner
2ef798f378 Implement missing Type::SetField method
refs #8169
2015-01-14 13:34:52 +01:00
Gunnar Beutner
688e64ce40 Add missing meta type class for the Type class
refs #8169
2015-01-14 09:51:44 +01:00
Gunnar Beutner
9c36f40656 Implement more methods for the String class
fixes #8169
2015-01-14 09:08:31 +01:00
Gunnar Beutner
d0abc11c08 Implement the call() method for functions
refs #8169
2015-01-14 07:36:59 +01:00
Gunnar Beutner
9080ca2867 Fix some more compiler warnings
refs #8175
2015-01-12 14:19:20 +01:00
Gunnar Beutner
1df13c792b Fix compiler warnings
fixes #8175
2015-01-12 12:36:49 +01:00
Gunnar Beutner
b17fc34a84 Disable Application::SetResourceLimits on non-Linux systems
fixes #8178
2015-01-09 11:44:20 +01:00
Gunnar Beutner
1073f031c8 Build fix for Windows 2014-12-22 14:14:16 +01:00
Gunnar Beutner
9f6b90cd2d Don't show stack traces for known exception types
refs #6070
2014-12-20 15:41:31 +01:00
Gunnar Beutner
c433284d27 Improve error reporting
fixes #8136
refs #6070
2014-12-20 15:29:04 +01:00
Gunnar Beutner
cb5e6c1c6d Fix integer overflow in len()
fixes #8041
2014-12-20 09:36:35 +01:00
Gunnar Beutner
1ddab493e1 Make sure that Value::IsEmpty() returns true for empty strings
fixes #8018
2014-12-20 09:31:55 +01:00
Gunnar Beutner
6fddec0dd3 Improve error message for invalid field accesses
fixes #8079
2014-12-20 09:17:02 +01:00
Gunnar Beutner
978aeed741 Implement the __get_objects function
refs #8127
2014-12-19 13:08:31 +01:00
Gunnar Beutner
97168378e8 Rename _DEBUG to I2_DEBUG
fixes #7767
2014-12-19 12:19:28 +01:00
Gunnar Beutner
28d7051aed Fix a deadlock in TlsStream::Read / TlsStream::Close
fixes #8124
2014-12-19 12:07:06 +01:00
Gunnar Beutner
cb7f93dc19 Implement CMake options for some of the modules
fixes #7794
fixes #7795
2014-12-19 09:46:41 +01:00
Gunnar Beutner
873e294158 Refactor the WorkQueue class to make error reporting easier
refs #7709
2014-12-18 15:11:57 +01:00
Gunnar Beutner
c3cf7682b9 Clean up the DebugInfo class
refs #7709
2014-12-18 12:58:46 +01:00
Gunnar Beutner
9eeb64a780 Update livestatus and statusdata to properly support booleans
fixes #8100
2014-12-17 08:54:28 +01:00
Gunnar Beutner
f800630c10 Implement Livestatus support for the "repl" command
refs #7805
2014-12-16 19:28:46 +01:00
Gunnar Beutner
d82defe6a9 Add readline support for the "repl" command
fixes #8091
2014-12-16 13:26:26 +01:00
Gunnar Beutner
23a556c7ce Make sure that operator % throws an exception when the ride-hand-side argument is 0
fixes #8089
2014-12-16 08:52:32 +01:00
Gunnar Beutner
77806b9de7 Get rid of the local/global keywords
refs #8074
2014-12-15 16:09:17 +01:00
Gunnar Beutner
252f3205cb Fix incorrect variable scoping
refs #8074
2014-12-15 12:58:55 +01:00
Gunnar Beutner
55b7f00382 Remove unnecessary includes 2014-12-15 10:16:06 +01:00
Gunnar Beutner
1cb0231c05 Refactor how variable scopes work
refs #8074
2014-12-14 11:33:45 +01:00
Gunnar Beutner
461cf8dbc1 Make sure Serialize() doesn't fail for objects which don't have a registered type
fixes #7895
2014-12-13 21:42:39 +01:00
Gunnar Beutner
05485ea2d6 Disallow calling strings as functions
fixes #8040
2014-12-12 20:45:11 +01:00
Gunnar Beutner
b8e7c5bc40 Fix the prototype for the Object class
refs #8065
2014-12-12 15:47:51 +01:00
Gunnar Beutner
0a4c461caa Fix the clone() methods for the Array and Dictionary class
refs #8065
2014-12-12 15:38:06 +01:00
Gunnar Beutner
cfd775c948 Move the VMFrame class to libbase
refs #8065
2014-12-12 15:33:56 +01:00
Gunnar Beutner
aa38dde1fc Implement prototype functions
fixes #8065
2014-12-12 15:22:37 +01:00
Gunnar Beutner
a94b26ff47 Add missing DebugInfo for field accesses
refs #8062
2014-12-12 08:58:39 +01:00
Gunnar Beutner
a9e2bc4b40 Implement a way to call methods on objects
fixes #8071
2014-12-11 21:12:34 +01:00
Gunnar Beutner
364f1daff8 Fix another crash in ThreadPool::Stop
refs #8059
2014-12-11 09:45:57 +01:00
Gunnar Beutner
874970db9e Fix crash in ThreadPool::Stop
fixes #8059
2014-12-11 09:34:57 +01:00
Gunnar Beutner
2720333d6e Fix missing location information for included files
fixes #7927
2014-12-10 15:06:09 +01:00
Gunnar Beutner
c1ac548a77 Escape special characters in repository file names
fixes #7618
2014-12-10 13:20:16 +01:00
Gunnar Beutner
d88856a994 Fix failing unit tests
refs #8043
2014-12-10 11:25:20 +01:00
Gunnar Beutner
89a0fc006e Implement a boolean sub-type for the Value class
fixes #8043
2014-12-10 09:05:16 +01:00
Gunnar Beutner
44b87aeff6 Fix typeof() for numbers
fixes #8028
2014-12-09 16:43:09 +01:00
Gunnar Beutner
cf2b6e7ccc Improve output of ToString for type objects
fixes #8020
2014-12-08 09:12:40 +01:00
Gunnar Beutner
57f84741b9 Register type objects as global variables
fixes #8019
2014-12-08 08:49:32 +01:00
Gunnar Beutner
04ca634a16 Fix typeof incorrectly returning null for arrays and dictionaries
fixes #8002
2014-12-08 08:36:03 +01:00
Gunnar Beutner
b5c7e2de4e Make the ThreadPool spawn fewer threads 2014-12-06 19:23:27 +01:00
Michael Friedrich
9f66587d84 Rename static timer variables 2014-12-05 16:32:14 +01:00
Gunnar Beutner
cefa469ee6 ScriptUtils: Make sure arguments aren't null
fixes #8003
2014-12-05 14:59:12 +01:00
Gunnar Beutner
7d93788650 Fix crash in the unit tests
fixes #7769
2014-12-04 21:50:22 +01:00
Gunnar Beutner
1c07f5111a Fix a memory leak in the ReadLineContext class
fixes #7602
2014-12-01 10:36:38 +01:00
Gunnar Beutner
d19821c900 Properly reset the ThreadPool status in Stop
refs #7822
2014-11-28 11:32:37 +01:00
Gunnar Beutner
ab63fca3d5 Make the config parser thread-safe
fixes #7822
2014-11-28 06:48:27 +01:00
Gunnar Beutner
a8b7710800 Fix crash in CreateCert
fixes #7862
2014-11-27 09:35:24 +01:00
Gunnar Beutner
358d91e912 Remove the __parent field in the DynamicObject class
refs #7748
2014-11-27 06:32:12 +01:00
Gunnar Beutner
c220a99f2d Implicitly convert Number argument to string for operator +
fixes #7823
2014-11-25 12:33:08 +01:00
Gunnar Beutner
fddead5303 Fix some compiler warnings
fixes #7826
2014-11-24 18:25:08 +01:00
Gunnar Beutner
4d125edc0d Move the cast functions into libbase
fixes #7807
2014-11-24 07:09:51 +01:00
Gunnar Beutner
a1b231e069 Remove unused parameter
refs #7805
2014-11-24 01:05:19 +01:00
Gunnar Beutner
ca28a51373 Remove unused code in the ThinMutex class
refs #7805
2014-11-24 01:01:39 +01:00
Gunnar Beutner
16cf274efc Improve test coverage for the array class 2014-11-23 09:50:11 +01:00
Gunnar Beutner
f5766f9118 Refactor the stack frame handling for scripts
fixes #7748
2014-11-22 19:24:03 +01:00
Gunnar Beutner
334e61037a Split DynamicObject::OnConfigLoaded into two separate events
refs #7780
2014-11-21 18:31:37 +01:00
Gunnar Beutner
80e6854ce6 Fix incorrect return type for ScriptSignal::Invoke
refs #7744
2014-11-20 19:43:50 +01:00
Gunnar Beutner
5321bc4643 Don't validate strings in the JSON parser
fixes #7730
2014-11-20 10:09:13 +01:00
Gunnar Beutner
6cadde82bd Avoid rebuilding libbase when the version number changes
fixes #7647
2014-11-20 10:02:34 +01:00
Gunnar Beutner
f84cc8de39 Implement support for signals
fixes #7744
2014-11-20 06:54:48 +01:00
Gunnar Beutner
77b746841a Provide a specialized function overload for Convert::ToDouble(const Value&) 2014-11-17 14:00:13 +01:00
Gunnar Beutner
1d16875b95 Comment out InitializeProcThreadAttributeList (for now)
fixes #7681
2014-11-17 09:45:35 +01:00
Gunnar Beutner
9386a58bf2 Implement an experimental variable to limit the number of threads 2014-11-16 13:14:42 +01:00
Gunnar Beutner
814589ac17 Use Array::Contains in InExpression/NotInExpression 2014-11-15 08:22:32 +01:00
Gunnar Beutner
0324cbff7c Fix crash in StreamLogger::~StreamLogger 2014-11-13 20:12:23 +01:00
Gunnar Beutner
8e4148d33c Use Application::Exit to implement the exit() script function 2014-11-13 15:59:40 +01:00
Gunnar Beutner
7321e45abc Implement support for executing remote commands
fixes #7559
2014-11-13 14:54:55 +01:00
Gunnar Beutner
f20d9010c0 Fix deadlock in ThreadPool::Stop 2014-11-13 10:00:49 +01:00
Gunnar Beutner
02fef3f84a Remove unions from the DebugInfo class 2014-11-13 09:02:43 +01:00
Gunnar Beutner
e692ca16cd Add missing Stop call in the Logger class
fixes #7652
2014-11-13 09:02:23 +01:00
Gunnar Beutner
a14928ec10 Improve error messages for the Process class 2014-11-13 08:53:12 +01:00
Gunnar Beutner
6ef4e313d9 Remove obsolete mutex profiling code
refs #7622
2014-11-13 06:13:18 +01:00
Gunnar Beutner
f592a13481 Make sure all threads are dead before calling fork()
fixes #7653
2014-11-12 21:27:36 +01:00
Gunnar Beutner
e5bd573756 Implement the __get_object function 2014-11-12 19:08:36 +01:00
Gunnar Beutner
4f417b4912 Add release barrier in ObjectLock::Unlock
refs #7648
2014-11-12 13:18:34 +01:00
Gunnar Beutner
1c0102ff9b Fix incorrect field name
refs #7648
2014-11-12 12:46:33 +01:00
Gunnar Beutner
a2c5887e51 Fix crash when daemonizing Icinga
refs #7648
2014-11-12 12:44:14 +01:00
Gunnar Beutner
c5a5d1833b Add missing barriers for Object::m_LockOwner
refs #7648
2014-11-12 12:32:14 +01:00
Gunnar Beutner
dfd24e6359 Fix _DEBUG define on *NIX 2014-11-12 11:34:59 +01:00
Gunnar Beutner
02c559eff9 Fix crash in the unit tests
fixes #7648
2014-11-12 09:33:13 +01:00
Gunnar Beutner
e4bfb5f922 Fix static initializers for Utility::AddDeferredInitializer
fixes #7646
2014-11-12 08:00:56 +01:00
Gunnar Beutner
83a2e4c350 Allow thin mutex calls to be inlined
refs #7622
2014-11-12 06:50:52 +01:00
Gunnar Beutner
02a7d97b17 Allow locks to be inlined
refs #7622
2014-11-12 06:33:20 +01:00
Gunnar Beutner
ecd31b86ad Remove debug code
refs #7622
2014-11-12 00:06:51 +01:00
Gunnar Beutner
2d7ce62438 Add missing default arguments
refs #7622
2014-11-11 23:48:17 +01:00
Gunnar Beutner
ca75584d88 Allow String class members to be inlined 2014-11-11 23:46:06 +01:00
Gunnar Beutner
36d108528f Allow Value class members to be inlined 2014-11-11 23:28:53 +01:00
Gunnar Beutner
ee980a788b Clean up the code a bit 2014-11-11 23:06:47 +01:00
Gunnar Beutner
9932f60522 Fix _DEBUG define
refs #7634
2014-11-11 16:40:27 +01:00
Gunnar Beutner
a5a869f390 Enable ASSERT() for *NIX debug builds
refs #7634
2014-11-11 16:36:20 +01:00
Gunnar Beutner
11710ef683 Fix static initializers
refs #7634
2014-11-11 13:24:44 +01:00
Gunnar Beutner
65be09215f Avoid unnecessary type lookups
refs #7622
2014-11-10 20:07:07 +01:00
Gunnar Beutner
478f03b49a Replace boost::shared_ptr with boost::intrusive_ptr
refs #7622
2014-11-09 16:54:41 +01:00
Gunnar Beutner
187d443447 Implement support for thin mutexes
refs #7622
2014-11-09 16:54:33 +01:00
Gunnar Beutner
e1c95d4fa0 Improve config compiler's memory usage 2014-11-08 13:21:51 +01:00
Gunnar Beutner
ade12dc27a Remove unused attributes 2014-11-07 21:43:00 +01:00
Gunnar Beutner
9e2aa4c5ed Fix problem with unresolved symbols
refs #7561
2014-11-07 18:37:28 +01:00
Gunnar Beutner
266b1754c7 Speed up type lookups
refs #7561
2014-11-07 12:39:32 +01:00
Gunnar Beutner
3cf08ad050 Properly report errors when CreateProcess() fails
fixes #7599
2014-11-07 10:01:44 +01:00
Gunnar Beutner
61e090595e Fix build problem on Windows
fixes #7597
2014-11-06 14:21:22 +01:00
Gunnar Beutner
064407d3c9 Fix dynamic_cast problem
fixes #7586
2014-11-06 09:05:12 +01:00
Gunnar Beutner
9e16e1d395 Remove some obsolete references to cJSON
refs #7452
2014-11-05 16:47:11 +01:00
Gunnar Beutner
cfc418c9eb Fix operator shared_ptr<T> for the Value class
fixes #7586
2014-11-05 16:09:22 +01:00
Gunnar Beutner
a6f20c7a22 Implement support for arbitrarily complex indexers
fixes #7566
2014-11-04 15:20:33 +01:00
Gunnar Beutner
6cafce5d7e Build fix for RHEL 5 2014-11-04 11:18:35 +01:00
Gunnar Beutner
19a6a65aad Implement the random() function 2014-11-03 17:21:33 +01:00
Gunnar Beutner
aa94563eb5 Implement the keys() function
fixes #7557
2014-11-03 13:05:14 +01:00
Gunnar Beutner
60859043c8 Fix non-unity builds 2014-11-03 07:07:54 +01:00
Gunnar Beutner
170c5a59e4 Implement typeof() function 2014-11-03 00:45:14 +01:00
Gunnar Beutner
4677014b6d Implement support for arrays in custom variables
fixes #6544
2014-11-02 07:27:50 +01:00
Michael Friedrich
bc83c9a698 CLI Commands: Remove timestamp prefix when logging output
fixes #7376
2014-10-31 22:01:36 +01:00
Gunnar Beutner
6f160eda47 Remove static_cast optimization for Value's operator shared_ptr<T> 2014-10-31 14:34:28 +01:00
Gunnar Beutner
3fc3f05bb4 Implement field attribute to hide fields in command auto-completion
fixes #7403
2014-10-31 08:53:25 +01:00
Gunnar Beutner
9f7c97051e Hide attributes in command auto-completion which cannot be set
refs #7403
2014-10-31 08:49:14 +01:00
Michael Friedrich
3709ec73ea Add Utility::SetFileOwnership() on Linux
refs #7476
2014-10-30 19:52:22 +01:00
Gunnar Beutner
ff12522a62 Fix operator== for Value and String comparisons
refs #7472
2014-10-30 13:04:00 +01:00
Michael Friedrich
4fe486c4dd Cli: Fix overwriting api.conf; Move black/whitelist functionality into AgentUtility class
refs #7253
fixes #7481
2014-10-29 19:21:52 +01:00
Gunnar Beutner
ceca27e25b Fix Utility::GetFQDN() on OS X
fixes #7495
2014-10-29 16:54:33 +01:00
Gunnar Beutner
8251a60044 Make sure that OnStateLoaded is called for all objects
fixes #7482
2014-10-29 11:14:32 +01:00
Gunnar Beutner
7cca2d275f Fix incorrect #ifdef
refs #7454
2014-10-28 08:12:54 +01:00
Gunnar Beutner
b0179cc1fe 64-bit build fix for YAJL < 2.0
refs #7454
2014-10-28 06:33:40 +01:00
Gunnar Beutner
65e2e636ea Fix compatibility with older versions of the YAJL library
refs #7454
2014-10-28 05:59:29 +01:00
Gunnar Beutner
3f032692ce Implement agent settings for "agent set" and "agent list"
refs #7248
2014-10-27 15:12:19 +01:00
Gunnar Beutner
05d642f69d Use system-provided version of YAJL where available
fixes #7454
2014-10-27 12:42:57 +01:00
Gunnar Beutner
196bd89c7a Use OpenSSL's default algorithms for certificate signatures
fixes #7434
2014-10-27 11:32:39 +01:00
Gunnar Beutner
8ce4b3f122 Implement support for serial files
fixes #7393
2014-10-27 10:52:07 +01:00
Gunnar Beutner
8b339a6cd5 Throw saved exception in JSON decoder
refs #7452
2014-10-27 09:28:32 +01:00
Gunnar Beutner
f05ccd07f9 Build fix for GCC
refs #7452
2014-10-27 05:17:23 +01:00
Gunnar Beutner
8a2afae83b Fix incorrect include path
refs #7452
2014-10-26 20:05:38 +01:00
Gunnar Beutner
7559273359 Replace cJSON with YAJL
fixes #7452
2014-10-26 20:00:35 +01:00
Gunnar Beutner
315c84eb4a Fix problems with the serializer when using 'type' as an attribute
fixes #7372
2014-10-25 09:14:56 +02:00
Gunnar Beutner
e80fd0fbfa Update the constants.conf file for "agent setup"
refs #7423
2014-10-23 15:05:25 +02:00
Michael Friedrich
9227d990dc Add Utility::CopyFile()
refs #7423
2014-10-22 19:25:29 +02:00
Gunnar Beutner
9c7d97b8bc Update the Windows agent wizard
refs #7241
2014-10-21 16:07:39 +02:00
Gunnar Beutner
2972c6bfe8 Implement the "variable" CLI command
fixes #7370
2014-10-20 21:14:56 +02:00
Gunnar Beutner
26b9c5a81b Move clicommand.{cpp,hpp} to lib/cli
refs #7246
2014-10-20 14:06:21 +02:00
Gunnar Beutner
b96e9d26a9 Improve error messages for CLI commands
fixes #7395
2014-10-20 13:40:17 +02:00
Gunnar Beutner
06ba435cdd Make warning and critical log messages bold on terminals 2014-10-20 13:15:37 +02:00
Gunnar Beutner
9368ff0e03 Update some more log messages 2014-10-20 10:09:57 +02:00
Gunnar Beutner
3653058bd3 Remove unnecessary prototype for Log() 2014-10-19 18:01:09 +02:00
Gunnar Beutner
2d5e9514a5 Refactor logging code 2014-10-19 17:52:17 +02:00
Gunnar Beutner
739cb43289 Rename qstring.{cpp,hpp} to string.{cpp,hpp} 2014-10-19 14:52:07 +02:00
Gunnar Beutner
b18f57a745 Remove logger_fwd.hpp 2014-10-19 14:50:39 +02:00
Gunnar Beutner
eb77b1534a Add color code for LogDebug
fixes #7416
2014-10-19 02:39:45 +02:00
Michael Friedrich
b0d7d8dabc Build fix for RHEL 2014-10-19 00:15:42 +02:00
Gunnar Beutner
29bf22f324 Fix: Don't use VT100 color codes in log files
refs #7396
2014-10-18 00:34:15 +02:00
Gunnar Beutner
088efc3c69 Avoid unnecessary Poll() calls 2014-10-18 00:29:39 +02:00
Gunnar Beutner
2c8f766200 Fix another deadlock in TlsStream 2014-10-17 20:56:22 +02:00
Gunnar Beutner
8cc6368954 Implement generic color support for terminals
fixes #7396
2014-10-17 20:44:17 +02:00
Gunnar Beutner
92896311f3 Implement support for C/C++ comments in the TI compiler
fixes #5018
2014-10-17 19:44:31 +02:00
Gunnar Beutner
152846ee38 Build fix for non-unity builds 2014-10-17 18:55:34 +02:00
Gunnar Beutner
d16670c4b7 Improve auto-completion suggestions for the repository command
refs #7255
2014-10-17 16:04:11 +02:00
Gunnar Beutner
7db8588980 Implement auto-completion for positional arguments
refs #7255
2014-10-17 15:54:46 +02:00
Gunnar Beutner
4632b93b89 Add "repository <type> <add/remove/list>" commands
refs #7255
2014-10-17 14:21:35 +02:00
Gunnar Beutner
8e7fd1f40d Implement auto-completion support for type fields
fixes #7401
2014-10-17 13:03:01 +02:00
Gunnar Beutner
5c8dbb9552 Build fix for Rune 2014-10-16 15:33:03 +02:00
Gunnar Beutner
d414149f74 Fix compiler warning
refs #7244
2014-10-16 14:21:33 +02:00
Gunnar Beutner
97cf93089b Build fix for FreeBSD 2014-10-16 13:36:25 +02:00
Gunnar Beutner
f67a11c183 Don't log error messages when TLS connections are closed
refs #7244
2014-10-16 13:11:14 +02:00
Gunnar Beutner
f433679b13 Implement the "pki request" and "pki ticket" commands
refs #7244
2014-10-16 12:27:34 +02:00
Gunnar Beutner
fd6fe82606 Fix unauthenticated TLS connections
refs #7244
2014-10-16 09:58:01 +02:00
Gunnar Beutner
311cce5d41 Allow TLS connections with unverified certificates
refs #7244
2014-10-16 09:01:18 +02:00
Gunnar Beutner
575a9eb849 Implement error handling for the "pki sign-csr" command
refs #7247
2014-10-15 18:23:49 +02:00
Gunnar Beutner
c1b92756b5 Implement the "pki sign-csr" command
refs #7274
2014-10-15 16:01:15 +02:00
Gunnar Beutner
65579942ad Fix another problem with auto-completing arguments
refs #7378
2014-10-15 09:41:54 +02:00
Gunnar Beutner
ce6f7ace89 Replace spaces with tabs
refs #7250
2014-10-15 08:48:01 +02:00
Gunnar Beutner
14d8366d05 Fix incorrect auto-completion suggestions
fixes #7378
2014-10-15 08:32:46 +02:00
Gunnar Beutner
2a60ce8625 Improve auto-completion for arguments
fixes #7375
2014-10-14 16:45:00 +02:00
Michael Friedrich
d9f5409e8b CLI framework: Change unrecognized into positional options
refs #7371
2014-10-14 14:27:37 +02:00
Michael Friedrich
3513d1f2f9 CLI framework: Add support for unrecognized parameters
Required for feature enable command for example.

fixes #7371
2014-10-13 18:07:52 +02:00
Gunnar Beutner
fab9d7eedf Set CA flag for new CA certificates
refs #7247
2014-10-13 13:58:18 +02:00
Gunnar Beutner
a01fb6d6e6 Make sure we're using the right user/group for CLI commands
refs #7246
2014-10-13 13:44:45 +02:00
Gunnar Beutner
4ba3d74c0e Implement the "pki new-csr" command
refs #7247
2014-10-13 12:34:31 +02:00
Gunnar Beutner
14ac7dd974 Replace spaces with tabs 2014-10-13 09:47:05 +02:00
Gunnar Beutner
50a1b243ed Hide some of the internal command-line arguments
refs #7246
2014-10-10 11:08:24 +02:00
Gunnar Beutner
4c8d0b9283 Fix auto-completion for arguments
refs #7246
2014-10-10 10:07:56 +02:00
Gunnar Beutner
88742d6dca Make sure the 'autocomplete' variable is initialized
refs #7246
2014-10-08 15:46:29 +02:00
Gunnar Beutner
a4081f1445 Implement support for CLI commands
fixes #7246
2014-10-08 15:33:10 +02:00
Gunnar Beutner
15358c6e95 Fix missing error messages (part 2)
refs #7331
2014-10-01 16:01:47 +01:00
Gunnar Beutner
879684efcd Fix problems with PNP4Nagios
fixes #7268
2014-09-17 15:38:39 +02:00
Gunnar Beutner
ac32d4b382 Improve thread spawning behavior
fixes #7186
2014-09-11 11:45:21 +02:00
Gunnar Beutner
6bb35a0d52 Another Windows build fix 2014-09-10 15:45:47 +02:00
Gunnar Beutner
dc4fe38d8f Fix crash in TlsStream::IsEof
refs #6862
2014-09-10 08:51:25 +02:00
Gunnar Beutner
092983d5ad Properly deal with closed TLS streams
fixes #6892
2014-09-09 15:28:55 +02:00
Gunnar Beutner
308ba45102 Improve error message for duplicate objects
refs #6070
2014-09-09 14:49:21 +02:00
Gunnar Beutner
8c4765c607 Add SUN_LEN compatibility macro for Haiku
refs #7115
2014-09-06 02:30:09 +02:00
Gunnar Beutner
666c92fa76 Check whether the nice() function is available
refs #7115
2014-09-06 02:20:25 +02:00
Gunnar Beutner
418e7bc417 Add #include for strings.h (strcasecmp)
refs #7115
2014-09-06 02:11:34 +02:00
Gunnar Beutner
9133c01f00 Fix spurious SSL errors
fixes #6981
2014-09-05 08:19:47 +02:00
Gunnar Beutner
039a13cf88 Implement support for systems where pipe2 returns ENOSYS
fixes #7065
fixes #6696
2014-09-03 08:10:55 +02:00
Gunnar Beutner
4da18d6de1 Build fix for GNU Hurd 2014-09-02 17:27:16 +02:00
Gunnar Beutner
6f2ea6bc08 Fix build problems with Oracle Solaris Studio
refs #6896
2014-09-02 13:09:17 +02:00
Gunnar Beutner
6ba0612644 Detect whether __COUNTER__ is available
fixes #7040
2014-08-31 11:01:37 +02:00
Gunnar Beutner
eb091a87b0 Implement support for unity builds
fixes #7034
fixes #7035
2014-08-30 20:02:12 +02:00
Gunnar Beutner
eaea65a366 Make props argument for NameComposer::MakeName constant 2014-08-29 16:46:46 +02:00
Gunnar Beutner
634ef772c3 Build fix for Boost 1.56
fixes #7001
2014-08-25 15:12:39 +02:00
Gunnar Beutner
f7f8bd9b00 Use const-ref specifier when catching exceptions
refs #6070
2014-08-25 08:36:30 +02:00
Gunnar Beutner
e31d520f6b Improve log messages for failed commands
fixes #6970
2014-08-21 11:26:43 +02:00
Gunnar Beutner
107a152a8f Improve TLS and cluster error messages
refs #6066
2014-08-20 14:07:23 +02:00
Gunnar Beutner
8485e0b94b Reword error messages a bit
refs #6070
2014-08-19 13:48:41 +02:00
Gunnar Beutner
d4cdee6a1a Change log level for failed commands
fixes #6751
2014-08-19 12:58:55 +02:00