Commit graph

221 commits

Author SHA1 Message Date
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
Michael Friedrich
78bfd0204c Update copyright year 2015-01-22 12:00:23 +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
c1ac548a77 Escape special characters in repository file names
fixes #7618
2014-12-10 13:20:16 +01:00
Gunnar Beutner
e4bfb5f922 Fix static initializers for Utility::AddDeferredInitializer
fixes #7646
2014-11-12 08:00:56 +01:00
Gunnar Beutner
064407d3c9 Fix dynamic_cast problem
fixes #7586
2014-11-06 09:05:12 +01:00
Gunnar Beutner
4677014b6d Implement support for arrays in custom variables
fixes #6544
2014-11-02 07:27:50 +01:00
Michael Friedrich
3709ec73ea Add Utility::SetFileOwnership() on Linux
refs #7476
2014-10-30 19:52:22 +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
3f032692ce Implement agent settings for "agent set" and "agent list"
refs #7248
2014-10-27 15:12:19 +01:00
Michael Friedrich
9227d990dc Add Utility::CopyFile()
refs #7423
2014-10-22 19:25:29 +02:00
Gunnar Beutner
2d5e9514a5 Refactor logging code 2014-10-19 17:52:17 +02:00
Gunnar Beutner
b18f57a745 Remove logger_fwd.hpp 2014-10-19 14:50:39 +02:00
Gunnar Beutner
a4081f1445 Implement support for CLI commands
fixes #7246
2014-10-08 15:33:10 +02:00
Gunnar Beutner
ac32d4b382 Improve thread spawning behavior
fixes #7186
2014-09-11 11:45:21 +02:00
Gunnar Beutner
6f2ea6bc08 Fix build problems with Oracle Solaris Studio
refs #6896
2014-09-02 13:09:17 +02:00
Gunnar Beutner
65bec9e904 Clean up some parts of the code 2014-08-17 17:57:41 +02:00
Gunnar Beutner
39248dad42 Build fix for Windows 2014-08-07 14:23:20 +02:00
Jan Andres
46dbe5a4f5 Fix incorrect usage of readdir_r
refs #6821

Signed-off-by: Gunnar Beutner <gunnar.beutner@netways.de>
2014-08-04 08:49:04 +02:00
Jan Andres
20fc8773b6 Build fix for Solaris
refs #6821

Signed-off-by: Gunnar Beutner <gunnar.beutner@netways.de>
2014-08-04 08:49:04 +02:00
Gunnar Beutner
ad1a11f882 Remove source line information from stacktraces
fixes #6576
2014-06-25 09:18:53 +02:00
Michael Friedrich
1eb77b0cd7 Replace recursive implementation with a forward loop in Utility::MkDirP()
That way we always move into the tree, but not start in the deepest
level and may limit the tree level too in the future, if required.

Solves the Win32 implementation by moving the general mkdir() call into
Utility::MkDir().

refs #6328
2014-06-13 09:10:35 +02:00
Michael Friedrich
2acf6a063e Fix syncing zones.d from etc/ to var/lib in a recursive manner
Missing mkdir -p basically. Introducing Utility::MkDirP() which still
requires Win32 implementation.

refs #6328
2014-06-12 23:28:46 +02:00
Michael Friedrich
09ad04b09a Error messages: Use strerror() for message formatting.
Refs #6070
2014-06-05 17:45:02 +02:00
Michael Friedrich
f1e77a0579 Error Messages: Deal with socket exceptions.
Refs #6070
2014-06-05 14:36:50 +02:00
Michael Friedrich
076d297931 Change log message identifier for libbase.
Refs #6346
2014-05-28 14:42:00 +02:00
Gunnar Beutner
7f5d8a36b4 Split Utility::GetHostName into two functions.
Fixes #6312
2014-05-27 10:20:33 +02:00
Gunnar Beutner
3f2df5b656 Make sure that Utility::GetHostName() returns an FQDN.
Fixes #6312
2014-05-26 17:32:18 +02:00
Gunnar Beutner
632026cd9f Rename C++ header files.
Fixes #6291
2014-05-25 16:27:14 +02:00
Gunnar Beutner
1bc1356fe6 Windows build fix. 2014-05-22 21:32:08 +02:00
Gunnar Beutner
46165dbccf Make sort order for Utility::{Glob,GlobRecursive} deterministic.
Fixes #5854
2014-05-22 13:12:58 +02:00
Gunnar Beutner
b2246f3af9 Build fix for Windows.
Refs# 6191
2014-05-17 08:38:28 +02:00
Gunnar Beutner
3a1ce23aeb Implicitly set zone attribute for files includes from zones.d.
Refs #6191
2014-05-13 14:40:12 +02:00
Gunnar Beutner
9c3e399188 Remove unnecessary includes.
Fixes #6189
2014-05-11 18:11:32 +02:00
Gunnar Beutner
c7b5e4c31e Fix some compiler warnings.
Refs #5823
2014-05-11 06:04:43 +02:00
Gunnar Beutner
45270f1bb8 Refactor the agent and cluster components.
Refs #6107
2014-05-08 09:13:04 +02:00
Gunnar Beutner
0571d8a464 Run INITIALIZE_ONCE() after static initializers.
Refs #6107
2014-05-08 09:13:04 +02:00
Gunnar Beutner
b119c3285b Change log level for some messages.
Fixes #6072
2014-04-29 11:01:28 +02:00
Gunnar Beutner
ea24147d0d Add uptime information to the "icinga" check type.
Fixes #6064
2014-04-28 09:23:52 +02:00
Gunnar Beutner
e19948fc95 Add agent setup wizard for Windows.
Refs #4865
2014-04-18 12:39:50 +02:00
Gunnar Beutner
0fb55f3404 Fix NSIS installer and Windows service.
Refs #4865
2014-04-18 12:15:01 +02:00
Gunnar Beutner
70062b5884 Make sure that Utility::GlobRecursive doesn't recurse into . and ..
Fixes #5946
2014-04-05 23:23:42 +02:00
Gunnar Beutner
04dcceef59 Implement Utility::GetSymbolName and Utility::GetSymbolSource for Windows.
Refs #5870
2014-03-30 01:20:58 +01:00
Gunnar Beutner
27955843c0 Move Addr2Line function to the Utility class.
Refs #5846
2014-03-23 19:39:25 +01:00
Michael Friedrich
ce737ff2f3 Change copyright header (again).
Fixes #5424
2014-03-19 11:42:47 +01:00
Michael Friedrich
7d9dc1a36b Fix including a non-existing directory exception requires path information.
Fixes #5618
2014-02-07 13:23:26 +01:00
Michael Friedrich
1e0a11c7f2 Add IcingaNodeName script variable, set as check source (WIP).
Fixes #5471
Fixes #5473
2014-02-06 15:38:06 +01:00
Gunnar Beutner
984ffb7421 Fix memory leak in Utility::GlobRecursive.
Fixes #5604
2014-02-05 13:53:56 +01:00
Michael Friedrich
555d72150a Update copyright header.
Fixes #5424
2014-01-09 00:32:11 +01:00
Gunnar Beutner
e7184225f3 Improve performance for icinga::Deserialize.
Refs #5327
2013-12-13 14:08:11 +01:00
Gunnar Beutner
37179cdf32 Improve config compiler performance.
Refs #5327
2013-12-13 14:07:37 +01:00
Gunnar Beutner
af6df9f268 Improve compatibility with Windows.
Fixes #5287
2013-12-09 13:46:53 +01:00
Gunnar Beutner
41ded2858c Implement scheduled downtimes.
Fixes #3584
2013-12-06 13:45:18 +01:00
Gunnar Beutner
4648b82b33 Fix compiler warning for Utility::GlobRecursive.
Refs #5246
2013-12-02 11:18:16 +01:00
Gunnar Beutner
9f7e5b1845 Fix compiler warning.
Refs #5245
2013-11-29 17:06:48 +01:00
Gunnar Beutner
f8d2172c27 Implement include_recursive config directive.
Fixes #5238
2013-11-29 12:26:31 +01:00
Gunnar Beutner
e32a149049 Glob: Use stat() instead of lstat().
Refs #5123
2013-11-22 10:41:57 +01:00
Gunnar Beutner
0978e46d5a Implement file type flags for Utility::Glob.
Fixes #5123
2013-11-22 09:03:52 +01:00
Gunnar Beutner
6ccf4497f2 Fix unit tests on Windows.
Fixes #5068
2013-11-13 09:08:17 +01:00
Gunnar Beutner
5e68746128 Implement Utility::DemangleSymbolName on Windows.
Fixes #5010
2013-11-05 20:26:05 +01:00
Gunnar Beutner
8586f90379 Implement support for loading OS X libraries.
Refs #4993
2013-11-04 07:49:51 +01:00
Gunnar Beutner
f2307c4242 Add cmake build files.
Refs #4962
2013-11-03 13:45:26 +01:00
Gunnar Beutner
9f1c4539dc Remove libltdl dependency.
Refs #4964
2013-10-30 12:00:55 +01:00
Gunnar Beutner
3cb6e3bf82 Make sure to #include <pthread_np.h> on FreeBSD. 2013-10-21 09:52:45 +02:00
Gunnar Beutner
f449eb9e84 Implement Utility::Random(). 2013-10-03 22:10:46 +02:00
Michael Friedrich
e8bd81bddc db_ido: Add idoutils 1.x schema, check required 1.10.0 version.
fixes #4766
2013-09-27 15:56:22 +02:00
Gunnar Beutner
bf1a800e39 Update copyright information. 2013-09-25 07:45:56 +02:00
Gunnar Beutner
31a55987e5 cluster: Implement domain support. 2013-09-17 13:18:40 +02:00
Gunnar Beutner
95909d82fe cluster: Implement authority checks. 2013-09-12 10:04:04 +02:00
Gunnar Beutner
161c933edc Build fix: Check if pthread_setname_np() is available. 2013-09-08 13:13:37 +02:00
Gunnar Beutner
e05f270459 base: Don't set thread name for the first thread. 2013-09-03 15:44:31 +02:00
Gunnar Beutner
d5650c90c9 Fix grammar mistake. 2013-09-02 10:53:01 +02:00
Gunnar Beutner
86e2f3dd81 Windows build fix. 2013-09-01 06:01:27 +02:00
Gunnar Beutner
7f52e04a01 Implement OS-specific support for thread names. 2013-08-30 10:19:32 +02:00
Gunnar Beutner
e9e55cd8c0 Remove the replication feature and clean up the code. 2013-08-26 14:56:38 +02:00
Gunnar Beutner
10dff1d8c1 Removed dependency on boost/uuid. 2013-05-03 11:26:18 +02:00
Gunnar Beutner
fd3e92ea0c Refactor AsyncTasks. 2013-03-25 17:36:15 +00:00
Gunnar Beutner
28335db4ba Windows build fix. 2013-03-22 16:05:48 +01:00
Gunnar Beutner
c63684a72f Shell-escape macros. 2013-03-22 10:58:47 +01:00
Gunnar Beutner
734f76af96 Windows build fix. 2013-03-18 22:40:40 +01:00
Gunnar Beutner
5cd387016d Refactored #includes (Part 6). 2013-03-18 19:02:42 +01:00
Gunnar Beutner
2a8bc3ca0f Refactor #includes (Part 5). 2013-03-18 17:39:40 +01:00
Gunnar Beutner
0bb0711d72 Refactor #includes (Part 2). 2013-03-16 21:18:53 +01:00
Gunnar Beutner
3073200b53 Cleaned up #includes (Part 1). 2013-03-15 18:21:29 +01:00
Gunnar Beutner
3c363499bb Eliminate the Component class.
Fixes #3832
Fixes #3840
2013-03-12 13:45:54 +01:00
Gunnar Beutner
4b2d828b99 Refactor the init script and remove the -d option.
Fixes #3666
2013-03-12 11:48:45 +01:00
Gunnar Beutner
412a44e697 Windows build fix. 2013-03-11 14:08:55 +01:00
Gunnar Beutner
d8edd98e41 Add more information to exceptions. 2013-03-11 13:47:17 +01:00
Gunnar Beutner
fa3f01667f Implemented stacktrace support for Windows. 2013-03-07 15:00:26 +01:00
Gunnar Beutner
b674d46557 Implemented the LONGDATETIME, SHORTDATETIME, DATE and TIME macros. 2013-02-28 10:27:33 +01:00
Gunnar Beutner
a4c7052a6e Fine-grained locks (WIP, Part 2). 2013-02-18 14:40:24 +01:00
Gunnar Beutner
c63c28dd9c Fine-grained locks (WIP, Part 1). 2013-02-17 19:14:34 +01:00
Gunnar Beutner
79bf945868 Implement calling Python functions. 2013-02-16 07:49:36 +01:00
Gunnar Beutner
099821ce07 Windows build fix. 2013-02-14 10:59:01 +01:00
Gunnar Beutner
c91191e701 Implement global mutex (for use by scripting languages). 2013-02-14 10:55:47 +01:00
Gunnar Beutner
49576d3a82 Use #if rather than #ifdef to check HAVE_* macros. 2013-02-14 10:55:15 +01:00
Gunnar Beutner
26e2da7a7d Refactor the FD_CLOEXEC/O_NONBLOCK code. 2013-02-13 13:03:21 +01:00
Gunnar Beutner
2893134940 Make Application::ProcessEvents() static. 2013-02-13 07:25:36 +01:00
Gunnar Beutner
85e469019f Windows bugfixes for Utility::DirName and Utility::Glob. 2013-02-09 10:43:11 +01:00
Gunnar Beutner
b887f14d96 Use BOOST_THROW_EXCEPTION instead of boost::throw_exception()
Fixes #3636
2013-02-06 12:51:12 +01:00
Gunnar Beutner
e047e06fc8 Finish implementing %validator.
Fixes #3634
2013-02-06 12:09:50 +01:00
Gunnar Beutner
eadb309dab Bugfix: Add missing parenthesis in function call. 2013-02-06 11:39:32 +01:00
Gunnar Beutner
53705d16dc Implement AsyncTask::Wait() and make completion callbacks optional. 2013-02-06 10:56:06 +01:00
Gunnar Beutner
383d2369b1 Bugfix: Make sure Utility::Glob return false if no matching files were found. 2013-02-03 01:30:19 +01:00
Gunnar Beutner
18f935cfa2 Added missing const qualifiers. 2013-02-02 09:19:49 +01:00
Gunnar Beutner
11cf07fa9c Config: implement support for wildcard includes
Fixes #2771
2013-02-02 00:32:18 +01:00
Gunnar Beutner
24e2d1d3f2 Use boost::lexical_cast instead of stringstreams. 2013-01-31 10:10:51 +01:00
Gunnar Beutner
ff0e6d91d2 Move exception_handler into libbase. Add handler for SIGABRT.
Fixes #3590
2013-01-30 11:51:15 +01:00
Gunnar Beutner
7c65757219 Implement Utility::NewUUID().
Fixes #3589
2013-01-30 09:08:48 +01:00
Gunnar Beutner
7dc761236d Remove InitializeLibrary TODO.
Closes #3538
2013-01-22 09:04:36 +01:00
Gunnar Beutner
70c66fa542 Implemented the #library directive and fixed loading icinga.dll on Windows. 2013-01-17 15:05:34 +01:00
Gunnar Beutner
5ff640fd14 Fixed Utility::Sleep on Windows. 2012-09-27 10:05:54 +02:00
Gunnar Beutner
c5479057f7 Make exception messages more verbose. 2012-09-27 09:38:28 +02:00
Gunnar Beutner
74a3bca0f6 Fixed crash in Utility::Daemonize().
Fixes #3194
2012-09-27 08:21:07 +02:00
Gunnar Beutner
edf812b6b5 Removed ::Sleep and implemented Utility::Sleep. 2012-09-25 15:41:43 +02:00
Gunnar Beutner
97829fbfcd Cleaned up the code a bit. 2012-09-21 09:43:06 +02:00
Gunnar Beutner
852ad5d964 Added Utility::GetPid() helper function. 2012-09-19 13:00:48 +02:00
Gunnar Beutner
fee4246f55 Updated doxygen documentation. 2012-09-17 13:35:55 +02:00
Gunnar Beutner
9bc93ce4a9 Renamed 'doc' to 'docs'.
Moved Doxygen files to docs/.
Removed cJSON directory.
Moved libraries into lib/.
Renamed 'config' to 'm4'.
Renamed 'dyn' library to 'config'.
2012-09-07 10:27:31 +02:00
Renamed from base/utility.cpp (Browse further)