Michael Friedrich
bb3b724219
Fix object sync for modified attributes
...
refs #9851
refs #9927
refs #9081
2015-09-29 14:24:39 +02:00
Michael Friedrich
e5b26e60a5
Don't throw an exception when replaying the current replay log file
...
fixes #10239
2015-09-29 11:02:08 +02:00
Gunnar Beutner
0e40c3ee1d
Fix deadlock in TlsStream::Close
...
fixes #10235
2015-09-29 10:31:16 +02:00
Gunnar Beutner
8dec953829
Fix incorrect variable in Url::ParsePort
...
refs #10224
2015-09-29 08:28:30 +02:00
Gunnar Beutner
143aa13118
Make Icinga Studio work with the latest API version
...
fixes #10224
2015-09-29 08:09:48 +02:00
Gunnar Beutner
8a2c7a055d
Remove debug code
...
refs #9077
2015-09-29 06:48:16 +02:00
Michael Friedrich
76baeadb5b
Fix wrong query type in modify object api request
...
refs #10212
2015-09-28 19:14:38 +02:00
Gunnar Beutner
b40152f9fb
Fix null pointer dereference in StatusTargetProvider::GetTargetByName
...
refs #9088
2015-09-28 16:31:49 +02:00
Michael Friedrich
f498ce39f3
Improve api error handling
...
refs #10194
2015-09-28 16:08:14 +02:00
Michael Friedrich
a2058f0e55
Fix incorrect parameter name for status queries
...
refs #9088
2015-09-28 15:19:01 +02:00
Gunnar Beutner
f091379177
Fix: PerfdataValue is not properly serialised in status queries
...
fixes #10211
2015-09-28 14:37:50 +02:00
Gunnar Beutner
425a1a0166
Implement API permissions
...
fixes #9088
2015-09-28 14:30:46 +02:00
Gunnar Beutner
8a5d71a565
Move /v1/<type> to /v1/objects/<type>
...
refs #10212
2015-09-28 08:39:56 +02:00
Michael Friedrich
6549721ec6
Ensure that multiple object handler request methods still work
...
refs #10194
2015-09-27 15:27:08 +02:00
Michael Friedrich
717118fed4
Fix wrong log lag in cluster-zone check
...
Refactor the calculation into a generic function
which is also used inside the 2.4 status API.
fixes #8805
2015-09-25 14:24:45 +02:00
Jean-Marcel Flach
5ef4204d06
Improve API error handling and fix some whitespace
...
fixes #10194
2015-09-25 13:57:28 +02:00
Jean-Marcel Flach
15a46958f0
Rename statusqueryhandler to objectqueryhandler
...
fixes #10209
2015-09-24 17:38:44 +02:00
Jean-Marcel Flach
d8eca3d0c2
Move /status/Collection to /status
...
fixes #10210
2015-09-24 15:26:57 +02:00
Michael Friedrich
aa12a4e75c
Add icinga, cluster, cluster-zone check information to the ApiListener status handler
...
fixes #8093
2015-09-23 18:09:46 +02:00
Jean-Marcel Flach
4ef9761fee
Implement status api handler
...
Global statistics, features, etc.
fixes #10116
2015-09-23 16:59:07 +02:00
Gunnar Beutner
b163e4a002
Make ConfigObject::{Get,Set}Field() methods public
...
fixes #10186
2015-09-23 08:33:18 +02:00
Gunnar Beutner
1a6b41787a
Implement joins for status queries
...
fixes #10060
2015-09-22 09:45:23 +02:00
Michael Friedrich
f7b5aa33ce
Fix a couple of wrong white spaces
2015-09-18 13:04:09 +02:00
Michael Friedrich
57179f3bdd
Only sync objects actually belonging to a cluster zone
...
refs #9927
refs #9100
2015-09-18 12:49:38 +02:00
Michael Friedrich
f2c3bffdd9
Sync cluster config before replaying the logs
...
If there were objects added at runtime (either through direct api
creation or by using the config file management api) the newly
created objects must be synced first, and then the stored historical
data should be synced.
refs #9927
refs #9100
2015-09-18 10:07:13 +02:00
Michael Friedrich
18d645e4ef
Add zone attribute influencing cluster config sync for API objects
...
1) No zone defined. The object will only be synced in the local zone for HA purposes.
2) Zone is set to 'master'. Only nodes in the master zone will get this object and updates synced.
3) Zone is set to 'satellite'. Only nodes in the satellite zone, or in parent zones above will get this object and updates synced.
4) Zone is set to 'client'. Only nodes in the client zone, and in parent zones (satellite, master) will get object updates.
Furthermore this commit adds a bit more security measures for syncing object
config bottom-up which is clearly restricted at this time. Clients cannot
send their config to the top, but yet we only support the top-down thing we
also have with the cluster file config sync.
The initial sync will also take the zone relation model into account
and only allow object syncs only when the same conditions apply as written
above.
refs #9927
refs #9100
2015-09-17 14:20:44 +02:00
Michael Friedrich
0fd9d3406b
Prevent object deletion on shutdown when checking !IsActive()
...
This is fairly ugly and sets an extension for the ConfigObjectUtility
delete handler to signal the OnActiveChanged handler inside the cluster
configsync to send a delete event to the other nodes.
refs #9927
2015-09-17 14:20:44 +02:00
Michael Friedrich
4955c28b0c
Implement initial api object sync for newly connected endpoints
...
TODO: Figure out how to deal with Shutdown() deactivating and
therefore deleting all api created objects.
refs #9927
2015-09-17 14:20:44 +02:00
Michael Friedrich
b2715943c6
Config Sync: Properly modify attributes and object version
...
refs #9927
2015-09-17 14:20:44 +02:00
Michael Friedrich
81a0bc6f1b
Implement deleting api created objects in the cluster
...
refs #9927
2015-09-17 14:20:44 +02:00
Michael Friedrich
f9c058eca2
Implement object config sync permissions and modified attributes based on version
...
refs #9927
2015-09-17 14:20:43 +02:00
Gunnar Beutner
6fa58a520c
Implement config object sync
...
Adds object version.
refs #9927
2015-09-17 14:20:43 +02:00
Jean Flach
6571ffc2c8
Update url parser
...
fixes #10039
2015-09-04 14:40:27 +02:00
Gunnar Beutner
5c77e6eafe
Fix deadlock in ApiListener::RelayMessage
...
fixes #10002
2015-09-02 07:46:30 +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
Gunnar Beutner
6705853e33
Add plural_name field to /v1/types
...
fixes #10038
2015-08-29 12:05:44 +02:00
Gunnar Beutner
9d9a7ca73d
Fix filtering by name
...
fixes #10027
2015-08-28 10:52:59 +02:00
Gunnar Beutner
d7a21c2361
Fix incorrect HTTP encoding
...
refs #10024
2015-08-28 10:03:26 +02:00
Gunnar Beutner
49fd5b582d
Fix: HttpHandler is calling HttpResponse::Finish twice for 404s
...
fixes #10024
2015-08-28 09:49:31 +02:00
Jean Flach
f1a1dfb26e
Update use of String::Trim()
...
fixes #9704
2015-08-27 18:06:20 +02:00
Jean Flach
01ced1549a
Implement all actions except modified attributes
...
refs #9080 #9979
2015-08-26 13:53:17 +02:00
Gunnar Beutner
b6eb621d30
Add missing field attribute for the /v1/types API handler
...
refs #9076
2015-08-26 11:02:22 +02:00
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