Julian Brost
21bc728783
CleanupOlderThan: no longer return number of rounds
...
This value is not used anymore, so instead of returning a struct, the function
can just return the number of rows deleted as uint64.
2022-05-13 15:30:06 +02:00
Julian Brost
5b6c37feca
Retention: remove StartWithCallback
...
This was added for the tests but the corresponding test was rewritten in #467
so it's no longer used or needed.
2022-05-13 15:30:06 +02:00
Julian Brost
3335595587
Build fix
...
Two PRs (#247 , #480 ) were merged without hard merge conflicts but the resulting
code missed a change of a variable leading to a build failure.
2022-05-13 15:27:25 +02:00
Julian Brost
772e9bddfd
Merge pull request #480 from Icinga/feature/retention-logging
...
Retention: periodically log number of items removed
2022-05-13 15:17:18 +02:00
Julian Brost
5081ded974
Check for required database and Redis config options during config validation
2022-05-13 15:09:31 +02:00
Eric Lippmann
77b37c3551
PostgreSQL: Support text comparsion for int/enum columns
...
At the moment Icinga DB Web doesn't know the column types, so it sends
SQL queries with LIKE operators for all suggestions in the search bar,
which fails for numeric and enum types on PostgreSQL. To support this,
the LIKE operator (internally translated to ~~) is overloaded. Note
that this is only a temporary solution until Icinga DB Web provides
column type support.
2022-05-13 15:02:43 +02:00
Eric Lippmann
8480ba949a
Merge pull request #483 from Icinga/bugfix/sql-port-numbers
...
DB: use default ports and allow setting port for PostgreSQL Unix domain sockets
2022-05-13 13:41:16 +02:00
Julian Brost
da230d4f92
Merge pull request #247 from Icinga/feature/sla-reporting
...
SLA reporting
2022-05-13 12:21:47 +02:00
Julian Brost
19170ecbcf
SLA reporting: history retention for SLA tables
2022-05-13 12:04:47 +02:00
Julian Brost
d119be0da5
SLA reporting: fill new tables from history in schema migration
2022-05-13 12:04:47 +02:00
Julian Brost
d78ecdf994
SLA reporting: integration tests
2022-05-13 12:04:47 +02:00
Julian Brost
5ea82188dc
SLA reporting: tests for the SQL stored function
2022-05-13 12:04:47 +02:00
Julian Brost
b81392857a
SLA reporting: add SQL stored function to calculate SLA value
2022-05-13 12:04:47 +02:00
Julian Brost
a0b1bc3196
List required RDBMS versions and increase PostgreSQL minimum
...
MySQL minimum versions are based on what was used in Icinga DB 1.0.0 RC1.
The required PostgreSQL version is bumped to at least 9.6 as this allows to
label functions as `PARALLEL RESTRICTED` like it's done by the SLA reporting.
This or newer versions are available for both CentOS/RHEL 8 and SLES 12 which
were the primary constraints for the previous version requirement.
For CentOS/RHEL, don't specify some additional paths and package names with a
specific version, as any newer version is also fine and there's a choice of
multiple versions. Also, we don't guide the user through actually installing
the PostgreSQL server, so they should already be familiar with the differing
names if their distribution reuqires them.
[1] https://github.com/Icinga/icingadb/blob/v1.0.0-rc1/.github/workflows/go.yml
2022-05-13 12:04:47 +02:00
Julian Brost
e9bd5cd40f
SLA reporting: additionally write relevant history events to dedicated SLA tables
2022-05-13 12:04:47 +02:00
Julian Brost
aeeab5918c
Use default MySQL port if none is specified
2022-05-12 16:35:41 +02:00
Julian Brost
bfea92e039
Allow setting port for PostgreSQL Unix domain socket
...
When you specify a socket path like /run/postgresql, the actual socket file is
located at /run/postgresql/.s.PGSQL.5432 where the number is the port number of
the server (as it's used for TCP). So it makes sense also allowing to set the
port for Unix domain sockets.
This commit also omits the port from the connection URI if none is given for
TCP connections, thus also using the default value in this case.
2022-05-12 16:35:41 +02:00
Julian Brost
7cd6fd98ce
SLA reporting: SQL schema
2022-05-11 11:44:45 +02:00
Alexander Aleksandrovič Klimov
811b69a794
Merge pull request #478 from Icinga/feature/no-stacktrace-on-config-error
...
Don't print a stacktrace on config errors
2022-05-11 10:33:54 +02:00
Julian Brost
d5b55ee515
Retention: periodically log number of items removed
...
Other components log this information periodically at level info, whereas the
retention feature was completely quiet at that level. It's logged at the
interval the retention cleanup is run rather than the global configured logging
interval since retention cleanup is done less often.
2022-05-11 09:30:34 +02:00
Julian Brost
6ee893df8d
Don't print a stacktrace on config errors
2022-05-10 16:47:09 +02:00
Julian Brost
c1bbc037de
Merge pull request #471 from Icinga/embed.lua
...
go:embed LUA script
2022-05-10 12:53:07 +02:00
Eric Lippmann
1ef38e4f4c
Merge pull request #456 from Icinga/custom-vars-case-insensitive
...
Schema: Make custom variable names case insensitive
2022-05-10 09:48:07 +02:00
Eric Lippmann
65eece39f1
Schema: Make custom variable names case insensitive
...
To make custom variable searches case-insensitive by default.
2022-05-09 11:35:38 +02:00
Julian Brost
078507122d
Merge pull request #459 from Icinga/424
...
Ensure icingadb_instance#responsible=n
2022-05-05 15:05:27 +02:00
Alexander A. Klimov
08b72cdf10
go:embed LUA script
...
for the sake of syntax highlighting.
2022-05-04 19:59:50 +02:00
Alexander A. Klimov
2f3a176bff
On HA takeover set other instances' icingadb_instance#responsible = n
...
for the case they crashed and didn't that by themselves.
2022-05-04 19:41:03 +02:00
Alexander A. Klimov
67267a0f46
On HA handover: always set icingadb_instance#responsible=n
...
even on lost heartbeat.
2022-05-04 19:40:50 +02:00
Eric Lippmann
86e50cc733
Merge pull request #466 from Icinga/dependabot/go_modules/github.com/jmoiron/sqlx-1.3.5
...
Bump github.com/jmoiron/sqlx from 1.3.4 to 1.3.5
2022-05-04 16:42:14 +02:00
Eric Lippmann
26164397ab
Merge pull request #455 from Icinga/dependabot/go_modules/github.com/stretchr/testify-1.7.1
...
Bump github.com/stretchr/testify from 1.7.0 to 1.7.1
2022-05-04 16:41:40 +02:00
Eric Lippmann
6cb452c2e6
Merge pull request #469 from Icinga/bugfix/retry-eagain
...
Retry EAGAIN
2022-05-04 16:38:06 +02:00
Julian Brost
0a4f9a2338
Merge pull request #470 from Icinga/dependabot-reviewers
...
Update dependabot reviewers
2022-05-04 14:31:55 +02:00
dependabot[bot]
afb3178a1b
Bump github.com/jmoiron/sqlx from 1.3.4 to 1.3.5
...
Bumps [github.com/jmoiron/sqlx](https://github.com/jmoiron/sqlx ) from 1.3.4 to 1.3.5.
- [Release notes](https://github.com/jmoiron/sqlx/releases )
- [Commits](https://github.com/jmoiron/sqlx/compare/v1.3.4...v1.3.5 )
---
updated-dependencies:
- dependency-name: github.com/jmoiron/sqlx
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-05-04 12:30:42 +00:00
dependabot[bot]
761c5b4567
Bump github.com/stretchr/testify from 1.7.0 to 1.7.1
...
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify ) from 1.7.0 to 1.7.1.
- [Release notes](https://github.com/stretchr/testify/releases )
- [Commits](https://github.com/stretchr/testify/compare/v1.7.0...v1.7.1 )
---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-05-04 12:30:27 +00:00
Julian Brost
f33bd706d8
Merge pull request #453 from Icinga/dependabot/go_modules/github.com/go-redis/redis/v8-8.11.5
...
Bump github.com/go-redis/redis/v8 from 8.11.4 to 8.11.5
2022-05-04 14:29:37 +02:00
Eric Lippmann
c8891b7b6a
Update dependabot reviewers
2022-05-04 14:15:10 +02:00
dependabot[bot]
5809b6452c
Bump github.com/go-redis/redis/v8 from 8.11.4 to 8.11.5
...
Bumps [github.com/go-redis/redis/v8](https://github.com/go-redis/redis ) from 8.11.4 to 8.11.5.
- [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.4...v8.11.5 )
---
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>
2022-05-04 11:15:09 +00:00
Julian Brost
5ffe7a76d1
Merge pull request #467 from Icinga/use-binary-for-retention-test
...
Use Icinga DB docker instance for retention tests
2022-05-04 13:13:06 +02:00
Eric Lippmann
37dc9c40ad
Use Icinga DB docker instance for retention tests
...
This change eliminates the dependency on Icinga DB sources for the
retention tests by launching an Icinga DB docker instance. Furthermore,
different retention configurations are now being tested.
2022-05-04 12:22:01 +02:00
Julian Brost
c9d6a5ba7c
Merge pull request #458 from Icinga/451
...
Support *nix sockets as documented
2022-05-03 14:44:57 +02:00
Julian Brost
ef0ccc3555
Retry EAGAIN
2022-05-03 14:30:31 +02:00
Alexander A. Klimov
eb61bce2f2
Document Redis *nix socket support
2022-05-02 12:17:27 +02:00
Alexander A. Klimov
4f9fda66d5
RDBMS: support *nix sockets as documented
2022-05-02 12:17:27 +02:00
Alexander Aleksandrovič Klimov
41d5df3f34
Merge pull request #463 from Icinga/dependabot/go_modules/github.com/creasty/defaults-1.6.0
...
Bump github.com/creasty/defaults from 1.5.2 to 1.6.0
2022-04-25 16:20:34 +02:00
Julian Brost
cce8e37c07
Run go mod tidy in tests/ after defaults update
2022-04-25 16:05:47 +02:00
dependabot[bot]
36a012659c
Bump github.com/creasty/defaults from 1.5.2 to 1.6.0
...
Bumps [github.com/creasty/defaults](https://github.com/creasty/defaults ) from 1.5.2 to 1.6.0.
- [Release notes](https://github.com/creasty/defaults/releases )
- [Commits](https://github.com/creasty/defaults/compare/v1.5.2...v1.6.0 )
---
updated-dependencies:
- dependency-name: github.com/creasty/defaults
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-04-25 14:05:25 +00:00
Alexander Aleksandrovič Klimov
f503777d3c
Merge pull request #462 from Icinga/dependabot/go_modules/github.com/lib/pq-1.10.5
...
Bump github.com/lib/pq from 1.10.4 to 1.10.5
2022-04-25 15:28:14 +02:00
Julian Brost
c84377a62c
Run go mod tidy in tests/ after pq update
2022-04-25 15:13:50 +02:00
Alexander Aleksandrovič Klimov
af41705f11
Merge pull request #465 from Icinga/UnixMilli
...
Do x.UnixMilli(), not utils.UnixMilli(x)
2022-04-14 13:16:36 +02:00
dependabot[bot]
a94f3645ca
Bump github.com/lib/pq from 1.10.4 to 1.10.5
...
Bumps [github.com/lib/pq](https://github.com/lib/pq ) from 1.10.4 to 1.10.5.
- [Release notes](https://github.com/lib/pq/releases )
- [Commits](https://github.com/lib/pq/compare/v1.10.4...v1.10.5 )
---
updated-dependencies:
- dependency-name: github.com/lib/pq
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-04-14 11:02:51 +00:00