Alexander A. Klimov
c98d6a5254
Downtime#HasValidConfigOwner(): respect Downtime#authoritative_zone
...
refs #6542
2018-12-17 15:54:31 +01:00
Alexander A. Klimov
5431eae116
Add and populate Downtime#authoritative_zone
...
refs #6542
2018-12-17 15:54:23 +01:00
Michael Friedrich
ba8d79f3c5
API Event Streams: Add 'command' for Notification events
...
fixes #6824
2018-12-07 09:37:03 +01:00
Alexander A. Klimov
39e0d787e8
Downtime#HasValidConfigOwner(): wait for ScheduledDowntimes
...
refs #6542
2018-12-06 15:44:57 +01:00
Alexander A. Klimov
bbcf469af1
Implement ScheduledDowntime::AllConfigIsLoaded()
...
refs #6542
2018-12-06 15:44:51 +01:00
Michael Friedrich
bf4ecbed69
Revert "ThreadPool#Stop(): discard non-processed queue items"
...
This reverts commit 30e6d0f809
.
refs #6815
2018-12-06 09:56:49 +01:00
Michael Insel
1352b15220
Fix string comparison on edge cases
...
This fixes a few edge cases where the string comparison failed before.
2018-12-05 20:12:06 +01:00
Michael Friedrich
b58ce84b0e
Merge pull request #6817 from Icinga/bugfix/stalled-tls-connections-6816
...
HttpServerConnection#DataAvailableHandler(): be aware of being called multiple times concurrently
2018-12-05 11:35:35 +01:00
Michael Friedrich
0cc559b775
Merge pull request #6820 from Icinga/bugfix/scheduled-downtime-ha-duplicates
...
Only create downtimes from non-paused ScheduledDowntime objects in HA enabled cluster zones
2018-12-05 11:33:29 +01:00
Michael Friedrich
08c1539561
Merge pull request #6815 from Icinga/bugfix/reload-while-api-dos
...
ThreadPool#Stop(): discard non-processed queue items
2018-12-05 11:11:49 +01:00
Michael Friedrich
26f411638f
Merge pull request #6757 from Icinga/bugfix/no-more-notifications-recovery-filtered
...
Fix that no_more_notifications gets reset when Recovery notifications are filtered away
2018-12-05 11:05:44 +01:00
Michael Friedrich
b6212e92fb
Merge pull request #6750 from davidtek/master
...
#6749 Wrong operator on stride variable causing incorrect behaviour
2018-12-05 11:05:05 +01:00
Michael Friedrich
15e3aa1762
Merge pull request #6786 from Icinga/feature/dsl-getenv
...
DSL: Implement getenv()
2018-12-04 16:08:37 +01:00
Michael Friedrich
fd9b2dece1
Only create downtimes from non-paused ScheduledDowntime objects in HA enabled cluster zones
2018-12-04 15:20:37 +01:00
Alexander A. Klimov
7e630c7732
HttpServerConnection#DataAvailableHandler(): be aware of being called multiple times concurrently
...
refs #6816
2018-12-03 19:05:41 +01:00
Alexander A. Klimov
30e6d0f809
ThreadPool#Stop(): discard non-processed queue items
2018-12-03 16:38:52 +01:00
Michael Friedrich
5f25eb6b2d
Add a code comment for connection: close handling
2018-12-03 14:40:50 +01:00
Sven Wegener
a83dbc9de5
Restore 'Connection: close' behaviour in HTTP responses
...
Actually the `corked` functionality caused problems with
not closing connections properly.
Full Analysis: https://github.com/Icinga/icinga2/issues/6799#issuecomment-443710338
Full credits to @swegener :)
fixes #6799
2018-12-03 14:27:37 +01:00
Alexander A. Klimov
8de5326d23
Remove redundand check for object existence on creation via API
...
refs #3937
2018-11-29 17:51:53 +01:00
Michael Friedrich
f3cd3eb870
DSL: Implement getenv()
...
This patch also restores Utility::GetFromEnvironment()
and replaces the hardcoded `getenv()` calls.
2018-11-19 18:11:16 +01:00
Michael Insel
b0cf92fd17
Fix deadlock in GraphiteWriter
...
This fixes a deadlock in the GraphiteWriter feature, which is visible
during the reload process. The reload thread waits for the
GraphiteWriter to finish, but the GraphiteWriter can't finish because
it's stuck in `SendMetric()` waiting for a lock which is hold by the
reload thread.
2018-11-12 20:12:40 +01:00
Michael Friedrich
90de216cbb
Merge pull request #6479 from Icinga/feature/socketevents-inherit-object-6477
...
SocketEvents: inherit from Stream
2018-11-12 17:06:37 +01:00
Michael Friedrich
1f5555e1d6
Fix possible double free in StreamLogger::BindStream()
...
refs #6737
2018-11-08 15:51:58 +01:00
Michael Friedrich
d082e8c1b1
Fix that no_more_notifications gets reset when Recovery notifications are filtered away
...
Hello from the OSMC hackathon :)
2018-11-08 12:13:32 +01:00
David Lublink
a02b7ac155
* BugFix : Wrong operator on stride variable causing incorrect behaviour ( #6749 )
2018-11-01 18:51:42 -04:00
Michael Insel
b785674ab2
Fix api setup to automatically create the conf.d directory
...
This patch creates the conf.d directory automatically when it is not present during api setup.
2018-11-01 19:16:26 +01:00
Alexander A. Klimov
a2ae01e64b
Socket engine: drop life support objects
...
refs #6477
2018-10-30 13:46:20 +01:00
Alexander A. Klimov
5134ccaf56
Make SocketEventDescriptor#EventInterface a SocketEvents::Ptr
...
refs #6477
2018-10-30 13:46:20 +01:00
Alexander A. Klimov
a9a9469868
SocketEvents: inherit from Stream
...
refs #6477
2018-10-30 13:46:20 +01:00
Michael Friedrich
c0c6ea545b
DB IDO: Don't enqueue queries when the feature is paused (HA)
...
fixes #5876
refs #6739
2018-10-30 13:17:28 +01:00
Michael Friedrich
680103f111
Merge pull request #6709 from ekeih/bugfix/icinga2-version-check-6703
...
Fix the Icinga2 version check for versions with more than 5 characters
2018-10-29 13:46:36 +01:00
Michael Friedrich
3d45d0bcf6
Minor styleguide
2018-10-29 13:45:18 +01:00
Michael Friedrich
5406ce6540
Ensure that API/JSON-RPC messages in the same session are processed and not stalled
...
This basically drops the "corked" implementation which just stalled the
TLS IO polling after some requests. If you need sort of rate limiting
for these events, use an external TLS proxy which terminates that in front
of Icinga.
fixes #6635
2018-10-29 12:57:24 +01:00
Michael Friedrich
b40a568cd9
Merge pull request #6726 from Icinga/bugfix/ido-debug-log
...
Silence the debug log a bit for IDO events
2018-10-24 16:11:38 +02:00
Michael Friedrich
108b85427c
Silence the debug log a bit for IDO events
...
They're actually not processed when the feature is paused,
and I have already seen them in user's logs when analysing why
objects are not updated or notifications sent. 'DbEvents' isn't
related to rather 'DB IDO' and is confusing.
2018-10-24 16:01:57 +02:00
Michael Friedrich
028946a1cc
Implement HA functionality for Perfdata feature
2018-10-24 14:42:52 +02:00
Michael Friedrich
97c1296e99
Implement HA functionality for OpenTsdb feature
2018-10-24 14:42:46 +02:00
Michael Friedrich
b905999f4b
Implement HA functionality for Gelf feature
2018-10-24 13:50:10 +02:00
Michael Friedrich
5e241dc815
Implement HA functionality for InfluxDB feature
2018-10-24 13:44:56 +02:00
Michael Friedrich
37ccffc7e5
Implement HA functionality for Graphite feature
2018-10-24 13:44:52 +02:00
Michael Friedrich
59389f564c
Implement HA functionality for Elasticsearch feature
2018-10-24 13:20:03 +02:00
Michael Friedrich
001ffda61c
Revert code from icinga.com update
2018-10-24 12:34:23 +02:00
Michael Friedrich
7da88c0001
Merge pull request #6717 from Icinga/bugfix/api-downtimes-child-options
...
Improve error handling for invalid child_options for API downtime actions
2018-10-24 11:54:24 +02:00
Michael Friedrich
6de4cef3ae
Merge pull request #6719 from Icinga/fix/finished-reconnect-message
...
Do not send 'finished reconnecting...' if failed
2018-10-24 11:51:34 +02:00
Michael Friedrich
7e1942e8e7
Merge pull request #6718 from Icinga/bugfix/ssl-shutdown
...
Call SSL_shutdown() at least twice
2018-10-24 11:46:32 +02:00
Michael Friedrich
bd8e9f55da
Merge pull request #6662 from Icinga/bugfix/keep-http-connection-open-until-stream-eof
...
Keep the HTTP server connection open until the stream is EOF
2018-10-24 11:31:06 +02:00
Michael Friedrich
e480eb785e
Improve error handling for invalid child_options for API downtime actions
...
fixes #6712
2018-10-24 11:00:24 +02:00
Michael Friedrich
c5e7459fb8
Merge pull request #6667 from Icinga/feature/dependency-recursion-limit
...
Increase dependency recursion limit to 256
2018-10-24 10:30:46 +02:00
Michael Friedrich
09fbdb846b
Increase dependency recursion limit to 256
...
fixes #5762
2018-10-24 08:56:29 +02:00
Jean Flach
6777255f60
Fix typo
2018-10-22 14:43:59 +02:00
Max Rosin
2366df6057
Fix the Icinga2 version check for versions with more than 5 characters
...
The previous implementation assumed that every version number will have
5 characters. With the release of 2.10.0 this does not work anymore.
The new implementation extracts everything from the second character to
the first dash. This should work as long as the version string is in a
format like 'v2.10.1-8-gaebe6da'.
fixes Icinga#6703
2018-10-19 15:37:32 +02:00
Michael Friedrich
aebe6da168
Merge pull request #6707 from Icinga/bugfix/compat-objects-path
...
Fix regression for wrong objects.cache path overwriting icinga2.debug file
2018-10-19 12:30:53 +02:00
Michael Friedrich
acd0ad681b
Merge pull request #6704 from efuss/fix/scheduleddowntime1
...
Put newly configured already running ScheduledDowntime immediately in effect
2018-10-19 12:29:51 +02:00
Michael Friedrich
9f6c66c41a
Fix regression for wrong objects.cache path overwriting icinga2.debug file
...
The 'statusdata' feature is deprecated, although it affects 'object list'.
fixes #6705
2018-10-19 10:42:54 +02:00
Edgar Fuß
9c1e9f4264
Put running downtimes in effect
...
If Icinga2 was restarted with a newly configured downtime that should
be in effect at the time of restart, the should-be-running segment of
it was not put into effect.
Add new LegacyTimePeriod::FindRunningSegment() and
ScheduledDowntime::FindRunningSegment() functions, call the latter in
ScheduledDowntime::CreateNextDowntime() before trying the old
ScheduledDowntime::FindNextSegment().
2018-10-18 18:42:21 +02:00
Edgar Fuß
f1597ca5bd
Remove spurious string in debug message
...
Remove a spurious " at " in the "Evaluating segment" debug message in ScheduledDowntime::FindNextSegment().
2018-10-18 18:35:14 +02:00
Edgar Fuß
fa3e5c8c31
Remove dead code
...
Remove some dead code in ScheduledDowntime::CreateNextDowntime().
2018-10-18 18:09:20 +02:00
Michael Friedrich
3cb2c1d143
icinga.com: Update everything else
2018-10-18 09:50:53 +02:00
Michael Friedrich
a2cb542a2e
icinga.com: Update '*.sql'
2018-10-18 09:41:54 +02:00
Michael Friedrich
eabea68c56
icinga.com: Update config files (ITL, etc.)
2018-10-18 09:37:59 +02:00
Michael Friedrich
dea5ec614e
icinga.com: Update CMakeLists.txt
2018-10-18 09:35:18 +02:00
Michael Friedrich
44c3b83769
icinga.com: Update '*.ti'
2018-10-18 09:30:00 +02:00
Michael Friedrich
dab53448bc
icinga.com: Update *.{h,c}pp
2018-10-18 09:27:04 +02:00
Michael Friedrich
af6c8a1f50
Add missing shutdown/program state dumps for SIGUSR2 reload handler
...
Credits to @west0rmann finding the issue and providing the initial fix.
fixes #6689
fixes #6592
2018-10-16 12:36:43 +02:00
Michael Friedrich
34de8104b8
Fix regression with API permission filters and namespaces in v2.10
...
fixes #6682
2018-10-15 15:47:11 +02:00
Michael Friedrich
43a571e013
Don't throw an error when namespace indexers don't find a valid key
...
Examples:
```
globals["abc"]
globals.def
```
The patch for the Icinga Director unfortunately only solves the
master, and as discussed with @lippserd we need to ensure that
satellites and clients with 2.10 can be restarted without any errors
from deployed configuration.
refs #6509
refs icinga/icingaweb2-module-director#1654
2018-10-11 12:42:56 +02:00
Michael Friedrich
4be9f418a9
Revert "Initialize Socket Event Engine on application startup"
...
This reverts commit c8dcd1297f
.
We cannot do this during application startup, since Daemonize()
kills the threads again.
refs #6514
refs #6630
2018-10-09 19:38:29 +02:00
Michael Friedrich
85e161ea1e
Silence config compiler logging for runtime created objects
...
This is especially problematic with many single creation requests,
e.g. many downtimes created via Icinga Web 2 & the REST API.
In addition to the config compiler messages, apply rule matches are
also in there which are removed by this patch.
2018-10-09 16:41:17 +02:00
Michael Friedrich
83a428c1ba
Keep the HTTP server connection open until the stream is EOF
...
fixes #4968
2018-10-09 16:01:43 +02:00
Michael Friedrich
e6eb703b36
Merge pull request #6661 from Icinga/bugfix/cache-http-peer-address
...
Cache the peer address in the HTTP server
2018-10-09 16:00:27 +02:00
Michael Friedrich
5c32a5a7dc
Cache the peer address in the HTTP server
...
Later socket calls are expensive and might lead
into a race condition on close when logging it.
refs #6655
2018-10-09 15:40:16 +02:00
Michael Friedrich
58cfc3955d
Merge pull request #6658 from Icinga/bugfix/api-connection-close-req-by-client
...
Ensure that HTTP/1.0 or 'Connection: close' headers are properly disconnecting the client
2018-10-09 13:49:22 +02:00
Michael Friedrich
9352f4bfb3
Merge pull request #6657 from Icinga/feature/api-debug-log-request-body
...
Enable the HTTP request body debug log entry for release builds
2018-10-09 13:29:00 +02:00
Michael Friedrich
13239c3172
Ensure that HTTP/1.0 or Connection: close headers are properly disconnecting the client
...
Test results: https://github.com/Icinga/icinga2/issues/6514#issuecomment-428155731
fixes #6514
2018-10-09 13:23:23 +02:00
Michael Friedrich
73263b7702
Enable the HTTP request body debug log entry for release builds
...
fixes #4282
2018-10-09 12:55:53 +02:00
Michael Friedrich
57081176de
Improve logging for disconnected HTTP clients
...
Previously this was inside the debug log, with the
new socket printers we can enhance checking for proper
connects and disconnects.
refs #6514
2018-10-09 12:22:19 +02:00
Michael Friedrich
051b3ba9b7
Merge pull request #6503 from peteeckel/fix/reduce-loglevel-plugin-env-6460
...
Reduce the log level for missing env macros to debug
2018-10-08 14:09:18 +02:00
Alexander A. Klimov
6d114b16e4
node setup: always respect --accept-config and --accept-commands
2018-10-01 16:33:50 +02:00
Michael Friedrich
617925374b
Fix that check_timeout was used for Event/Notification commands too
...
We may add specific timeouts for event/notification commands
later, for now the original timeout inside the EventCommand/NotificationCommand
is used.
fixes #6304
2018-09-28 14:32:57 +02:00
Michael Friedrich
7acf3689a7
Merge pull request #6642 from Icinga/bugfix/concurrent-checks-constant
...
Allow to override MaxConcurrentChecks constant
2018-09-28 09:34:53 +02:00
Michael Friedrich
82178e3b33
Don't inherit daemonize parameter from parent process
2018-09-27 20:30:19 +02:00
Thomas Forrer
816cae98fa
Fix config validation problem (startup.log) during /v1/config/stages API call
...
copy all arguments of parent process in AsyncTryActivateStage
2018-09-27 20:27:09 +02:00
Michael Friedrich
96c0de9bea
Allow to override MaxConcurrentChecks constant
2018-09-27 20:23:00 +02:00
Michael Friedrich
64e273afdd
Merge pull request #6639 from Icinga/fix/windows-api-log-rename
...
Ensure to _unlink before renaming replay log on Windows
2018-09-27 08:02:00 +02:00
Jordi van Scheijen
bc1dc9c7a7
Fix issue 5022
2018-09-27 07:52:37 +02:00
Michael Friedrich
c979f86e4e
Merge pull request #6632 from Icinga/feature/cluster-faster-reconnect
...
Increase the cluster reconnect frequency to 10s
2018-09-25 17:07:01 +02:00
Michael Friedrich
cbde35ff22
Use a dynamic thread pool for API connections
...
The full analysis is located in #6517 .
fixes #6517
2018-09-25 12:43:10 +02:00
Michael Friedrich
cd819f74f4
Increase the cluster reconnect frequency to 10s
...
This is blocked by #6517 .
refs #6234
2018-09-25 12:36:30 +02:00
Michael Friedrich
c8dcd1297f
Initialize Socket Event Engine on application startup
...
Previously this happened inside the TlsStream constructor
during the first connection attempt.
2018-09-24 15:50:59 +02:00
Michael Friedrich
eee4426dcb
Merge pull request #6622 from Icinga/bugfix/ido-pgsql-cleanup-timestamp-utc
...
Ensure to use UTC timestamps for IDO PgSQL cleanup queries
2018-09-17 11:20:49 +02:00
Michael Friedrich
3038b150a9
Merge pull request #6616 from Icinga/feature/tls-handshake-timeout-config
...
Add ApiListener#tls_handshake_timeout option
2018-09-17 11:20:12 +02:00
Michael Friedrich
05f7e0dae8
Merge pull request #6621 from Icinga/bugfix/ido-remove-unused-timestamp-function
...
Remove unused timestamp function in DB IDO
2018-09-17 11:16:47 +02:00
Michael Friedrich
5d36546a99
Ensure to use UTC timestamps for IDO PgSQL cleanup queries
...
refs #6584
2018-09-17 11:06:54 +02:00
Michael Friedrich
c0c17fc340
Remove unused timestamp function in DB IDO
...
refs #6584
2018-09-17 10:06:30 +02:00
Michael Friedrich
b81ac972b9
Silence compiler warning for nice()
2018-09-14 14:29:52 +02:00
Michael Friedrich
29701b4db5
Add ApiListener#tls_handshake_timeout option
...
This allows to specify the previously hardcoded
timeout of 10s.
refs #6517
2018-09-14 09:20:09 +02:00
Michael Friedrich
c8d4e785a1
Merge pull request #6519 from Icinga/fix/erroneous-console-exit
...
Reset terminal on erroneous console exit
2018-09-13 13:34:58 +02:00
Michael Friedrich
af1f2e0c55
Only check for Problem types in user filers for Recovery/Acknowledgement notifications
...
refs #6047
2018-09-12 17:09:15 +02:00
Noah Hilverling
834e37d3e2
Still notify on acknowledgement and recovery if user does not get problem notifications at all
...
refs #6047
2018-09-12 14:54:45 +02:00
Noah Hilverling
bfe7d46a68
Only send acknowledgement notification if user received a problem notification
...
refs #6047
2018-09-12 14:54:45 +02:00