Commit graph

7 commits

Author SHA1 Message Date
5316136eb6 Fix real root cause: password-extraction regex matched a second "password: "
Introduced by an earlier edit to .admin_credentials_ONE_TIME's own
instructional text ("...you've stored the password: rm <path>"), which
itself contains "password: " - the same substring resolve_admin_password()
greps for. grep -oP matched BOTH occurrences; command substitution joined
them with a real newline, producing a corrupted two-line "password" that
never matched .env's GRAYLOG_ROOT_PASSWORD_SHA2, causing every gcurl call
to silently 401 and wait_for_api_ready to time out no matter how generous
the timeout was (confirmed by re-verifying live: the real password,
extracted correctly, hashes to exactly what .env already has).

Fixed both ends: reworded the instructional text to not repeat "password:",
and hardened the regex itself (^Graylog admin password: anchor, grep -m1)
so a future wording change can't reintroduce the same class of bug.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-22 23:13:09 +03:00
9cdef5d521 Bump wait_for_api_ready timeout from 60s to 180s
Confirmed live: on a CI-triggered run, the REST API genuinely took longer
than 60s to accept authenticated requests even though the container had
already reported healthy - verified after the fact that both the API and
the admin credentials were fine, this was purely insufficient margin
(likely due to concurrent load during the run), not a logic bug. 180s
matches the same order of magnitude as the existing 300s docker-health
wait elsewhere in this script.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-22 23:05:52 +03:00
63e6ce88d0 Fix startup race: wait for the REST API before the first authenticated call
Docker's healthcheck can report graylog-server "healthy" a few seconds
before the REST API is actually ready to serve authenticated requests -
confirmed live: the first gcurl call (step_index_retention) intermittently
got an empty response body, crashing the downstream `python3 -c
"json.load(sys.stdin)"` with "Expecting value: line 1 column 1".

Adds wait_for_api_ready(), polling the same endpoint step_index_retention
already needs (up to 60s) before proceeding, mirroring the existing
retry-loop pattern already used for docker compose pull.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-22 22:45:28 +03:00
83a3388d41 Silence locale warnings and auto-display/delete the one-time admin password
- export LC_ALL=C.UTF-8 LANG=C.UTF-8 at the top of the script: the
  container inherits LANG=en_US.UTF-8 from pct exec's calling shell but
  never generates that locale, so every apt-get call printed "Setting
  locale failed" warnings from perl/apt-listchanges. C.UTF-8 is glibc-
  builtin, no locale-gen needed.
- The final summary now prints the generated admin user/password directly
  and deletes .admin_credentials_ONE_TIME right after, instead of just
  pointing at the file and leaving it for the operator to read and clean
  up by hand.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-22 22:29:31 +03:00
510ca37e48 Add flood alerts, session correlation, focused dashboards, and CI deploy workflow
- Two flood-detection alerts (per-source message volume, calibrated live
  against real traffic) grouped by gl2_remote_ip
- Session correlation: accelppp_interface fallback tagging plus
  radius_session_id/calling_station_id/radius_username extraction, so a
  subscriber's full session lifecycle is searchable by one key
- Replace the single combined dashboard with three focused ones (Overview
  & Alerts, Network Equipment, Servers & Sessions)
- Propagate GRAYLOG_ROOT_TIMEZONE and IP-in-alerts fixes into the reusable
  install script and templates
- Add a Forgejo Actions workflow (manual trigger) that re-runs
  install-graylog.sh on a self-hosted runner living in the container,
  automating the deploy step this project has done by hand all along

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-22 21:31:08 +03:00
0db85fa860 feat: add Juniper chassis alarm alerting, Discord notifications, and global timezone configuration for accurate syslog timestamp parsing 2026-07-22 18:48:26 +03:00
06233065cb feat: add automated deployment scripts and monitoring configuration for Graylog infrastructure 2026-07-22 04:52:27 +03:00