Commit Graph

4491 Commits

Author SHA1 Message Date
Michael Friedrich 845c72f656
Merge pull request #6882 from Icinga/bugfix/influxdb-gaps-6841
InfluxdbWriter#Stop(): flush buffer
2019-02-11 17:32:05 +01:00
Michael Friedrich 0467c488e9
Merge pull request #6908 from Icinga/bugfix/perfdata-gaps
Ensure all perfdata to be written
2019-02-11 17:27:44 +01:00
Michael Friedrich 7a865aefd9
Merge pull request #6854 from Icinga/bugfix/unamehelper-inefficient-6452
Make UnameHelper() efficient
2019-02-11 16:57:17 +01:00
Michael Friedrich b81f7a7415
Merge pull request #6577 from Icinga/fix/setup-api-including-users-file
Include api user configuration file during api setup
2019-02-11 16:41:46 +01:00
Michael Friedrich 4c1a54073c
Merge pull request #6748 from Icinga/bugfix/api-setup-fails-missing-confd
Fix api setup to automatically create the conf.d directory
2019-02-11 16:35:57 +01:00
Peter Eckel 5d59863725 Avoid duplicating non-zero count message replay messages in the debug log 2019-02-11 13:54:17 +01:00
Michael Friedrich d1fb1a8eda Refactor conditions and add debug log messages for future crs and skipped crs 2019-02-08 13:32:13 +01:00
Jean Flach c97f3c80f5 Fix checkresults from the future breaking checks 2019-02-08 12:08:40 +01:00
Michael Friedrich 7ce30a86b8 Enhance notification logging
- More details from the local context (notification, user, checkable, command names)
- Notice logs for when this notification object is paused in HA enabled zones
- Notice logs for interval=0 reminder notifications
- Object name for skipping recovery notifications when problem hasn't been notified before
2019-02-07 15:42:09 +01:00
Alexander A. Klimov 8ad1717055 Respect activation priority also on deactivation 2019-02-06 11:17:45 +01:00
Michael Friedrich 4339240b46
Merge pull request #6858 from Icinga/feature/string-builder
Make string builder reusable
2019-02-04 16:05:20 +01:00
Michael Friedrich 77572c4424
Merge pull request #6901 from Icinga/bugfix/so_reuseport-6898
TcpSocket#Bind(): also set SO_REUSEPORT
2019-02-04 14:21:20 +01:00
Michael Friedrich 04de273405
Merge pull request #6914 from Icinga/bugfix/clusterevents-missing-persistent-ack
ClusterEvents::AcknowledgementSet event should forward 'persistent' attribute
2019-02-04 13:52:44 +01:00
Michael Friedrich 5a8729fddd
Merge pull request #6853 from Icinga/bugfix/incorrect-command_endpoint-6666
Checkable: require zone to be set if command_endpoint is set
2019-02-04 13:51:31 +01:00
Michael Friedrich eb155495f7
Merge pull request #6916 from Icinga/bugfix/retry-interval-zero
Don't allow retry_interval <= 0
2019-01-30 15:28:26 +01:00
Michael Friedrich b58cb17e4b Fix Convert::ToLong(double val) 2019-01-30 14:47:59 +01:00
Michael Friedrich 530f890cab
Merge pull request #6917 from Icinga/bugfix/cluster-message-delete-object
Cluster: Delete object message should log that
2019-01-29 13:37:50 +01:00
Alexander A. Klimov ce847324bc Downtime::AddDowntime(): place Downtimes in the same zone as the origin ScheduledDowntimes 2019-01-28 18:29:57 +01:00
Michael Friedrich b16c22448e Cluster: Delete object message should log that
Atm it is a copy-paste error and irritates during debugging.
Coming from my analysis of existing cluster messages.
2019-01-28 17:39:22 +01:00
Michael Friedrich 8cbd482072 Don't allow retry_interval <= 0 2019-01-28 17:33:05 +01:00
Michael Friedrich 9f2ccfbaa0 ClusterEvents::AcknowledgementSet event should forward 'persistent' attribute 2019-01-28 17:29:46 +01:00
Michael Friedrich b1442645ce
Merge pull request #6897 from Icinga/bugfix/getlocalzone-null
Validate Zone::GetLocalZone() before using
2019-01-25 08:31:57 +01:00
Alexander A. Klimov 1eaad0637b CheckerComponent#Stop(): wait for all running checks 2019-01-24 15:09:39 +01:00
Alexander A. Klimov b81aa6af3a CheckerComponent#Stop(): log after actually being stopped 2019-01-24 13:55:17 +01:00
Alexander A. Klimov f0e12ff63c Deactivate perfdata writers after checker 2019-01-24 13:50:26 +01:00
Michael Friedrich 6b7f651478
Merge pull request #6899 from Icinga/bugfix/localtime-zero-windows
Log: Ensure not to pass negative values to localtime()
2019-01-24 10:58:43 +01:00
Alexander A. Klimov 984f7be030 TcpSocket#Bind(): also set SO_REUSEPORT
refs #6898
2019-01-17 12:13:44 +01:00
Michael Friedrich 2fc33996b6 Log: Ensure not to pass negative values to localtime()
refs #6887
2019-01-16 17:27:38 +01:00
Michael Friedrich 21a592acdd
Merge pull request #6883 from Icinga/bugfix/retry-interval-zero-6871
Allow Checkable#retry_interval to be 0
2019-01-16 15:00:03 +01:00
Alexander A. Klimov b09e7b287e Validate Zone::GetLocalZone() before using 2019-01-15 19:23:20 +01:00
Alexander A. Klimov 3b2054761a Notification#BeginExecuteNotification(): SetNextNotification() correctly
refs #5561
2019-01-11 18:25:12 +01:00
Jean Flach 2aff6a5887 Don't run UpdateObjectAuthority for Comments and Downtimes 2019-01-10 11:44:14 +01:00
Alexander A. Klimov 9ae738d17f Allow Checkable#retry_interval to be 0
refs #6871
2019-01-09 11:27:33 +01:00
Michael Friedrich e1a941e5c7
Merge pull request #6880 from Icinga/bugfix/pki-requestcertificate-no-cert
pki::RequestCertificate: handle missing certificate/CSR
2019-01-09 09:30:27 +01:00
Alexander A. Klimov 8470facfe2 InfluxdbWriter#Stop(): flush buffer
refs #6841
2019-01-08 18:15:32 +01:00
Alexander A. Klimov 4a7960f21b pki::RequestCertificate: handle missing certificate/CSR 2019-01-08 11:49:44 +01:00
Alexander A. Klimov f4ab0737d1 HttpServerConnection#DataAvailableHandler(): reduce log spam 2019-01-07 15:32:19 +01:00
Alexander A. Klimov 61860563a6 Make string builder reusable 2018-12-21 12:43:04 +01:00
Alexander A. Klimov eeb609d4ae Url#m_Query: preserve order
refs #6536
2018-12-21 11:52:37 +01:00
Alexander A. Klimov 17e86f98a2 Make UnameHelper() efficient
refs #6452
2018-12-20 16:37:04 +01:00
Alexander A. Klimov 12f3149eef Checkable: require zone to be set if command_endpoint is set
refs #6666
2018-12-20 13:59:28 +01:00
Michael Friedrich c4d57afa3d
Merge pull request #6821 from Icinga/bugfix/downtimes-disappear-satellite-6542
Don't delete downtimes in satellite zones
2018-12-18 16:13:36 +01:00
Michael Friedrich b40400e79f
Merge pull request #6826 from Icinga/bugfix/downtimes-recreate-satellite-6542
Downtime#HasValidConfigOwner(): wait for ScheduledDowntimes
2018-12-18 16:12:34 +01:00
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