github GilbN/geometrikks v0.21.0

2 hours ago

Highlights

  • Grafana Loki as a log source. Set LOKI_URL and LOKI_QUERIES and GeoMetrikks reads access logs from Loki instead of a file. litestar import-loki --since <date> backfills older history from the same selectors.
  • Settings > Agents. Every agent writing to the database shows up with its version, servers, recent lines, failures and last check-in. An agent that stops checking in, runs another version or can't read a log gets a card on Settings > Status and turns the sidebar status dot amber.
  • Themes. Aurora, Moss, Forge and Night replace the accent color picker, each with a light and a dark palette. Light and dark mode can use different themes.
  • Nginx Proxy Manager import. import-logs --format npm reads NPM's own per-host logs, so the history from before the JSON log setup can be backfilled.
  • One name for "server". Hostname, recorded by, source and site home are all "server" now, in the UI, the API, the database and the environment variables.

Upgrade notes

Warning

Upgrade the full instance and every agent to 0.21.0 together. The first start renames the database columns and tables in place, without rewriting data. An older agent still starts against the renamed database, then fails every insert.

  • Six environment variables have new names: LOGPARSER_SERVER_NAME, MAP_SERVER_LOCATIONS, MAP_SERVER_LATITUDE, MAP_SERVER_LONGITUDE, MAP_AUTO_DETECT_SERVER_LOCATION and MAP_SERVER_LOCATION_REFRESH_HOURS. The old names work until 1.0 and raise a legacy-env-names advisory. Startup fails if an old and a new name are set to different values.
  • API scripts and bookmarks need the new names: serverIn/serverNotIn instead of hostnameIn/hostnameNotIn, server and servers in responses and /ws/live frames, and /api/v1/geo-locations/server-locations instead of /site-homes.
  • Queries that read the database directly need the new names: server columns, the server_locations table and the server_daily_stats aggregate.
  • backfill-hostname is backfill-server and backfill-geo-hostnames is backfill-geo-servers. import-logs and backfill-timings take --server instead of --hostname.
  • Set APP_INSTANCE_NAME on every agent. Unnamed agents share the name agent and overwrite each other's row on Settings > Agents.

Added

  • Themes. Settings > Appearance offers Aurora, Moss, Forge and Night, each with a light and a dark palette that follow Light, Dark or System. Pick one theme for both modes or mix them, such as Moss in light mode and Forge in dark mode. Night uses white and light grey in light mode and near-black in dark mode, with grey-scale buttons, links and logo.
  • import-logs reads Nginx Proxy Manager's own per-host access logs with --format npm, and --format auto detects them. You can backfill the history from before you set up the JSON log. Imported NPM rows have no response times, protocol or remote user. Live tailing doesn't accept the format. LOGPARSER_LOG_FORMATS=npm fails at startup, and a tailed file in that format logs a warning that points to the JSON setup.
  • import-logs --before leaves out lines stamped at or after a given date or time, so an import can stop where an already ingested log begins. Running a file again with a later --before, or none, imports only the lines in between.
  • GeoMetrikks can read access logs from Grafana Loki instead of a file. Set LOKI_URL and LOKI_QUERIES, with one LogQL stream selector per source. Loki lines get the same format detection, parsing and GeoIP lookup as a tailed file. The Status page lists each Loki source, and /health lists one that can't be reached or that refuses the query under ingestion.unavailableSources. See "Loki setup" in the README.
  • import-loki backfills history from Grafana Loki. litestar import-loki --since 2026-09-01 reads that range of every LOKI_QUERIES selector with the same format detection, parsing and GeoIP lookup as live reading. Without --before it stops where the data already in the database begins. Rerun an interrupted import with the same range and it picks up at the last completed hour. The command refuses a range that overlaps an earlier import unless you pass --force. See "import-loki" in the README.
  • Settings > Agents lists every agent writing to the database, with its version, servers, recent lines and failures, and when it last checked in. Click a row for that agent's ingestion, GeoIP, scheduled jobs, log sources and last error. You can remove an agent that has stopped checking in. An agent with a problem, such as one that stopped checking in, runs another version or can't read one of its logs, gets a card on Settings > Status and turns the sidebar status dot amber. Agents show up once they run this release. See "Multi-source setup" in the README.
  • APP_INSTANCE_NAME names an instance on the Agents page. Set it on every agent. Unset, agents go by agent and the full instance by head, so two unnamed agents overwrite each other's status. The page flags an agent running under the default name and a name that more than one process uses.

Changed

  • Themes replace the accent color picker, which is gone from the header and from Settings. A saved teal, green or copper accent becomes Aurora, Moss or Forge. Moss and Forge now tint the page and panels to match their color.
  • Settings > Appearance shows Light, Dark and System as preview cards drawn in the current theme.
  • Tabs, switches, checkboxes, menu items and select options show the pointer cursor on hover, like buttons already did.
  • In dark mode, menu and list highlights are a faint tint of the theme color instead of a solid fill, and primary buttons use a faint tint too.
  • The Ban button in the Ban IP dialog and the Remove button in the server location confirmation are red. The dialog's Cancel button has a border like other secondary buttons.
  • Dialogs blur the page behind them, as confirmation prompts already did.
  • "Server" is now the one name for whatever recorded a request: a GeoMetrikks instance, a tailed file or a Loki selector. It replaces "hostname", "recorded by", "source" and "site home" across the UI. Access Logs has a Server filter and column. Geo Logs has a Server filter and a Servers column. The map has a Server filter, a Server markers toggle and "Go to server location". Settings > Status lists Server locations. Saved table column layouts carry over. If you had turned off the map's home markers, the Server markers toggle is on again after the upgrade.
  • Six environment variables have new names. LOGPARSER_HOST_NAME is LOGPARSER_SERVER_NAME, MAP_HOME_LOCATIONS is MAP_SERVER_LOCATIONS, MAP_HOME_LATITUDE and MAP_HOME_LONGITUDE are MAP_SERVER_LATITUDE and MAP_SERVER_LONGITUDE, MAP_AUTO_DETECT_HOME is MAP_AUTO_DETECT_SERVER_LOCATION, and MAP_HOME_REFRESH_HOURS is MAP_SERVER_LOCATION_REFRESH_HOURS. The old names work until 1.0. A process that reads any old name shows a legacy-env-names advisory in its own /health and logs a warning at startup. The full instance's Settings > Status shows that advisory for its own settings, and Settings > Agents shows it on the row of each agent that reads an old name. If an old and a new name are set to different values, startup fails with an error naming both.
  • backfill-hostname is now backfill-server, and backfill-geo-hostnames is now backfill-geo-servers. import-logs and backfill-timings take --server instead of --hostname.
  • Breaking: the API and page URLs say server instead of hostname, so API scripts and bookmarks that use the old names need updating. Filters take serverIn and serverNotIn instead of hostnameIn and hostnameNotIn. Responses carry server and servers instead of hostname and hostnames, and /ws/live frames carry server instead of hostname. /api/v1/geo-locations/site-homes is now /api/v1/geo-locations/server-locations. Page URLs use /access-logs?server=&serverx=, /geo-logs?server= and /map?server=, and an old bookmark opens the page without its filter. The advisory ids hostname-pollution, hostname-count and map-home-undetected are now server-name-pollution, server-count and server-location-undetected.
  • Breaking: database columns named hostname are now server, the site_homes table is server_locations, and the hostname_daily_stats aggregate is server_daily_stats. Queries that read the database directly need the new names. The log event hostname_cagg_columns_unavailable is now server_cagg_columns_unavailable.
  • Upgrade the full instance and every agent together. The first start renames the database columns and tables in place, without rewriting any data. An agent from an older release still starts against the renamed database, then fails every insert.

Fixed

  • DB_DROP_ON_STARTUP=true drops the tables again in a development environment. On TimescaleDB 2.x the drop failed and nothing was dropped.
  • The container no longer reports unhealthy while it is still starting. Docker ignores failed health checks for the first 60 seconds and checks every 2 seconds in that window, so the container turns healthy as soon as it answers. Before, a start that took more than about 10 seconds marked it unhealthy.
  • Tooltips are easier to read in light and dark mode. They use the same background as menus, so the grey descriptions and the changelog notice in the sidebar tooltips have enough contrast.
  • import-logs no longer drops the access-log rows of a whole file when only its first line is in a looser format, such as nginx's common ahead of the full format. It now detects the format from the first 1,000 lines.
  • After import-logs and the backfill commands, analytics include the first and last day of the range they wrote. Before, those partial days stayed missing from the daily views. An import that didn't cover a whole UTC day failed the daily refresh outright, and import-logs still printed "CAGGs refreshed." It now exits with an error when a refresh fails.
  • The log file list in Settings no longer fails with a server error when GeoMetrikks lacks permission to a configured access log's directory. The file shows as not readable.
  • An access log that exists but sits in a directory GeoMetrikks cannot open is no longer reported as "does not exist" at startup. The log names the permission error, and /health gives the reason as unreadable instead of missing. The same applies when the file itself cannot be read. The Ingestion card on the Status page says "not readable" for such a file instead of "missing".

Removed

  • The sidebar no longer has the "Live feed" indicator. It read "Live feed off" on every page except the map and the access-logs live tail, which looked like a fault. Those two pages and the Status page still show whether the live feed is connected.

What's Changed

  • fix(logs): tell unreadable access logs apart from missing ones by @GilbN in #303
  • feat(import): import Nginx Proxy Manager's own access logs by @GilbN in #305
  • feat(import): store each import's --before cutoff by @GilbN in #309
  • fix(import): detect a file's format from a sample of lines by @GilbN in #307
  • fix(timescale): refresh whole days after an import or backfill by @GilbN in #308
  • feat(logsources): read access logs from Grafana Loki by @Shoshuo, @GilbN in #313
  • fix(ui): give tooltips the menu background by @GilbN in #314
  • fix(ui): remove the live feed indicator from the sidebar by @GilbN in #315
  • style(ui): pointer cursor, muted dark accent, red destructive buttons by @GilbN in #316
  • docs: give Loki and Nginx Proxy Manager their own pages, update the landing page by @GilbN in #317
  • feat: import-loki backfills history from Grafana Loki by @GilbN in #318
  • fix(docker): give the healthcheck a 60s start period by @GilbN in #322
  • chore(deps): bump the python-minor-patch group, mako and multidict by @GilbN in #323
  • chore(deps-dev): bump vite-plugin-pwa from 1.3.0 to 2.0.0 by @dependabot[bot] in #312
  • chore(deps): bump oven/bun from 1.4.2-slim to 1.4.3-slim by @dependabot[bot] in #319
  • chore(deps): bump the frontend-minor-patch group across 1 directory with 19 updates by @dependabot[bot] in #321
  • (refactor): call the recording server "Server" everywhere by @GilbN in #324
  • feat(instances): report agent health on the head by @GilbN in #325
  • (feat): light and dark themes on the Appearance page by @GilbN in #326
  • Release v0.21.0 by @GilbN in #327

Full Changelog: v0.20.0...v0.21.0

Don't miss a new geometrikks release

NewReleases is sending notifications on new releases.