Ravi Kumar Kempapura Srinivasa
0aa646c218
Use child loggers for Redis and database
2021-09-28 17:30:11 +02:00
Ravi Kumar Kempapura Srinivasa
d3cdc8023b
Use logger from logging pkg
...
This now also uses info as the default log level and enables the
configuration of the default log level as well as log levels of
the child loggers that will be implemented in a later commit.
2021-09-28 17:30:11 +02:00
Ravi Kumar Kempapura Srinivasa
414057830e
Allow to configure logging in the YAML configuration
2021-09-28 17:30:11 +02:00
Ravi Kumar Kempapura Srinivasa
acde6ade69
Introduce Logging config struct
2021-09-28 17:30:11 +02:00
Ravi Kumar Kempapura Srinivasa
a26bf87882
Introduce logging pkg with access to a default logger and named child logges
2021-09-28 17:30:11 +02:00
Eric Lippmann
749bca97df
Merge pull request #377 from Icinga/remove-example-config-from-docs
...
Remove example configuration from docs
2021-09-28 17:29:51 +02:00
Eric Lippmann
74e5da9a0d
Remove example configuration from docs
...
We already have config.yml.example as a source to copy and paste
so one can get started easily. In addition,
only one place has to be maintained for the example configuration.
2021-09-28 16:18:59 +02:00
Alexander A. Klimov
d8b3f75778
Schema: s/mediumtext/longtext/
...
... to make MySQL storage capabilities of likely large text columns
more similar (16MB -> 4GB) to (upcoming) Postgres ones (unlimited)
and not to have to pre-truncate anything.
refs #260
2021-09-28 11:13:51 +02:00
Julian Brost
65074f5755
Merge pull request #370 from Icinga/feature/icingadb-scheduling_source-160
...
Include CheckResult#scheduling_source in state and history
2021-09-27 17:32:42 +02:00
Julian Brost
6e3df7d63b
Merge pull request #373 from Icinga/feature/single-threaded-delta
...
Rewrite delta to use only a single goroutine
2021-09-24 16:53:23 +02:00
Julian Brost
0c9fb2f22f
Merge pull request #369 from Icinga/feature/log-reconnects-351
...
Log all different failed and recovered reconnects to backends
2021-09-24 11:58:34 +02:00
Julian Brost
66d9b0e6e6
Rewrite delta to use only a single goroutine
2021-09-24 11:52:15 +02:00
Julian Brost
1e9a88bee6
Add tests and benchmarks for delta computation
2021-09-24 11:52:13 +02:00
Julian Brost
4f16da4c1a
Merge pull request #361 from Icinga/bugfix/hscan-duplicates
...
Redis HYield: remove duplicates returned by HSCAN
2021-09-24 11:50:31 +02:00
Julian Brost
740205301f
Merge pull request #363 from Icinga/dependabot/go_modules/go.uber.org/zap-1.19.1
...
Bump go.uber.org/zap from 1.19.0 to 1.19.1
2021-09-24 11:49:44 +02:00
Alexander A. Klimov
b4bfee92d9
Log all recovered reconnects to backends
...
... to give the admin the all-clear.
refs #351
2021-09-23 16:07:41 +02:00
Julian Brost
e0c903bfdc
Redis HYield: remove duplicates returned by HSCAN
...
fixes #349
2021-09-23 14:36:51 +02:00
Julian Brost
4457f9f440
Merge pull request #365 from Icinga/data-races
...
Fix data races
2021-09-23 12:32:19 +02:00
Eric Lippmann
454381c820
Use uint64 instead of Counter
...
Use uint64 as there is no longer any concurrent access.
2021-09-23 12:18:08 +02:00
Julian Brost
6bc965a1aa
Merge pull request #372 from Icinga/bugfix/heartbeat-loss-log-func
...
Fix use of wrong log function on heartbeat loss
2021-09-23 10:53:47 +02:00
Eric Lippmann
98202e1257
Use buffered channel
...
Use a buffered channel so that the next HSCAN call does not have
to wait until the previous result has been processed.
2021-09-23 09:37:31 +02:00
Eric Lippmann
c1e722f5fa
Do not close channel too early
...
This fixes a data race where the pairs channel was closed too early
when the context is canceled and therefore the outer errgroup
returns from Redis operations before Wait() is called on the inner
errgroup. Unfinished Go methods in the inner errgroup would then
try to work on a closed channel.
2021-09-23 09:37:31 +02:00
Eric Lippmann
7351559793
Use pointer receiver for Counter.Val()
...
This fixes a data race as Val() was previously operating on a copy
of the counter while Inc() and Add() may haved changed the original
value.
2021-09-23 09:37:31 +02:00
Eric Lippmann
9ce2cff5c0
Introduce WaiterFunc type
...
The WaiterFunc type is an adapter to allow the use of ordinary
functions as Waiter.
2021-09-23 09:37:31 +02:00
Julian Brost
17321cdfc3
Fix use of wrong log function on heartbeat loss
...
Has to use the Warnw function as it passes additional zap attributes.
2021-09-23 09:27:26 +02:00
Alexander A. Klimov
82d8f830af
Include CheckResult#scheduling_source in state and history
...
refs #160
2021-09-22 17:30:13 +02:00
Alexander Aleksandrovič Klimov
585d1e6bb5
Merge pull request #368 from Icinga/bugfix/icinga-db-does-not-exit-when-reconnecting-to-the-database-350
...
On shutdown: give up HA handover after 3s, not 5m
2021-09-22 16:22:51 +02:00
Alexander A. Klimov
f554fa9dfe
Log all different failed reconnects to backends
...
E.g. the first "connection refused" and the first "hostname mismatch".
refs #351
2021-09-22 16:15:37 +02:00
Alexander A. Klimov
3e452d9561
On shutdown: give up HA handover after 3s, not 5m
...
... not to hang for 5m if DB is down.
refs #350
2021-09-22 15:42:58 +02:00
Alexander A. Klimov
321db0eecf
Introduce Settings#OnSuccess
...
refs #351
2021-09-22 15:35:08 +02:00
Alexander A. Klimov
653df82a1e
Introduce Settings#OnError
...
refs #351
2021-09-22 15:34:39 +02:00
Alexander A. Klimov
ea7668d99a
HA#Close(): allow custom context
...
refs #350
2021-09-22 14:12:27 +02:00
Alexander A. Klimov
5a146645f2
HA#removeInstance(): allow custom context
...
refs #350
2021-09-22 14:12:27 +02:00
Alexander A. Klimov
8d57ec107a
WithBackoff(): aggregate optional settings in one struct
...
refs #351
2021-09-22 13:37:12 +02:00
Alexander Aleksandrovič Klimov
4371d04d5e
Merge pull request #356 from Icinga/bugfix/mustpackany
...
Clarify what MustPackAny() does
2021-09-21 16:16:56 +02:00
dependabot[bot]
bd27842e5c
Bump go.uber.org/zap from 1.19.0 to 1.19.1
...
Bumps [go.uber.org/zap](https://github.com/uber-go/zap ) from 1.19.0 to 1.19.1.
- [Release notes](https://github.com/uber-go/zap/releases )
- [Changelog](https://github.com/uber-go/zap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/uber-go/zap/compare/v1.19.0...v1.19.1 )
---
updated-dependencies:
- dependency-name: go.uber.org/zap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-09-13 10:02:07 +00:00
Julian Brost
47bc17f7d8
Update icinga-testing and use new features ( #362 )
...
The new version deploys its own ApiUser so there is no more need to do this
here and also waits for reloads to finish, so no more need for some sleeps.
2021-09-09 13:52:45 +02:00
Alexander Aleksandrovič Klimov
aaf4a22742
Merge pull request #359 from Icinga/dependabot/go_modules/github.com/creasty/defaults-1.5.2
...
Bump github.com/creasty/defaults from 1.5.1 to 1.5.2
2021-09-03 17:05:00 +02:00
dependabot[bot]
d6b12dfa5c
Bump github.com/creasty/defaults from 1.5.1 to 1.5.2
...
Bumps [github.com/creasty/defaults](https://github.com/creasty/defaults ) from 1.5.1 to 1.5.2.
- [Release notes](https://github.com/creasty/defaults/releases )
- [Commits](https://github.com/creasty/defaults/compare/v1.5.1...v1.5.2 )
---
updated-dependencies:
- dependency-name: github.com/creasty/defaults
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-09-03 14:25:48 +00:00
Julian Brost
50b0a90543
Merge pull request #353 from Icinga/dependabot/go_modules/github.com/go-redis/redis/v8-8.11.3
...
Bump github.com/go-redis/redis/v8 from 8.11.2 to 8.11.3
2021-09-03 16:24:11 +02:00
Julian Brost
ed5f038f95
Merge pull request #352 from Icinga/dependabot/go_modules/go.uber.org/zap-1.19.0
...
Bump go.uber.org/zap from 1.18.1 to 1.19.0
2021-09-03 16:23:48 +02:00
Julian Brost
af61846114
Merge pull request #344 from Icinga/feature/downtime-column-comments
...
Schema: Add description to downtime columns 'triggered_by_id' and 'parent_id'
2021-09-03 16:20:59 +02:00
dependabot[bot]
5f1b199cdd
Bump go.uber.org/zap from 1.18.1 to 1.19.0
...
Bumps [go.uber.org/zap](https://github.com/uber-go/zap ) from 1.18.1 to 1.19.0.
- [Release notes](https://github.com/uber-go/zap/releases )
- [Changelog](https://github.com/uber-go/zap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/uber-go/zap/compare/v1.18.1...v1.19.0 )
---
updated-dependencies:
- dependency-name: go.uber.org/zap
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-09-03 12:14:47 +00:00
dependabot[bot]
2ee2be83d5
Bump github.com/go-redis/redis/v8 from 8.11.2 to 8.11.3
...
Bumps [github.com/go-redis/redis/v8](https://github.com/go-redis/redis ) from 8.11.2 to 8.11.3.
- [Release notes](https://github.com/go-redis/redis/releases )
- [Changelog](https://github.com/go-redis/redis/blob/master/CHANGELOG.md )
- [Commits](https://github.com/go-redis/redis/compare/v8.11.2...v8.11.3 )
---
updated-dependencies:
- dependency-name: github.com/go-redis/redis/v8
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-09-03 12:13:47 +00:00
Julian Brost
037acd0658
Merge pull request #348 from Icinga/feature/integration-tests
...
Integration tests
2021-09-03 14:11:55 +02:00
Noah Hilverling
d1a3814ca6
Move etc/icingadb.service to packaging repositories ( #345 )
2021-09-03 09:46:02 +02:00
Alexander Aleksandrovič Klimov
956590cb99
Merge pull request #301 from Icinga/feature/scheduled_by
...
Introduce downtime#scheduled_by
2021-09-02 10:31:59 +02:00
Julian Brost
113c7349fd
Automatically run integration tests using GitHub Actions
2021-09-02 10:15:21 +02:00
Julian Brost
2f3e4ae93b
Start adding integration tests
2021-09-02 10:15:21 +02:00
Julian Brost
064a0700ca
Merge pull request #358 from Icinga/bugfix/default-config-options
...
Ensure extra config options are properly initialized
2021-09-02 10:14:32 +02:00