Commit graph

1972 commits

Author SHA1 Message Date
Alexander A. Klimov
80ab823294 Introduce Atomic[T] 2022-06-23 18:31:45 +02:00
Alexander A. Klimov
64d7f1be43 Remove unused StreamLastId() 2022-06-23 18:31:45 +02:00
Alexander A. Klimov
d85d070d1f Clear icinga:runtime* and read from 0-0 later
instead of preserving the (never read) data and reading beyond its end later.
This indicates the correct number of pending runtime updates
(for monitoring by Icinga 2) from the beginning.
2022-06-23 18:31:45 +02:00
Julian Brost
d13c435d45
Merge pull request #501 from Icinga/bugfix/make-early-error-messages-user-friendly
Make Database/Redis schema mismatch error more user friendly
2022-06-23 16:47:48 +02:00
Julian Brost
b20998a897
Merge pull request #502 from Icinga/bulk-one-nil
oneBulk(): terminate once input closed (like the regular bulker)
2022-06-23 16:05:38 +02:00
Alexander A. Klimov
9b618c690a XTRIM data XREAD from icinga:runtime*
for Icinga 2 to monitor pending runtime updates.
2022-06-22 17:38:58 +02:00
Alexander A. Klimov
6627ecbfad parseString(): Don't Repeat Yourself 2022-06-22 15:27:00 +02:00
Alexander A. Klimov
2bda98cbe4 oneBulk(): terminate once input closed (like the regular bulker)
instead of outputting zero values.
2022-06-22 12:32:30 +02:00
Yonas Habteab
c06a9ed1ca Add host:port log info when trying to connecto to database/redis 2022-06-21 15:42:57 +02:00
Yonas Habteab
ad575ad552 Make Database/Redis schema mismatch error more user friendly 2022-06-21 15:42:57 +02:00
Alexander A. Klimov
fac9f5e4e5 Write ops/s by op and s to icingadb:telemetry:stats 2022-06-15 09:51:59 +02:00
Alexander A. Klimov
0e5d098be4 DB#CleanupOlderThan(): allow to get done work counted in real time 2022-06-15 09:51:59 +02:00
Alexander A. Klimov
48b7bb4c35 DB#Delete(): allow monitoring succeeded items 2022-06-15 09:51:59 +02:00
Alexander A. Klimov
cc352252ec DB#CreateStreamed(): allow monitoring succeeded items 2022-06-15 09:51:59 +02:00
Alexander A. Klimov
db4725218e DB#{*BulkExec,*Streamed}(): replace succeeded channel with callbacks
to allow to avoid a goroutine reading that channel.
2022-06-15 09:51:59 +02:00
Eric Lippmann
8f31ac1438
Merge pull request #498 from Icinga/feature/rename-example-config
Rename config.yml.example to config.example.yml
2022-06-13 15:07:38 +03:00
Julian Brost
f08c67cc1f Rename config.yml.example to config.example.yml
This makes more tools recognize this as a YAML file and enable syntax
highlighting for example.
2022-06-13 13:50:59 +02:00
Julian Brost
1c02f89b9b
Merge pull request #493 from Icinga/schema-consistency-for-relations
Schema consistency for relations
2022-06-09 10:19:46 +02:00
Yonas Habteab
9ad8f0bf3e schema: Merge all alter table statments of the same table into a single one 2022-06-08 17:00:15 +02:00
Eric Lippmann
14d0fe62a7
Merge pull request #496 from Icinga/feature/mysql-grant-localhost
Docs: use @localhost instead of @127.0.0.1 for MySQL user
2022-06-07 23:00:52 +03:00
Yonas Habteab
79003429ab Bump expected redis schema version to 5 2022-06-07 12:57:57 +02:00
Julian Brost
73e6922d8d Docs: use @localhost instead of @127.0.0.1 for MySQL user
This allows the user to additionally connect via ::1 and Unix Domain Sockets.
2022-06-07 10:53:51 +02:00
Julian Brost
0cbb306469
Merge pull request #495 from Icinga/dependabot/go_modules/github.com/stretchr/testify-1.7.2
Bump github.com/stretchr/testify from 1.7.1 to 1.7.2
2022-06-07 09:16:23 +02:00
dependabot[bot]
86bfe5a67e
Bump github.com/stretchr/testify from 1.7.1 to 1.7.2
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.1 to 1.7.2.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.1...v1.7.2)

---
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-06-06 10:00:48 +00:00
Eric Lippmann
6386d55799
Merge pull request #490 from Icinga/bugfix/git-version-compat
Fix `icingadb --version` output when using older Git versions
2022-06-02 17:26:47 +02:00
Yonas Habteab
a89e82b794 Fix integration tests 2022-05-31 17:05:51 +02:00
Yonas Habteab
154f46c2f0 Checkable: Adjust the naming of the struct/json keys according to the new scheme 2022-05-31 15:15:29 +02:00
Eric Lippmann
ea6646937d Add _name suffix to columns referring to name 2022-05-31 15:15:29 +02:00
Julian Brost
cd78d96f04 Fix icingadb --version output when using older Git versions
When building Icinga DB from a tarball generated using `git archive` using a
Git version older than 2.32, the version output could incorrectly state "Icinga
DB version: %(describe)". This commit detects this situation and implements a
fallback.
2022-05-24 17:53:19 +02:00
Julian Brost
64aca11bcb
Merge pull request #489 from Icinga/retry-dns-errors
Streamline IsRetryable functions and retry DNS errors
2022-05-24 16:43:54 +02:00
Eric Lippmann
51068fff46
Merge pull request #487 from Icinga/feature/version-details
Add more information to `icingadb --version` ouput
2022-05-24 16:04:38 +02:00
Eric Lippmann
53cee3ee04 Streamline IsRetryable functions and retry DNS errors
Aligns the behavior of the IsRetryable functions for Redis and database.
It now also checks if the error implements timeout, even if the error
implements temporary, where previously only the temporary bool was
returned and timeout was ignored. The idea here is that an error could
implement both, returning false for temporary and true for timeout.
Also, all DNS errors are now considered retryable.
2022-05-24 16:02:34 +02:00
Julian Brost
c6e843146f Add more information to icingadb --version ouput
This commit adds the build information (Go version, Git commit) and system
information (distribution with version) to the output of `icingadb --version`.

When exporting the source code using `git archive`, Git will insert the version
information using the export-subst attribute (adds both a pretty version string
like `git describe` and the commit hash).

`go build` also adds some Git commit information to the resulting binary when
building from a Git working directory (only the commit hash and a flag if there
are uncommitted changes, but no pretty version string).

Note that `go build` does not include Git version information in the binary, so
when running directly from a Git working directory, commit information won't be
available in the binary, but when doing this, you should be well aware which
version you're running anyways.

System information is obtained from the `os-release` file.
2022-05-23 16:03:56 +02:00
Julian Brost
5f5b3fb919
Merge pull request #482 from Icinga/feature/parameter-delimiters-check-execution-6277
Add CommandArgument#Separator
2022-05-23 13:23:51 +02:00
Julian Brost
0ae76ec9cc
Merge pull request #488 from Icinga/dependabot/go_modules/github.com/lib/pq-1.10.6
Bump github.com/lib/pq from 1.10.5 to 1.10.6
2022-05-23 13:14:38 +02:00
dependabot[bot]
d685594118
Bump github.com/lib/pq from 1.10.5 to 1.10.6
Bumps [github.com/lib/pq](https://github.com/lib/pq) from 1.10.5 to 1.10.6.
- [Release notes](https://github.com/lib/pq/releases)
- [Commits](https://github.com/lib/pq/compare/v1.10.5...v1.10.6)

---
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-05-23 10:01:00 +00:00
Eric Lippmann
fa2e388c3c
Merge pull request #486 from Icinga/bugfix/individual-integration-test-log-files
Integration tests: use separate artifact names for MySQL/PostgreSQL
2022-05-18 09:44:21 +02:00
Alexander A. Klimov
c1c15331e4 Quote column names for the case they're reserved 2022-05-17 17:57:55 +02:00
Julian Brost
873eb9cd3e Integration tests: use separate artifact names for MySQL/PostgreSQL
If I remember correctly, some time ago you were able to download artifacts from
the job page, i.e. there was no issues with two jobs using the same artifact
name within one workflow. Now it looks like you can only download the artifacts
from the workflow page, so this commit allows you to download both files from
there.
2022-05-17 15:36:12 +02:00
Alexander A. Klimov
1cacfbe7ba Add CommandArgument#Separator 2022-05-16 17:26:25 +02:00
Julian Brost
88736f76b6
Merge pull request #484 from Icinga/split-redis-address
Split Redis address into host and port
2022-05-16 17:23:52 +02:00
Eric Lippmann
66e1954123 Tests: Update go.mod 2022-05-16 17:01:47 +02:00
Eric Lippmann
5e3a85976d Expect serverName only in TLS.MakeConfig()
With recent changes to Unix domain socket support, port and address
handling in SQL and Redis configuration, the function can now be reduced
to just expecting the server name.
2022-05-16 17:01:09 +02:00
Eric Lippmann
399b6a3d32 Split Redis address into host and port
The port is set to 6379 by default to keep it consistent with standard
Redis installations, but the example configuration explicitly specifies
6380 since that is the default port of the icingadb-redis package.
2022-05-16 17:01:09 +02:00
Julian Brost
6dc135d502
Merge pull request #474 from Icinga/bugfix/retention-environment
Retention: take environment_id into account
2022-05-16 11:23:00 +02:00
Julian Brost
eccac78ff3 Retention: take environment_id into account
This commit ensures that the retention feature only deletes history from the
current environment. Previously, the deletion queries where missing an
appropriate WHERE clause.
2022-05-13 17:19:03 +02:00
Julian Brost
3c07730bb0 PostgreSQL: add missing retention indices 2022-05-13 17:19:03 +02:00
Julian Brost
09af3c8184
Merge pull request #461 from Icinga/postgres-integer-like
PostgreSQL: Support LIKE for integer/enum columns
2022-05-13 16:17:42 +02:00
Julian Brost
da3fa88707
Merge pull request #477 from Icinga/feature/more-config-validation
Check for required database and Redis config options during config validation
2022-05-13 16:09:00 +02:00
Julian Brost
e8da1b8453
Merge pull request #481 from Icinga/feature/remove-obsolete-retention-code
Retention: remove leftover code from older tests
2022-05-13 15:52:46 +02:00