Motivation:
modernc.org/sqlite versions 1.39.0 through at least 1.50.1 (the version
previously pinned in go.mod) fail to compile on NetBSD amd64, breaking
any package that depends on gatus's sqlite storage backend on that
platform. The breakage is tracked upstream at
https://gitlab.com/cznic/sqlite/-/work_items/246, and is reported as
fixed starting with modernc.org/sqlite v1.53.0.
Approach:
Ran `go get modernc.org/sqlite@v1.59.0` (the latest available release,
newer than the minimum v1.53.0 fix version) followed by `go mod tidy`,
matching this repo's established convention of bumping straight to the
latest release rather than a minimum-fix version. This only touches
go.mod/go.sum; storage/store/sql/sql.go only uses the driver via the
standard `_ "modernc.org/sqlite"` blank import and generic database/sql
calls, so it is unaffected by internal changes in the new version. The
bump also pulls in a few indirect dependency updates (mattn/go-isatty,
modernc.org/libc, modernc.org/memory, and sqlite's own codegen
dependencies) via Go's module version selection.
Validation:
Ran `go build`, `go vet ./...`, and `go test ./... -race`, mirroring
this repo's test.yml CI workflow (minus the `sudo` it uses for a
ping-based test, which is unrelated to this change) — all packages
build and pass with the new dependency version, confirming no
regression on this platform. Also ran `go mod verify` and a second
`go mod tidy`, both producing no additional diff. The NetBSD build
fix itself could not be reproduced directly since this development
environment is macOS/arm64; the fix is bumping past the version range
the upstream sqlite issue identifies as broken.
Report: https://github.com/TwiN/gatus/issues/1709
Assisted-by: claude-sonnet-5 (via Claude Code)
Signed-off-by: Pujitha Paladugu <10557236+pujitha24@users.noreply.github.com>
Co-authored-by: Pujitha Paladugu <10557236+pujitha24@users.noreply.github.com>
* test(config): make HasLoadedConfigurationBeenModified deterministic
The two subtests each slept a full second so a rewritten file's mod time
(second precision) would advance past the load time. Advance the mod time
explicitly with os.Chtimes instead, and give the directory subtest its own
temp dir so the file subtest's future-dated config.yaml no longer leaks
into it. Removes ~2s of wall-clock sleep and the coarse-clock dependence;
the test is now deterministic.
* test(config): trim comments to the forward-facing rationale
---------
Co-authored-by: TwiN <twin@linux.com>
Zulip alerts previously always used a hardcoded "Gatus" topic, sending
every alert and resolution into a single thread. Add a "topic" config
field (defaulting to "Gatus" for backwards compatibility) that supports
the [ENDPOINT_NAME], [ENDPOINT_GROUP] and [ALERT_DESCRIPTION] placeholders,
matching the templating convention used by other providers such as clickup.
Closes#1387
Co-authored-by: Chris (ChrisJr404) <11917633+ChrisJr404@users.noreply.github.com>
Co-authored-by: TwiN <twin@linux.com>
Symptom: building gatus (v5.36.0 and master) with Go 1.27.0 fails on
every platform with:
# google.golang.org/grpc/internal/transport
google.golang.org/grpc@v1.81.1/internal/transport/handler_server.go:271:18:
undefined: http2.TrailerPrefix
Root cause: golang.org/x/net v0.54.0 (indirect dependency, pulled in via
grpc) started switching its http2 package to a shim that delegates to
the standard library's HTTP/2 server when built with Go >= 1.27. The
legacy implementation in http2/server.go, which declares the exported
const TrailerPrefix, is guarded by the build constraint
"!(go1.27 && !http2legacy)", so under Go 1.27+ it is excluded and
replaced by http2/server_wrap.go ("go1.27 && !http2legacy"). The
wrap-mode file set in v0.54.0 forgot to declare TrailerPrefix, so any
importer referencing http2.TrailerPrefix no longer compiles; grpc
v1.81.1 references it in internal/transport/handler_server.go:271.
The failure is Go-version-specific, not architecture-specific: it
reproduces identically on a linux/amd64 host build and on
GOOS=linux GOARCH=arm GOARM=7 and GOARCH=arm64 cross builds (it was
originally reported from a linux/arm SBC, which is incidental). Go 1.26
and older are unaffected because the go1.27 build tag is not set there
and the legacy implementation still compiles.
Fix: x/net v0.55.0 moved TrailerPrefix to http2/server_common.go, which
builds in both legacy and wrap mode, restoring the exported API. This
commit bumps golang.org/x/net to the current latest, v0.58.0, via
"go get golang.org/x/net@latest && go mod tidy", which also lifts the
sibling golang.org/x/* modules (crypto, mod, sync, sys, text, tools) to
their matching release tags. No grpc bump is required: v1.81.1 compiles
fine once the symbol exists again. go.mod/go.sum only, no code changes.
Verification:
- Go 1.27.0 (GOTOOLCHAIN=local): go build ./..., go vet ./... and
go test ./... pass on linux/amd64; CGO_ENABLED=0 cross builds for
GOOS=linux GOARCH=arm GOARM=7 and GOOS=linux GOARCH=arm64 succeed.
Before this change, all of the above failed with the error quoted at
the top.
- Go 1.26.3: go build ./... and go test ./... still pass, so older
toolchains keep working.
This commit was prepared by an AI agent (Claude Fable 5, model id
claude-fable-5).
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Postgres 18 moved its declared volume to /var/lib/postgresql, so the
example container fails to start with the old path.
Signed-off-by: vshulcz <vshulcz@gmail.com>
* Revise HomeAssistant alerts and add integration info
Updated HomeAssistant alerts section to indicate legacy status and added Home Assistant integration details.
* Fix typo
* Tweak wording from Legacy to Native
* Tweak on feedback
---------
Co-authored-by: TwiN <twin@linux.com>
A jsonpath condition with a negative array index (e.g. [BODY].data[-1]
or [BODY][-1]) reached array[arrayIndex] with a negative index because
the len(array) > arrayIndex bounds checks are satisfied by any negative
value, causing a 'runtime error: index out of range [-1]' panic. Since
condition evaluation runs in the watchdog with no recover(), this would
crash the process.
Guard against negative indices alongside the existing strconv.Atoi error
check so an out-of-range negative index returns nil (treated as an
invalid path) instead of panicking. Adds tests for negative indices on
keyed arrays, root arrays, and negative-index-followed-by-key.
Made by an AI agent (Claude Code, model Claude Opus 4.8).
Co-authored-by: TwiN <twin@linux.com>
* fix: update lib/pq to v1.11.2 to fix Supabase PostgreSQL connection regression
lib/pq v1.11.0 introduced a Config struct refactor that unconditionally
sends an empty 'options' parameter during the PostgreSQL startup handshake.
Supabase's Supavisor connection pooler rejects startup messages containing
empty parameters, returning :bad_startup_payload and causing an EOF panic
during Gatus initialization.
This bump to lib/pq v1.11.2 (commit 1412805) fixes the issue by omitting
empty startup parameters from the handshake.
FixesTwiN/gatus#1633
See: https://github.com/lib/pq/issues/1259
Changes:
- go.mod: bump github.com/lib/pq v1.11.1 -> v1.11.2
- go.sum: update checksums for lib/pq v1.11.2
- storage/store/sql/supabase_test.go: add regression test
This contribution was AI-assisted.
* Remove regression test per maintainer feedback
@TwiN requested removal of the test - version bumps rarely need regression tests since they don't get bumped back down.
---------
Co-authored-by: Wahaj Ahmed <wahajahmed010@gmail.com>
Co-authored-by: TwiN <twin@linux.com>
* feat(ui): Add customizable OIDC login screen branding
As per https://github.com/TwiN/gatus/discussions/1579, this PR
allows for some customizations in the OIDC login screen:
- If a logo is set it will be displayed alongside the Gatus one
- New ui config `ui.login-subtitle`: customises the message in
the screen
- If set, use `ui.header` will be used to customise the title
I haven't commited the web static assets. I believe that's
triggered with a comment? let me know if I should be doing it.
Also please clarify if I've forgotten about something here,
this is my first pr.
* chore(ui): Regenerate static assets
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: TwiN <twin@linux.com>
* fix: return error from rdapQuery when no expiration event found
When an RDAP response has no expiration event, rdapQuery returned a
zero-value ExpirationDate with nil error. This prevented
GetDomainExpiration from falling back to WHOIS, causing failures
for TLDs like .net where RDAP may omit the expiration event.
Signed-off-by: majiayu000 <1835304752@qq.com>
* fix: include hostname in RDAP error and add .net domain tests
Add .net domain test cases to TestRdapQuery and TestGetDomainExpiration
to cover the fallback path when RDAP lacks an expiration event (#1570).
Include hostname in the error message for easier debugging.
Signed-off-by: majiayu000 <1835304752@qq.com>
---------
Signed-off-by: majiayu000 <1835304752@qq.com>
* Email alerts: Use parens instead of square brackets in the subject to resolve Gmail threading issues. Fixes#1563
* Remove parens
* Add `:` after alert name