logwarden v0.9.0¶
Status: Released 2026-11-22 · tag v0.9.0
Outcome: a team gets its first useful result in under 10 minutes, without changing its code. Today a new team chooses between eight use cases and about ten ways to integrate, and its first run on an existing service is a wall of findings in which the serious ones (secrets in logs) get lost. Teams also hesitate to depend on a v0.x tool with one maintainer. This version cuts the choices to one recommended path per platform, starts with the few rules every service should pass, ranks what to fix first, adds a check of the logs a team already has in Elasticsearch, and writes down what is stable.
logwarden watch, a long-running consumer of the live stream, was planned here first. It was
dropped (2026-11-22): the only team using logwarden runs it in CI only, with no shared state,
and an hourly scheduled job gives the same view with nothing to operate. It is listed under
"Later" in the roadmap.
What's new¶
- Rule profiles.
--profile essential(orprofile = "essential"in the config) checks only what applies to any service as it is: adr_sensitive_data: secrets and personal data in logs,adr_non_json_line: lines that aren't JSON,adr_missing_required: the required resource fields.
standard, every rule as today, stays the default, so nothing changes for existing users.
Under essential the summary says how many more findings standard would report, so the next
step is visible. disable and baselines work with both.
- Ranked fixes. Findings are grouped by what causes them: the source line when the logs
have code.file.path/code.line.number, else the logger and event. The groups are sorted by
the number of lines they affect. The text summary, Markdown and HTML reports start with
"Fix first": the top groups with their share of all violating lines ("the top 3 places
cause 62% of the lines with violations"). --json gets new keys fix_first,
lines_with_violations, profile and outside_profile (existing keys don't change).
- logwarden fetch writes the newest lines of a time window from Elasticsearch
(--es URL --index 'logs-*' --since 1h, at most 10,000, Elasticsearch's default limit;
--query narrows it down) as a _search response for check. Credentials come from
LOGWARDEN_ES_AUTH (ApiKey …, Basic … or user:password), never from the command line.
When more lines matched than were fetched, every report says it's a sample and of what size.
- check --pushgateway URL pushes the per-service metrics to a Prometheus Pushgateway
(PUT, so each push replaces the group).
- Scheduled check of production logs: results without touching the service. A second hidden
job in the GitLab template, .logwarden-production, for a scheduled pipeline (and the same
two commands as a recipe for cron or a Kubernetes CronJob):
- It fetches the last LOGWARDEN_SINCE (default 1h) of LOGWARDEN_ES_INDEX, with
LOGWARDEN_ES_AUTH from a masked CI variable. The fetched logs hold logged values, so they
are kept outside the artifacts and deleted after the check.
- It runs check on the response with the project's [source] and profile, writes the
Markdown and HTML reports and the snapshot as artifacts, and compares with the previous
scheduled run: new and fixed findings since the last run. The previous snapshot is kept
in the job's cache, so pushes between two runs don't lose the comparison.
- With LOGWARDEN_PUSHGATEWAY set, it pushes the metrics, grouped by project.
- It never fails on violations (they are the result, not an error). It fails on a bad
config, an unreachable Elasticsearch or an empty window, so a broken schedule is noticed.
- It uses the image and works without internet access, like the merge-request job.
- GitLab template: readable comparison names. The merge-request job saves the target
branch's snapshot as <branch>-snapshot.json (e.g. main-snapshot.json), so the report
says what it compared with.
- Grafana dashboard integrations/grafana/logwarden.json: the share of lines with
violations per service, violations by rule, and the time of the last push (a stale schedule
shows). The panels use the values of the last push, not rate(), because each push is one
window.
Docs¶
- Four "Start here" pages, one per path, each with copy-paste steps that end in a first
report, starting with the
essentialprofile: - Elasticsearch / Kibana: the scheduled check on logs you already have. No code change.
- GitLab: the template on the logs of your test run.
- GitHub: the Action on the logs of your test run.
- AI agents: the Claude Code plugin, or the
AGENTS.mdsnippet. - README leads with one sentence and the four paths. The eight use cases and the rest of the integration guide move under "Advanced" in the site nav. Nothing is removed.
STABILITY.md: what is a public interface (rule ids,--jsonkeys, exit codes, config keys, metric names, CLI options, image tags), how it changes (only additions; a removal is announced in the release notes, warned about for at least two minor versions and happens only in a major version), which versions get fixes (the latest minor), that published image tags are never overwritten, and the conditions for 1.0: at least two teams using logwarden for a month with no change to the public interface needed.
Fixes and maintenance¶
- Archive paths on Windows. On Python 3.10 and 3.11 the downloaded Weaver and semconv
archives are checked member by member. A name such as
/xorC:/xwasn't seen as absolute on Windows. Every name is now checked with Windows path rules on every OS. The archives were already checked against a pinned SHA-256, so no download could have used this. - Test coverage is measured in CI (job
coverage), including the CLI and MCP server that tests start as subprocesses. Below 85% the job fails. 93% at the time of writing.
Breaking changes¶
None. The default profile is standard, which checks what every earlier version checked.
Verification¶
| # | Claim | How it will be checked | Result |
|---|---|---|---|
| 1 | Profiles | Tests: bad.jsonl under essential reports only the three rules, and the summary's "more under standard" count equals the standard total minus the essential total; profile in the config and --profile give the same result, the option wins; disable and a baseline work under both; an unknown profile exits 2; with no profile the findings and counts are those of v0.8.1 (the goldens change only by the new keys and the "Fix first" section, reviewed) |
|
| 2 | Ranked fixes | Tests: findings from one source line, or one logger and event, form one group; groups are sorted by affected lines, and shares add up to the violating lines; fix_first in --json; "Fix first" at the top of text, Markdown and HTML; no logged value in any of them; existing --json keys unchanged |
|
| 3 | Scheduled check | Tests of fetch against a stand-in Elasticsearch: the query (window, size, time field, query string), the auth header for each LOGWARDEN_ES_AUTH form, and clear errors for 401, 404, unreachable, an empty window, a bad --since or --size; the sample note when more lines matched. The template's production script against a local Elasticsearch 8 holding bad.jsonl as Fluent Bit ships it (log wrapped, metadata), offline: the reports show the findings, the sample size and exit 0; a second run compares with the first (0 new · 0 fixed), and after adding a bad line 1 new; an empty window, a wrong password and a stopped Elasticsearch each fail the job with a clear message; no logged value in any artifact |
|
| 4 | Pushgateway and dashboard | The pushed metrics appear in a local Prometheus through a Pushgateway with the same names and values as check --metrics; a second push replaces the first; the Grafana dashboard imported into Grafana shows the panels with data (screenshot) |
|
| 5 | Ten minutes to a first result | Each "Start here" page followed word for word, from a clean machine or project, by someone who didn't write it (a fresh agent session given only the page): Elasticsearch in a container against the claim 3 Elasticsearch; GitLab in the local GitLab with the offline runner from v0.8.1 (merge request and scheduled pipeline); GitHub on a throwaway repository; AI agents with the plugin. Each ends with a report, and the time from the first step to the report is recorded; every path under 10 minutes, not counting image downloads | |
| 6 | Docs and stability | README leads with the four paths; the site nav shows "Start here" first and "Advanced" after; STABILITY.md lists every public interface, and a test checks that its list of rule ids equals rules.json; strict site build passes |
|
| 7 | Archive paths and coverage | test_unsafe_archive_paths_rejected passes on Linux, macOS and Windows for ../x, /x, C:/x and a/../../x; the CI coverage job passes and reports ≥ 85% |
|
| 8 | CI and release | AGENTS.md, skill, roadmap updated; CI on Linux, macOS and Windows; dry run to TestPyPI; after the tag, uvx logwarden==0.9.0 check --profile essential from PyPI and the image :0.9.0 running the scheduled job against the claim 3 Elasticsearch |
Post-release checks¶
- ✅ Release run published PyPI
logwarden 0.9.0, imageghcr.io/ingeniator/logwarden:0.9.0and the GitHub release. - ✅
uvx logwarden==0.9.0 check bad.jsonl --profile essentialfrom PyPI: 3 violations, "Profile essential: 7 more violations under the standard profile", Fix first, exit 1. - ✅ The image
:0.9.0pulled from GHCR, on the network of the claim 3 Elasticsearch (security on):fetchoflogs-shop-*(5 lines) andcheck --format es --message-field log --profile essential: 4 violations, "8 more under standard".
After the release¶
Not a release blocker, recorded here when known: the GitLab team is asked, before and after upgrading, how long it took to get the first useful result and which findings they ignored.