Michael Friedrich
77ecdbd85c
Merge pull request #5581 from Icinga/fix/api-crash-race-condition
...
Fix possible race condition in ApiListener locking
2017-10-12 13:40:59 +02:00
Michael Friedrich
a521f49803
Fix debug builds on Apple Clang 9.0.0 (macOS High Sierra)
2017-10-02 13:49:42 +02:00
Gunnar Beutner
92727d13c7
Fix a build warning
...
refs #5443
2017-09-25 12:15:59 +02:00
Michael Friedrich
953d840cc1
Fix certificate paths for installers
...
refs #5450
2017-09-22 15:00:45 +02:00
Michael Friedrich
601c10b997
Remove bottom-up CLI commands
...
refs #4799
2017-09-22 14:04:43 +02:00
Jean Flach
79166a31d4
Revert "Add Log Warning in case active-stage is empty"
...
This reverts commit 287f72b0a0
.
2017-09-21 13:54:29 +02:00
Jean Flach
287f72b0a0
Add Log Warning in case active-stage is empty
...
Maybe Critical instead? Throwing an exception seems unnecessary.
refs #3668
2017-09-20 17:57:14 +02:00
Jean Flach
ef5013b903
Use locks in api config staging
...
refs #3668
2017-09-20 16:45:09 +02:00
ryanohnemus
1cb39994a5
API: Add optional reload parameter to config stage upload
...
You can now specify a boolean `reload` attribute that
will allow you to skip the icinga2 reload after config
validation. By default this is set to true.
The response text has been updated to show if icinga2
will reload or if it was requested to be skipped.
fixes #4769
2017-09-20 14:16:55 +02:00
Michael Friedrich
7bdeeeadcf
Silence log level for configuration file updates
...
This only helps with debugging the configuration sync, but seems
to be highlighted quite often in default configurations (where
the timestamp is equal).
refs #5566
2017-09-20 13:30:02 +02:00
Noah Hilverling
94fe1b2292
HttpServerConnection: Implement CORS support
...
fixes #4326
2017-09-20 13:18:29 +02:00
Michael Friedrich
9948bee51c
Fix API crash with race condition on locks
...
This was split from #5416 and #5419 .
More patches from #5419 are pending.
refs #5419
refs #5418
refs #5416
refs #5408
refs #5148
refs #5007
refs #4968
refs #4910
2017-09-18 15:25:29 +02:00
Gunnar Beutner
80421e4619
Build fix for OpenSSL < 1.0.2
...
refs #5450
2017-09-12 13:09:16 +02:00
Michael Friedrich
578dcbe861
Add some more verbose logging details
...
refs #5450
2017-09-12 12:52:50 +02:00
Michael Friedrich
501ade374c
Remove debug logging, fix ticket path, enhance logging
...
refs #5450
2017-09-12 12:52:49 +02:00
Gunnar Beutner
88e57f7fd4
Implement support for cleaning up certificate requests
...
refs #5450
2017-09-12 12:52:49 +02:00
Gunnar Beutner
2fec16952d
Remove unused code
...
refs #5450
2017-09-12 12:52:49 +02:00
Michael Friedrich
181b91b759
Enhance logging for certificate requests
...
Examples:
https://github.com/Icinga/icinga2/issues/5450#issuecomment-327479874
This also adds code comments where applicable.
refs #5450
2017-09-12 12:52:49 +02:00
Michael Friedrich
ce88e89cc0
Fix wrong cert path for CLI commands
...
refs #5450
2017-09-12 12:52:49 +02:00
Michael Friedrich
8040bda2e1
Change directory layout to /var/lib/icinga2/{ca,certs,certificate_requests}
...
refs #5450
2017-09-12 12:52:49 +02:00
Michael Friedrich
88b4a54e6b
Fix ticket hash calculation for indirectly connected clients
...
refs #5450
2017-09-12 12:52:49 +02:00
Gunnar Beutner
c02742925e
Refactor PkiUtility class
...
refs #5450
2017-09-12 12:52:49 +02:00
Michael Friedrich
1e7860f2b1
Implement ApiListener::Get*Dir() functions
...
refs #5450
2017-09-12 12:52:49 +02:00
Gunnar Beutner
6a533796e5
Update output format for the new CLI commands
...
refs #5450
2017-09-12 12:52:49 +02:00
Gunnar Beutner
774936bfe8
Implement support for pki::UpdateCertificate messages
...
refs #5450
2017-09-12 12:52:49 +02:00
Gunnar Beutner
623208d617
Implement support for forwarding certificate requests
...
refs #5450
2017-09-12 12:52:49 +02:00
Gunnar Beutner
03f5ccd252
Implement support for cleaning up expired API callbacks
...
refs #5450
2017-09-12 12:52:49 +02:00
Gunnar Beutner
cc43dc734b
Refuse to sign certificate if it already has the correct chain and doesn’t expire soon
...
refs #5450
2017-09-12 12:52:49 +02:00
Gunnar Beutner
440f848c7c
Improve error handling for JSON-RPC calls
...
refs #5450
2017-09-12 12:52:49 +02:00
Gunnar Beutner
a8cc0a601b
Add missing _unlink() calls for Windows
...
refs #5450
2017-09-12 12:52:49 +02:00
Gunnar Beutner
cb49ac1264
Delete ticket file once we have a signed certificate
...
refs #5450
2017-09-12 12:52:49 +02:00
Gunnar Beutner
4cfbf6eb17
Disconnect all clients when we update our own certificate
...
refs #5450
2017-09-12 12:52:49 +02:00
Gunnar Beutner
439251532e
Implement support for saving client tickets
...
refs #5450
2017-09-12 12:52:49 +02:00
Gunnar Beutner
192502f9e5
Implement support for reloading SSL certificates without a restart
...
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
a4684d1bfd
Implement support for sending pki::RequestCertificate messages in the cluster
...
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
Michael Friedrich
9e17ff874b
Logs: Change config sync update to highlight an information, not an error
...
fixes #5484
2017-09-12 12:52:49 +02:00
Gunnar Beutner
b316de8aea
Implement additional logging for the JsonRpc class
2017-09-12 12:52:49 +02:00
Jean Flach
de51966f52
Don't sent scheme and hostname in request
2017-09-06 16:01:02 +02:00
Michael Friedrich
873a553a4f
Enhance client connect/sync logging and include bytes/zone in logs
...
refs #5513
2017-08-21 11:31:24 +02:00
Stefar77
6b66e332fb
API: Fix requested attrs/joins/meta type errors in object query response
...
fixes #5377
Signed-off-by: Michael Friedrich <michael.friedrich@icinga.com>
2017-08-11 16:23:29 +02:00
Jean Flach
39c24e9ec9
Add check_nscp_api plugin for NSClient++ API checks
...
refs #4721
2017-06-13 21:17:16 +02:00
Gunnar Beutner
1fd2695e02
Fix compiler warnings
...
refs #5287
2017-05-29 09:13:19 +02:00
Michael Friedrich
d0dcb8a658
ApiListener: Handle zero JSON-RPC WQs gracefully for stats
...
refs #5266
refs #5133
2017-05-26 17:02:36 +02:00
Michael Friedrich
d366a63510
Add API & Cluster stats to /v1/status & icinga check performance metrics
...
refs #5133
2017-05-24 16:21:05 +02:00
Michael Friedrich
3753f53a67
Fix cluster crash w/ config sync
...
refs #5212
2017-05-12 10:48:11 +02:00
Gunnar Beutner
1c255140b5
Merge pull request #5242 from Icinga/feature/object-decl-expr
...
Allow expressions for the type in object/template declarations
fixes #5242
2017-05-11 14:30:29 +02:00
Gunnar Beutner
d05b7c4178
Allow expressions for the type in object/template declarations
2017-05-11 14:21:30 +02:00
Simon Murray
fc2c2d9a29
Verbose InfluxDB Error Logging
...
On a non 204 response we parse the HTTP response until complete e.g. do the headers
and body, not just the header. A new interface is added to the response to allow us
to determine the body size so that it may be read out and buffered. The body is
parsed and any error message printed out. In the event that the parsing fails the
raw body is dumped out; better than nothing!
fixes #4411
Signed-off-by: Michael Friedrich <michael.friedrich@icinga.com>
2017-05-11 12:13:41 +02:00
Michael Friedrich
f9e0fd2e3e
Beautify some log message for cluster config sync
...
refs #5212
2017-05-04 15:21:32 +02:00
Jean Flach
7c70d51b27
Add a few extra log messages
...
fixes #5212
2017-05-02 10:54:06 +02:00
Jean Flach
e29e25aefd
Fix timestamp path
...
fixes #5211
2017-05-02 10:30:42 +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
Jean Flach
1459970986
Add missing header
...
fixes #5135
2017-04-05 10:26:54 +02:00
Gunnar Beutner
2d9be77260
Clean up the code a bit
...
refs #4991
2017-03-29 10:17:03 +02:00
Gunnar Beutner
2d6434e96a
Improve log message in ConfigObjectUtility::DeleteObjectHelper
...
refs #5094
2017-03-27 10:46:35 +02:00
Michael Friedrich
d3a1f53647
API: Fix error code for invalid 'attrs' type for POST requests
...
fixes #5043
2017-03-01 11:33:43 +01:00
Gunnar Beutner
a75d7d69ec
Fix incorrect argument for Application::GetExePath
...
fixes #4709
2017-02-21 11:00:18 +01:00
Alexander A. Klimov
3cc8982053
Unify the JSON structures of responses to authorized and unauthorized requests
...
refs #4984
fixes #4988
Signed-off-by: Michael Friedrich <michael.friedrich@icinga.com>
2017-02-09 13:51:40 +01:00
Michael Friedrich
363a7f9dac
Fix unauthorized response in REST API when header requests JSON
...
fixes #4984
2017-02-09 09:13:58 +01:00
Michael Friedrich
905f208332
Log a warning for missing API permissions
...
fixes #4945
2017-02-08 17:05:53 +01:00
Michael Friedrich
e5f5284838
Add logging for started/stopped features
...
fixes #3557
2017-02-08 15:40:27 +01:00
Michael Friedrich
336deea02f
Ensure that api/log is created before attempting to write the current replay log
...
fixes #4977
2017-02-08 13:06:31 +01:00
Michael Friedrich
4658cb391e
Fix logging for discarded cluster messages
...
fixes #4930
fixes #4969
2017-02-02 13:47:18 +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
b10a6b75a8
API: Change log level for console endpoint
...
fixes #11329
2016-12-08 00:59:24 +01:00
Gunnar Beutner
fe12a10c89
Remove redundant check
...
refs #13409
2016-12-06 08:57:27 +01:00
Michael Friedrich
338f5c0be8
Fix crash in CreateObjectHandler::HandleRequest()
...
fixes #13409
refs #11684
2016-12-05 16:37:31 +01:00
Michael Friedrich
ca7f195165
Remove debug log message
...
refs #11541
2016-11-18 14:00:41 +01:00
Gunnar Beutner
f58d3a1838
Fix crash in HttpRequest::Parse
...
fixes #12667
2016-11-17 09:08:22 +01:00
Michael Friedrich
40d68fcce2
Fix object sync for objects in a global zone
...
fixes #11541
2016-11-14 14:42:47 +01:00
Michael Friedrich
4b86f69c96
Ensure that runtime created objects are synced on (re)connect
...
refs #11684
2016-11-11 16:29:37 +01:00
Michael Friedrich
2e2de7c340
Enhance log messages for cluster config sync
...
refs #11684
2016-11-10 17:44:05 +01:00
Michael Friedrich
72bf538c29
API: Set zone attribute for local zone if not specified
...
This allows to sync the object to other nodes in the same
zone on reconnect.
refs #11684
2016-11-10 17:16:08 +01:00
Michael Friedrich
5dd4898eb3
Ensure that UpdateConfigObject sets the target zone
...
refs #11684
2016-11-10 17:15:06 +01:00
Gunnar Beutner
d70d7797c8
Add missing call for the base class' Stop() method
...
refs #11684
2016-10-24 08:40:12 +02:00
Gunnar Beutner
0145a32e58
Fix object resync issues
...
refs #11684
2016-10-11 10:55:13 +02:00
Jean Flach
d264a0dab8
Fix Url Query formatting
...
fixes #12883
2016-10-10 16:16:52 +02:00
Gunnar Beutner
5cd2fadf2b
Fix crash when deleting config files fails
...
fixes #12860
2016-10-05 14:17:26 +02:00
Gunnar Beutner
5960753015
Build fix for Windows
...
fixes #12614
2016-09-04 16:53:24 +02:00
Gunnar Beutner
288b354d11
Improve log message for ignored config updates
...
fixes #12623
2016-09-02 09:35:35 +02:00
Gunnar Beutner
58cdce8d7c
Improve error handling for event filters
...
fixes #12621
2016-09-02 08:51:51 +02:00
Gunnar Beutner
06cb3cf875
Another build fix for Windows
...
refs #9182
2016-08-31 13:43:50 +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
e8b0797ec4
Use 'auto' keyword for iterator declarations (part 2)
...
refs #12561
2016-08-27 19:56:12 +02:00
Gunnar Beutner
602643b93d
Provide location information for objects and templates in the API
...
fixes #12566
2016-08-27 19:25:38 +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
dac0ff9343
Improve config validation for arrays of object names
...
fixes #12556
2016-08-26 10:36:53 +02:00
Gunnar Beutner
30762e5330
Set versions for all internal libraries
...
fixes #12552
2016-08-25 17:56:18 +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
f4dce0fe72
Fix crash in JsonRpcConnection::MessageHandlerWrapper
...
fixes #12506
2016-08-22 17:42:59 +02:00
Gunnar Beutner
b42bfc822b
Fix crash in HttpServerConnection::ProcessMessageAsync
...
fixes #12493
2016-08-19 20:36:27 +02:00
Gunnar Beutner
8e5961f217
Fix missing permissions and update the documentation
...
fixes #12483
2016-08-18 19:00:14 +02:00
Gunnar Beutner
730364b600
Fix incorrect certificate validation error message
...
fixes #12475
2016-08-18 10:23:13 +02:00
Gunnar Beutner
b26b3a4f65
Add missing lock
...
refs #12450
2016-08-17 09:20:05 +02:00
Michael Friedrich
87bc291a55
Fix that HA enabled objects are started before config validation has finished
...
fixes #12460
2016-08-17 09:19:58 +02:00
Gunnar Beutner
81974adf65
Improve performance for Endpoint config validation
...
fixes #12450
2016-08-16 13:55:37 +02:00
Gunnar Beutner
b7a1b58069
Improve performance for type lookups
...
fixes #12448
2016-08-16 11:02:33 +02:00
Gunnar Beutner
ebaf239d3b
Replace GetType()->GetName() calls with GetReflectionType()->GetName()
...
fixes #12438
2016-08-15 14:42:03 +02:00
Gunnar Beutner
39ded04e1a
Improve validation for the command_endpoint attribute
...
fixes #12432
2016-08-14 22:11:29 +02:00
Gunnar Beutner
afc1b9bdc5
Move type variables into the 'Types' namespace
...
refs #12408
2016-08-12 17:05:19 +02:00
Gunnar Beutner
b74014fa5e
Fix auto-completion suggestions for "icinga2 console"
...
refs #12408
2016-08-12 15:36:47 +02:00
Gunnar Beutner
2a40a71ffa
Change scoping mechanism for the __using keyword
...
refs #12408
2016-08-12 13:14:10 +02:00
Gunnar Beutner
c5a170a972
Implement support for namespaces
...
fixes #12408
2016-08-12 11:32:16 +02:00
Gunnar Beutner
43c2ec31ef
Windows build fix
...
fixes #12339
2016-08-09 15:41:27 +02:00
Gunnar Beutner
26d048d6c3
Add version info in /v1
...
fixes #12327
2016-08-09 08:48:18 +02:00
Gunnar Beutner
231fd8d38b
Build fix for CentOS 5
...
refs #11292
2016-08-08 15:27:16 +02:00
Gunnar Beutner
905380b436
Fix duplicate notifications on HA failover
...
fixes #12267
2016-08-04 10:12:55 +02:00
Gunnar Beutner
bd3660fe5a
Build fix for Windows
...
refs #11292
2016-08-04 06:34:47 +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
Michael Friedrich
b7da28b176
Enhance TLS handshake error messages with connection information
...
fixes #12287
2016-08-02 12:14:03 +02:00
Gunnar Beutner
92c28548d1
Remove obsolete debug log message
...
fixes #12254
2016-07-29 07:09:01 +02:00
Michael Friedrich
d7903ba800
Enhance client disconnect message for "No data received on new API connection."
...
fixes #12116
Signed-off-by: Michael Friedrich <michael.friedrich@netways.de>
2016-07-28 17:40:40 +02:00
Gunnar Beutner
55a3dc22bf
Log a warning if there are more than 2 zone endpoint members
...
fixes #12222
2016-07-26 08:10:47 +02:00
Gunnar Beutner
22bb1f406a
Fix URL encoding for '&'
...
fixes #12199
2016-07-25 10:54:17 +02:00
Gunnar Beutner
cdda3bad8c
Include client IP address and port in HTTP requests
...
fixes #11706
2016-07-25 09:43:13 +02:00
Gunnar Beutner
45dd027101
Include IP address and port in the "New connection" log message
...
fixes #12215
2016-07-25 09:31:38 +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
Michael Friedrich
2d53cdb845
Improve log message for connecting nodes without configured Endpoint object
...
fixes #12194
2016-07-21 13:48:00 +02:00
Gunnar Beutner
e9605168a1
Increase reconnection timer interval for cluster connections
...
fixes #12193
2016-07-21 12:27:18 +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
e3f1c1ec6f
Make sure timestamps are formatted as integers in macro strings
...
refs #11483
2016-06-21 11:29:12 +02:00
Gunnar Beutner
c99fb68c2d
Implement support for getting a list of global variables from the API
...
fixes #11955
2016-06-16 08:38:15 +02:00
Gunnar Beutner
28dee2b79b
Improve filter support for /v1/templates
...
refs #11941
2016-06-16 08:38:15 +02:00
Michael Friedrich
2b474823f8
API: Fix that /v1 returns html if json is requested
...
fixes #10570
2016-06-15 17:46:09 +02:00
Gunnar Beutner
45919b4844
Fix crash in ApiListener::PersistMessage
...
fixes #11946
2016-06-15 11:26:35 +02:00
Gunnar Beutner
ace6882b59
Implement support for retrieving a list of templates from the API
...
fixes #11941
2016-06-15 07:41:51 +02:00
Gunnar Beutner
ff57b0ccd6
Add name attribute for the WorkQueue class
...
fixes #10816
2016-06-14 09:08:04 +02:00
Gunnar Beutner
9e29a3f8a0
Fix default behavior when none of the specified objects pass the user's permission filter
...
fixes #11926
2016-06-13 10:14:10 +02:00
Simon Murray
2e8c8809ea
Add service metadata to InfluxDB Writer
...
Adds a new configuration variable in keeping with the graphite writer
which defaults to false to save network bandwidth. All metrics currently
supported by graphite are now available to InfluxDB. I added in some
formatting functions, to handle integers and booleans as we know and
control their types, and the supporting regexes in the sanity checker.
Updating to InfluxDB 0.13.X started giving 400 errors due to the missing
Host header in HTTP/1.1 requests. HttpRequest has been updated to auto-
magically add the host and port to these requests if not explicitly
stated by the client code.
The exception code has been cleaned up to break out of the function
early if such a condition is raised, this avoids unnecessarily executing
code which will ultimately fail.
fixes #11912
Signed-off-by: Gunnar Beutner <gunnar.beutner@netways.de>
2016-06-08 13:23:52 +02:00
Gunnar Beutner
de1b70cf44
Fix incorrect variable names for joined fields in filter expressions
...
fixes #11779
2016-05-12 10:24:15 +02:00
Gunnar Beutner
0bc139af93
Improve timing behavior for UpdateObjectAuthority calls
...
refs #11765
2016-05-11 13:04:39 +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
Michael Friedrich
9a88185b12
API: Fix error handling for invalid JSON request body
...
fixes #11757
2016-05-10 15:16:35 +02:00
Michael Friedrich
1c6f09f44e
API: Fix error message handling for invalid attributes in PUT requests
...
refs #11396
2016-05-10 13:43:36 +02:00
Michael Friedrich
8a65c4a776
API: Fix error message with PUT requests for existing objects
...
fixes #11396
2016-05-09 15:08:35 +02:00
Simon Murray
79c1e883d1
Add InfluxDB Writer
...
Adds an Icinga2 object to directly interface with InfluxDB's native HTTP API.
This supports optional basic authorization, and TLS transport. InfluxDB didn't
appear to like having the TLS stream kept open, so instead this object buffers
data points which are then flushed to InfluxDB as a batch write, either driven
by a configurable timeout or threshold.
As InfluxDB is a schema-less database the host and service templates are user
configurable allowing both the measurement field and tags to be set by the
end user via macro expansion. This allows access to tag fields from arbitrary
data associated with host.vars or service.vars. If a particular value is
unable to be resolved, the tag will be dropped and not transmitted to InfluxDB.
Also alters URL handling to omit array brackets when only a single value is
attached to a key, otherwise InfluxDB has a strop with non-standard syntax.
fixes #10480
Signed-off-by: Michael Friedrich <michael.friedrich@netways.de>
2016-05-03 14:12:51 +02:00
Gunnar Beutner
09165e5ca6
Only hide navigational attributes which are not config/state
...
fixes #11567
2016-04-13 12:02:08 +02:00
Michael Friedrich
d2f5008557
API: Ensure that empty passwords w/ client_cn are properly checked
...
fixes #11482
2016-04-04 16:38:47 +02:00
Gunnar Beutner
b621b00e3a
Detect infinite recursion in the zone hierarchy graph
...
fixes #10937
2016-03-23 09:03:53 +01:00
Jean Flach
9cdea730a3
Fix delete object handler returning incorrect status codes
...
Now a 200 OK only gets returned if all objects could be deleted
fixes #10770
2016-03-01 16:53:52 +01:00
Michael Friedrich
c8a9f45697
ApiListener: Bail out if object could not be created during config sync
...
refs #11006
2016-02-12 14:15:24 +01:00
Jean Flach
19134f41cf
Fix client not closing connections
...
fixes #11122
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
90e241ca85
Fix: Cluster WQ thread dies after fork()
...
fixes #11118
2016-02-09 12:46:46 +01:00
Gunnar Beutner
14d805e6fe
Fix crash in ApiListener::ConfigUpdateObjectAPIHandler
...
fixes #11006
2016-02-09 09:13:43 +01:00
Jean Flach
393a6bf641
Remove unused variables
...
fixes #11111
2016-02-08 17:10:12 +01:00
Gunnar Beutner
e224e74994
Make sure the "syncing" attribute is set to false
...
refs #11083
2016-02-08 13:15:24 +01:00
Michael Friedrich
3227186c7d
Fix: API queries on non-existant objects cause exception
...
fixes #11088
2016-02-04 22:40:01 +01:00
Michael Friedrich
949b129c65
Ensure that config sync updates are always sent on reconnect
...
fixes #11083
2016-02-04 11:30:27 +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
ec050dd2a7
Fix deadlock in HttpClientConnection::DataAvailableHandler
...
refs #11014
2016-02-01 14:50:18 +01:00
Gunnar Beutner
98e104a773
Fix incorrect method call in JsonRpcConnection::MessageHandler
...
refs #11014
2016-02-01 11:25:34 +01:00
Gunnar Beutner
deac316a45
Fix deadlock in {HttpServerConnection,JsonRpcConnection}::DataAvailableHandler
...
refs #11014
2016-02-01 08:35:55 +01:00
Gunnar Beutner
fa7d0448f9
Decode cluster messages in the WorkQueue threads
...
refs #11014
2016-01-27 16:52:01 +01:00
Gunnar Beutner
9689223081
Use multiple WorkQueues to process cluster messages
...
refs #11014
2016-01-27 15:45:58 +01:00
Gunnar Beutner
54df0b74b6
Improve performance for ApiListener::RelayMessageOne
...
refs #11014
2016-01-27 13:39:31 +01:00
Gunnar Beutner
8c05003101
Improve the performance for ApiListener::SyncRelayMessage (part 2)
...
refs #11014
2016-01-27 12:18:16 +01:00
Gunnar Beutner
9ae1f1abee
Improve performance for ApiListener::SyncRelayMessage
...
refs #11014
2016-01-27 08:43:20 +01:00
Gunnar Beutner
4185c75d8a
Ignore the .timestamp file when determining whether the zone config has changed (second attempt)
...
refs #11014
2016-01-26 15:46:03 +01:00
Gunnar Beutner
c5a003c162
Ignore the .timestamp file when determining whether the zone config has changed
...
refs #11014
2016-01-26 11:32:54 +01:00
Gunnar Beutner
f3351bc80e
Make sure the updated config sync works with old versions of Icinga 2
...
refs #11014
2016-01-26 10:46:27 +01:00
Gunnar Beutner
1eecc72093
Use MkDirP instead of MkDir when syncing zone configs
...
fixes #10932
2016-01-26 10:45:03 +01:00
Gunnar Beutner
980ce96910
Make sure the .timestamp file is synced for config updates
...
refs #11014
2016-01-26 09:04:26 +01:00
Michael Friedrich
d412a9055d
Fix cluster config timestamp again
...
refs #11014
2016-01-25 15:49:32 +01:00
Michael Friedrich
a17419e8c2
Fix cluster config sync timestamp
...
refs #11014
2016-01-25 14:39:21 +01:00
Gunnar Beutner
8f53835c11
Make sure we only have one connection per satellite
...
refs #11014
2016-01-25 10:57:06 +01:00
Gunnar Beutner
6d88d9035d
Remove redundant log messages
...
refs #10963
2016-01-21 13:02:53 +01:00
Gunnar Beutner
e48ed33000
Add missing SetSyncing() call
...
refs #10963
2016-01-20 14:07:07 +01:00
Gunnar Beutner
55f0c589ad
Skip log replay for endpoints with log_duration = 0
...
refs #10963
2016-01-19 17:25:28 +01:00
Gunnar Beutner
e4b7111577
Check the certificate name when reconnecting to an instance
...
refs #10963
2016-01-19 16:24:12 +01:00
Jean Flach
08698c3622
Fix another compiler warning
...
fixes #10956
2016-01-18 09:41:52 +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
de11ef704a
Fix compiler warning
...
fixes #10956
2016-01-13 08:33:27 +01:00
Gunnar Beutner
599929b0f6
Update copyright headers for 2016
2016-01-12 08:29:59 +01:00
Jean Flach
957cf3169f
Replace boost-base64 with an openssl implementation
...
Also add unit tests
fixes #10714
2016-01-11 15:35:20 +01:00
Michael Friedrich
8055f05d5e
Fix cluster config sync for (non-)authoritative configs
...
Details: https://dev.icinga.org/issues/10819#note-39
refs #10819
2015-12-12 12:16:00 +01:00
Michael Friedrich
d781c392d3
Add more debug logging for api package config sync
...
refs #10819
2015-12-11 17:03:07 +01:00
Michael Friedrich
c5b13ff2b1
Fix that cluster config sync ignores zones.d directory from API config packages
...
fixes #10819
2015-12-10 22:21:29 +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
fd65fed6f0
Fix incorrect return value for ApiListener::GetInstance
...
refs #10711
2015-11-30 15:33:01 +01:00
Michael Friedrich
f91edd9564
Use a work queue for replaying the cluster log
...
refs #10713
2015-11-25 13:11:41 +01:00
Michael Friedrich
3adedcd0a5
Improve performance for Zone::CanAccessObject
...
fixes #10711
2015-11-25 12:06:20 +01:00
Gunnar Beutner
3505ca3c16
Fix race condition in the ConfigItem class
...
fixes #10643
2015-11-19 19:38:49 +01:00
Michael Friedrich
6518f78af0
Fix attribute validation for PUT queries
...
fixes #10601
2015-11-12 10:13:46 +01:00
Michael Friedrich
284a10150b
Fix attributes names for joins; update documentation
...
refs #10551
fixes #10576
2015-11-11 13:50:47 +01:00
Gunnar Beutner
b2364884d8
Check whether config file exists before trying to create object
...
fixes #10602
2015-11-11 10:25:18 +01:00
Gunnar Beutner
356c4cc170
Don't allow users to set internal attributes via PUT
...
fixes #10601
2015-11-11 08:41:49 +01:00
Michael Friedrich
36cea68c1a
Add the HTTP request body to debug log
2015-11-09 22:48:56 +01:00
Michael Friedrich
bc05389a79
Improve error handling for unlinking files
...
refs #10578
2015-11-09 13:35:51 +01:00
Gunnar Beutner
25c490ecb6
Remove config file when object creation fails
...
fixes #10578
2015-11-09 12:33:37 +01:00
Gunnar Beutner
c44701068f
Fix: Detailed error message is missing when object creation via API fails
...
fixes #10580
2015-11-09 12:30:30 +01:00
Gunnar Beutner
fa034a96f8
Improve error message for 404s
...
refs #9447
2015-11-09 10:48:24 +01:00
Gunnar Beutner
4bb9beda19
Don't send cluster config messages for objects with version 0
...
refs #9927
2015-11-08 21:22:06 +01:00
Gunnar Beutner
f8399e45db
Remove unused variable
...
refs #10563
2015-11-08 17:53:22 +01:00
Michael Friedrich
e6159ca86a
Fix: /v1/console should only use a single permission
...
fixes #10563
2015-11-08 14:17:13 +01:00
Gunnar Beutner
2c135d82c1
Fix incorrect variable names for joined objects in filters
...
fixes #10558
2015-11-07 10:28:34 +01:00
Gunnar Beutner
b89a7dbdb6
Rename 'object' to 'obj' in filters
...
refs #9077
2015-11-07 10:01:07 +01:00
Gunnar Beutner
64376dafeb
Make the main object available as 'object' in filter expressions
...
refs #9077
2015-11-07 09:59:00 +01:00
Gunnar Beutner
3a695742e3
Improve error handling when user specifies invalid method for /v1/console
...
refs #10387
2015-11-07 09:59:00 +01:00
Michael Friedrich
64c936d387
API Actions: Remove -by-id from actions and require names for comments and downtimes
...
The documentation is updated as well. Furthermore actions provide
detailed error information in case of an exception.
Includes DB IDO schema updates.
fixes #10512
2015-11-06 17:06:12 +01:00
Gunnar Beutner
a177e5e05a
Change output format for object queries
...
fixes #10551
2015-11-06 14:45:38 +01:00
Michael Friedrich
7e5f5544fc
Require 'Accept' header for API requests (except for GET)
...
fixes #10548
2015-11-05 15:18:53 +01:00
Michael Friedrich
18e162da5e
Build fix
...
refs #10545
2015-11-05 11:55:07 +01:00
Michael Friedrich
5d46f661ea
Implement 'console' cli command using the API
...
fixes #10387
2015-11-04 16:01:06 +01:00
Gunnar Beutner
9c5758958c
Fix crash in JsonRpcClient::DataAvailableHandler
...
fixes #10495
2015-11-02 17:45:44 +01:00
Michael Friedrich
6f8e25a349
Add doc URL to /v1 info page
...
refs #9105
2015-10-29 18:59:30 +01:00
Gunnar Beutner
050c520b2a
Convert Comment/Downtime to config objects
...
fixes #9777
2015-10-28 17:56:29 +01:00
Gunnar Beutner
4763dea571
Fix incorrect URL check in the InfoHandler class
...
refs #9105
2015-10-28 07:46:04 +01:00
Jean Flach
edfc0e3a38
Update error messages
...
Removes verboseError from httprequest and uses
HttpUtility::GetLastParameter() instead to find out whether verbose
errors are enabled. Also parsing an invalid URL will now not lead to a
stacktrace anymore.
refs #10194
2015-10-27 15:26:19 +01:00
Gunnar Beutner
dd77863910
Implement Array::ToString and Dictionary::ToString
...
fixes #10329
2015-10-26 11:05:24 +01:00
Gunnar Beutner
618e031f46
Handle exceptions for NetString::WriteStringToStream in ApiListener::ReplayLog
...
fixes #10455
2015-10-26 07:56:58 +01:00
Michael Friedrich
d516d16c9a
Fix restore_attribute not working in clusters
...
fixes #10386
2015-10-22 14:50:43 +02:00
Gunnar Beutner
1b8fd9637f
Add redirect for /
...
refs #9105
2015-10-22 13:29:31 +02:00
Gunnar Beutner
10bd3ed9b7
Implement URL handler for /v1
...
refs #9105
2015-10-22 12:15:32 +02:00
Gunnar Beutner
4aa0165701
Add getter for endpoint 'connected' attribute
...
fixes #10394
2015-10-22 10:52:38 +02:00
Michael Friedrich
cb99402766
Fix filter permissions in event streams
...
refs #9078
2015-10-21 15:38:26 +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
438210651f
Build fix for OpenBSD
2015-10-20 22:54:58 +02:00
Gunnar Beutner
d01f09f3ef
Hide internal attributes in the API
...
fixes #10393
2015-10-20 08:25:10 +02:00
Michael Friedrich
f51a76e13d
Log a warning message on unauthorized http request
...
fixes #10388
2015-10-16 15:32:35 +02:00
Michael Friedrich
10c306673d
Fix wrong connection log message for global zones
...
fixes #10377
2015-10-15 17:15:19 +02:00
Michael Friedrich
934fb64b9e
Fix log message formatting for object version
...
refs #10355
2015-10-15 16:52:49 +02:00
Michael Friedrich
5852a003d0
Ensure that modified attributes work with clients with local config and no zone attribute
...
fixes #10371
2015-10-15 14:05:39 +02:00
Michael Friedrich
a0631cd351
Fix wrong type for object version
...
refs #10355
2015-10-15 11:11:07 +02:00
Gunnar Beutner
4f647527fd
Fix: ApiListener::SyncRelayMessage doesn't send message to all zone members
...
fixes #10365
2015-10-15 09:28:20 +02:00
Gunnar Beutner
f89877cd28
Fix incorrect variable type in ApiListener::ConfigUpdateObjectAPIHandler
...
refs #10355
2015-10-15 09:26:58 +02:00
Gunnar Beutner
21a2986635
Avoid evaluating unnecessary filters
...
refs #10360
2015-10-14 16:52:01 +02:00
Gunnar Beutner
f841daf680
Improve performance for object queries
...
fixes #10360
2015-10-14 16:08:23 +02:00
Gunnar Beutner
48d80e29a0
Don't look up joined objects when we don't need to
...
refs #10360
2015-10-14 15:36:59 +02:00
Gunnar Beutner
3bfc9a2406
Don't log messages we've already relayed to all relevant zones
...
fixes #10262
2015-10-01 14:53:28 +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
c1892a2f30
Remove JsonRpcConnection::m_WriteQueue
...
refs #9976
2015-09-30 16:39:36 +02:00
Michael Friedrich
0529d51a85
Config sync does not set endpoint syncing and plays disconnect-sync ping-pong
...
fixes #10255
2015-09-30 16:14:04 +02:00
Michael Friedrich
657e749c9b
Config sync shouldn't send updates for objects the client doesn't have access to
...
fixes #10249
2015-09-30 15:08:01 +02:00
Gunnar Beutner
f779b20ec0
Properly encode URLs in Icinga Studio
...
fixes #10241
2015-09-30 14:02:18 +02:00
Gunnar Beutner
f3fdcb0f6b
Fix: /v1/objects/<type> returns an HTTP error when there are no objects of that type
...
fixes #10253
2015-09-30 13:26:19 +02:00
Michael Friedrich
19e7524b31
Fix problem with non-existing objects in config sync updates
...
refs #9851
refs #9927
refs #9081
2015-09-30 10:04:37 +02:00
Gunnar Beutner
7e4953dd35
Improve log messages for HTTP requests
...
refs #9074
2015-09-30 08:41:09 +02:00
Michael Friedrich
dfa2ac450c
Re-add missing package and stage name in configstageshandler
...
refs #10194
2015-09-29 18:25:48 +02:00
Michael Friedrich
905de04293
Fix deadlock in ApiClient::~ApiClient()
...
refs #9976
2015-09-29 16:03:38 +02:00
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