Commit Graph

296 Commits

Author SHA1 Message Date
Gunnar Beutner 06f02f8b10 Implement reflection support for the API
fixes #9076
2015-08-26 10:58:59 +02:00
Gunnar Beutner 1f63bcb1b3 Remove unused argument 'async'
refs #9972
2015-08-26 06:57:24 +02:00
Gunnar Beutner de09a562f6 Use dependency graph when deleting objects
refs #9096
2015-08-26 06:35:06 +02:00
Jean Flach 2a9ac26338 Move endpoint error check to ti file
refs #9623
2015-08-25 17:06:08 +02:00
Jean Flach 9b05304435 Add config error on empty port in Endpoints
fixes #9623
2015-08-25 16:44:32 +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 380b1275b7 Clean up the API action code a bit
refs #9080
2015-08-24 08:01:33 +02:00
Michael Friedrich 92364d7b73 Remove debug messages in HttpRequest class
fixes #9946
2015-08-21 14:46:18 +02:00
Jean Flach c5fe46a300 Experimental actions without types
refs #9080
2015-08-21 12:48:32 +02:00
Gunnar Beutner b3db2ee1f6 Fix crash in ConfigObjectUtility::CreateObject
refs #9082
2015-08-18 20:25:06 +02:00
Gunnar Beutner da7d04581d Add missing attributes for dependent objects
refs #9082
2015-08-18 19:39:10 +02:00
Gunnar Beutner 71dc682924 Implement support for "." in attributes when creating objects
refs #9082
2015-08-18 16:53:30 +02:00
Gunnar Beutner 0cbcb75e79 Ensure that runtime config objects are persisted on disk
refs #9101
fixes #9926
2015-08-18 14:21:55 +02:00
Gunnar Beutner d8cab2f0e8 Add 'override' keyword to methods
refs #9929
2015-08-18 12:45:30 +02:00
Gunnar Beutner 60a30d50f6 Don't allow users to delete objects that weren't created using the API
refs #9082
2015-08-18 08:22:14 +02:00
Gunnar Beutner d118b71a2a Fix compiler warnings
fixes #9929
2015-08-18 07:46:04 +02:00
Gunnar Beutner 147f69a8f6 Implement support for filter_vars
fixes #9940
2015-08-18 06:47:07 +02:00
Gunnar Beutner 071d2f18fb Rename DynamicObject/DynamicType to ConfigObject/ConfigType
fixes #9914
2015-08-15 20:40:41 +02:00
Gunnar Beutner 827de21907 Improve error messages for duplicate objects
refs #9101
2015-08-15 20:07:12 +02:00
Gunnar Beutner ce2735f10b Fix validation errors when creating objects with the API
refs #9101
2015-08-15 20:07:11 +02:00
Gunnar Beutner e2290d5012 Implement support for unregistering objects
refs #9101
2015-08-15 20:07:11 +02:00
Gunnar Beutner 16ddc12c06 Implement support for creating objects
refs #9101
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
Michael Friedrich d7970f5bb1 Implement modified attributes v2
refs #9081
refs #9093
2015-08-15 20:07:10 +02:00
Gunnar Beutner 1c657feea1 Fix warnings about invalid API function 'icinga::Hello'
fixes #9884
2015-08-11 14:19:20 +02:00
Gunnar Beutner 2e43c57d6b Make sure we're always creating the conf.d and zones.d directories
fixes #9879
2015-08-11 12:59:26 +02:00
Gunnar Beutner ec8cdcd554 Fix incorrect function name
refs #9876
2015-08-11 12:56:30 +02:00
Gunnar Beutner f600d75930 Fix crash during cluster log replay
fixes #9876
2015-08-11 12:09:17 +02:00
Gunnar Beutner 73b72544ee Fix URL handlers
refs #9768
2015-08-11 09:31:56 +02:00
Michael Friedrich d7e8d8afc9 Fix cluster check w/ immediate parent and child zone endpoints
fixes #9262
2015-08-03 16:16:46 +02:00
Michael Friedrich 6f47c1badc Fix S_ISDIR on Windows
fixes #9813
2015-08-03 15:13:45 +02:00
Jean-Marcel Flach 9b6ebbc69b Implement basic actions framework
refs #9080
2015-07-30 17:50:17 +02:00
Gunnar Beutner 625a7eafbe Fix URL parameters for filters
refs #9077
2015-07-30 08:30:39 +02:00
Gunnar Beutner f74148f157 Fix HTTP handlers
refs #9768
2015-07-29 13:39:58 +02:00
Jean Flach 2414dee602 Update url parser
fixes #9768
2015-07-29 13:14:43 +02:00
Gunnar Beutner a97782b3e5 Implement support for limiting output attributes
refs #9077
fixes #9614
2015-07-28 17:12:51 +02:00
Gunnar Beutner 5fd7c42faf Fix incorrect URL for status queries
refs #9077
2015-07-28 14:54:16 +02:00
Gunnar Beutner 8fc1d6d0d0 Improve error messages a bit
refs #9077
2015-07-28 14:40:44 +02:00
Gunnar Beutner 15e5dbd151 Add support for implicit 'true' filter when filter parameter is missing
refs #9077
2015-07-28 14:33:09 +02:00
Gunnar Beutner 890694e629 Implement support for filters
fixes #9077
2015-07-28 13:57:59 +02:00
Michael Friedrich fa3d380dff Fix a problem where invalid stage config could lead into broken stages
refs #9103
refs #9083
2015-07-24 16:05:13 +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 43ff15cf86 Fix problem with child nodes in http url registry
fixes #9703
2015-07-22 12:27:07 +02:00
Gunnar Beutner 6c3bafb722 Implement support for the X-HTTP-Method-Override HTTP header
fixes #9698
2015-07-22 08:28:15 +02:00
Gunnar Beutner f1a95e3340 Fix incorrect filename in ApiListener::SyncZoneDir
refs #9083
2015-07-21 11:45:53 +02:00
Gunnar Beutner ccd63b9d15 Implement the include_zones directive
refs #9083
2015-07-21 09:32:17 +02:00
Michael Friedrich 4bc42281be Build fix for Linux
refs #9647
2015-07-20 17:21:27 +02:00
Gunnar Beutner e47d5006d2 Build fix for Windows
refs #9647
2015-07-20 13:41:58 +02:00
Jean-Marcel Flach b9a4a64249 Move url handler to /lib/remote
fixes #9647
2015-07-16 13:35:32 +02:00
Gunnar Beutner ceea8a24d3 Add missing HTTP response headers
refs #9594
2015-07-13 08:29:48 +02:00
Michael Friedrich 269e79647f Rename HttpRequest.Url to HttpRequest.RequestUrl
Otherwise gcc will break with the Url class, clang works.

refs #9447
2015-07-09 17:32:19 +02:00
Michael Friedrich 8bf949852a API: Implement password- and certificate-based authentication
fixes #9086
fixes #9085
refs #9594
2015-07-09 15:27:14 +02:00
Michael Friedrich f8f86d89a4 Add ApiUser::GetByClientCN()
refs #9471
refs #9086
2015-07-09 15:25:51 +02:00
Michael Friedrich 58a3cd7fef Add Base64::{En,De]code()
fixes #9594
2015-07-09 15:20:47 +02:00
Michael Friedrich 9b469453a7 Fix compiler warnings
refs #9447
2015-07-09 12:46:04 +02:00
Michael Friedrich 14baa4a79b Build fix
refs #9447
2015-07-09 12:28:15 +02:00
Gunnar Beutner b357012ded Implement HTTP support
refs #9447
2015-07-09 11:42:34 +02:00
Michael Friedrich 8450cb5d6c MAke ApiUser::CheckPassword() const
refs #9471
2015-07-02 09:26:43 +02:00
Michael Friedrich 14f5986aa5 Implement the ApiUser object type
Hide password in GetPassword() and add CheckPassword().
Includes basic unit tests.

refs #9471
2015-06-24 14:28:52 +02:00
Gunnar Beutner 8dcb4efa5e Fix stability issues with the TlsStream/Stream classes
fixes #9481
2015-06-24 09:48:55 +02:00
Markus Frosch cfbe82d841 Remove selective reconnecting behavior
We want to remove the partial reconnecting behavior, so that all endpoints of
a zone try to connect to a lower or higher zone in hierarchy.

fixes #9406

Signed-off-by: Michael Friedrich <michael.friedrich@netways.de>
2015-06-15 14:47:04 +02: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
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
Gunnar Beutner 44114232d3 Fix timeout problem with API heartbeat messages
fixes #8672
2015-03-11 12:53:43 +01:00
Gunnar Beutner 4e16f48255 Don't accept config updates for zones for which we have an authoritative copy of the config
fixes #8555
2015-03-09 08:46:01 +01:00
Gunnar Beutner fd9dc32a3d Implement SNI support for the TlsStream class
fixes #8610
2015-03-05 14:15:42 +01:00
Gunnar Beutner e52a1f38f3 Fix uninitialized field in the ApiListener class
Coverity Bug ID: 1272321
2015-03-02 10:14:14 +01:00
Gunnar Beutner 4cc7d4963c Refactor the API timeout timer
refs #8554
2015-02-27 20:18:20 +01:00
Gunnar Beutner d7000fa757 Make sure that the timeout timer gets destroyed properly
refs #8554
2015-02-27 19:54:41 +01:00
Gunnar Beutner 9622b075bc Use the main threadpool to disconnect API clients
refs #8554
2015-02-27 18:32:28 +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 2884e8318d Fix null pointer dereference in ApiClient::TimeoutTimerHandler
fixes #8553
2015-02-27 14:12:50 +01:00
Gunnar Beutner bb2cdff435 Fix a deadlock in ApiClient::Disconnect
fixes #8549
2015-02-26 17:23:06 +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 c439ee6d9f Fix a crash in ApiClient::TimeoutTimerHandler
refs #8485
2015-02-26 13:31:38 +01:00
Gunnar Beutner 1302f7c841 Improve log message for cluster connection timeouts
refs #8485
2015-02-26 13:09:13 +01:00
Gunnar Beutner a3ccd2a1fb Close client connections if we haven't received any messages in some time
refs #8485
2015-02-26 12:41:47 +01:00
Gunnar Beutner 2b44fcb571 Make sure that the 'connecting' flag is reset properly
refs #8485
2015-02-26 11:26:08 +01:00
Gunnar Beutner 5fe2536629 Add missing locks in ApiListener::UpdateConfigDir 2015-02-24 16:03:32 +01:00
Michael Friedrich ba77d7b35f ApiListener: Fix misleading connection log messages
fixes #8493
2015-02-20 15:11:44 +01:00
Gunnar Beutner 33e747ae2e Don't require tickets for clients which already have a trusted certificate
fixes #8465
2015-02-18 08:13:44 +01:00
Gunnar Beutner 667b62cc3c Improve log messages for ApiListener::ApiTimerHandler 2015-02-17 15:46:29 +01:00
Gunnar Beutner d5c33d84f7 Fix a deadlock in ApiClient::~ApiClient
fixes #8462
2015-02-17 14:31:10 +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 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
Gunnar Beutner b0f7a29212 Add missing spaces in some error messages
refs #7995
2015-02-10 08:57:54 +01:00
Gunnar Beutner f07fb97264 Fix timestamp format for the .timestamp file
fixes #8313
2015-02-09 15:22:55 +01:00
Gunnar Beutner 97fc5bb10b Implement additional attributes for the Host class
refs #7564
2015-02-09 08:50:17 +01:00
Gunnar Beutner 67e50a3d47 Config sync: Open config files in binary mode
fixes #8390
2015-02-09 07:44:45 +01:00
Michael Friedrich 21f86b9061 Fix authoritative zones in config sync
fixes #8388
refs #8256
2015-02-07 23:41:43 +01:00
Michael Friedrich ea2ac81003 Remove name and return value for stats functions
fixes #6171
2015-02-07 22:36:17 +01:00
Michael Friedrich 289ca2ec24 Improve error messages on Endpoint not belonging to a zone or multiple zones
fixes #8372
2015-02-07 20:07:34 +01:00
Gunnar Beutner 88e1aadbf2 Use a separate thread for TLS connection attempts
fixes #8295
2015-01-28 08:35:36 +01:00
Michael Friedrich 78bfd0204c Update copyright year 2015-01-22 12:00:23 +01:00
Gunnar Beutner 310278344c Make sure we don't include zones.d directories for zones which were removed
fixes #8256
2015-01-20 13:18:40 +01:00
Gunnar Beutner 55b7f00382 Remove unnecessary includes 2014-12-15 10:16:06 +01:00
Gunnar Beutner c70623ec7c Add log message for heartbeat timeouts
refs #7745
2014-12-10 09:57:08 +01:00
Gunnar Beutner 4a81dbb6fc Build fix for Windows 2014-12-09 15:07:49 +01:00
Gunnar Beutner 4d657163c3 Implement heartbeat messages for the cluster
fixes #7745
2014-12-09 13:17:27 +01:00
Michael Friedrich a07600a469 Fix missing lock in ConfigUpdateHandler() 2014-12-01 13:19:55 +01:00
Gunnar Beutner 8611682cdb Fix initialization for the ApiListener class
fixes #7780
2014-11-21 23:23:31 +01:00
Gunnar Beutner 7fc5af6aff Fix initialization bug for the Endpoint class
refs #7780
2014-11-21 21:01:44 +01:00
Gunnar Beutner 7321e45abc Implement support for executing remote commands
fixes #7559
2014-11-13 14:54:55 +01:00
Gunnar Beutner 11710ef683 Fix static initializers
refs #7634
2014-11-11 13:24:44 +01:00
Gunnar Beutner 478f03b49a Replace boost::shared_ptr with boost::intrusive_ptr
refs #7622
2014-11-09 16:54:41 +01:00
Michael Friedrich a362b5c14c Fix Zone::IsGlobal() 2014-11-08 22:57:09 +01:00
Gunnar Beutner 266b1754c7 Speed up type lookups
refs #7561
2014-11-07 12:39:32 +01:00
Gunnar Beutner 170c5a59e4 Implement typeof() function 2014-11-03 00:45:14 +01:00
Michael Friedrich f69527599f Cli: Fix serial.txt permissions for 'node setup/wizard'
fixes #7546
2014-11-02 19:38:35 +01:00
Gunnar Beutner 7559273359 Replace cJSON with YAJL
fixes #7452
2014-10-26 20:00:35 +01:00
Gunnar Beutner 5cb08f3ecc Fix incorrect attribute name
fixes #7446
2014-10-24 17:48:02 +02:00
Gunnar Beutner 17003d0157 Remove unnecessary initializers
refs #7247
2014-10-23 19:02:16 +02:00
Gunnar Beutner 9368ff0e03 Update some more log messages 2014-10-20 10:09:57 +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 92896311f3 Implement support for C/C++ comments in the TI compiler
fixes #5018
2014-10-17 19:44:31 +02:00
Gunnar Beutner 97cf93089b Build fix for FreeBSD 2014-10-16 13:36:25 +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 311cce5d41 Allow TLS connections with unverified certificates
refs #7244
2014-10-16 09:01:18 +02: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 092983d5ad Properly deal with closed TLS streams
fixes #6892
2014-09-09 15:28:55 +02:00
Gunnar Beutner 9a06b09366 ApiClient: Don't try to write to closed streams
refs #6892
2014-09-09 15:12:39 +02:00
Gunnar Beutner 5bb3971f0b Increase queue size for API clients
fixes #6841
fixes #7096
2014-09-05 11:54:47 +02:00
Gunnar Beutner 6f2ea6bc08 Fix build problems with Oracle Solaris Studio
refs #6896
2014-09-02 13:09:17 +02:00
Gunnar Beutner eb091a87b0 Implement support for unity builds
fixes #7034
fixes #7035
2014-08-30 20:02:12 +02:00
Gunnar Beutner fca79dd66c Check object access when replaying log files
fixes #6205
2014-08-26 11:01:29 +02:00
Gunnar Beutner f7f8bd9b00 Use const-ref specifier when catching exceptions
refs #6070
2014-08-25 08:36:30 +02:00
Gunnar Beutner 2c7f440a73 Implement support for ApiListener::bind_host
fixes #6998
2014-08-25 08:27:19 +02:00
Gunnar Beutner 3972aa20c4 Change log level for one of the log messages
refs #6066
2014-08-22 16:00:57 +02:00
Gunnar Beutner 29db3f0972 Add more log messages for API connections
refs #6066
2014-08-22 15:39:34 +02:00
Gunnar Beutner 107a152a8f Improve TLS and cluster error messages
refs #6066
2014-08-20 14:07:23 +02:00
Michael Friedrich f6c24f8964 DB IDO: Delay connection in HA RunOnce mode
refs #6827
refs #6203
2014-08-15 17:21:12 +02:00
Michael Friedrich de229f9fec Exit early on ApiListener SSL errors
refs #6682
2014-08-05 12:14:24 +02:00
Gunnar Beutner 883170a806 Avoid duplicate API connections
refs #6724
2014-08-05 09:10:59 +02:00
Michael Friedrich 51329f0b3c Bail early if ApiListener cannot be started
refs #6682
2014-08-04 17:23:41 +02:00
Gunnar Beutner 9c9982616b Properly close TLS connections
refs #6724
2014-08-04 13:35:12 +02:00
Gunnar Beutner 3c8e84e59e Fix an invalid pointer access in ApiClient::DisconnectSync
refs #6724
2014-08-04 12:48:46 +02:00
Gunnar Beutner 6455c51777 Fix a potential deadlock in ApiClient::Disconnect
refs #6724
2014-08-04 09:50:47 +02:00
Gunnar Beutner f6d6a82762 Fix crash in ApiClient::Disconnect
fixes #6672
2014-07-09 09:14:17 +02:00
Gunnar Beutner 65e69fcd37 Another attempt at fixing the API deadlock
fixes #6617
2014-07-01 09:41:02 +02:00
Gunnar Beutner 8b1579381e Revert "Fix another deadlock in ApiClient::SendMessage"
This reverts commit a0c0930325.
2014-07-01 08:57:57 +02:00
Gunnar Beutner a0c0930325 Fix another deadlock in ApiClient::SendMessage
refs #6368
2014-06-30 14:01:07 +02:00
Gunnar Beutner adccc41a8d Fix: Icinga doesn't send SetLogPosition messages when one of the endpoints fails to connect
fixes #6537
2014-06-23 10:00:02 +02:00
Michael Friedrich dea57e9dcf Replace existing mkdir() calls with Utility::MkDir()
refs #6328
2014-06-13 09:23:05 +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