Time format with time zone in Home Assistant parser
Maintainers usually reply within 1 day
@andreasbrett is already working on this.
Since Nov 9, 2026.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Start with the Home Assistant parser in the hub and inspect its timestamp pattern alongside the example log line in the issue. Check how the parser handles timestamps with fractional seconds and a timezone offset, then run the relevant parser validation or tests. Done means the supplied log line is parsed successfully with its timestamp and existing supported formats still work.
Written by the indexing model from the issue text.
Description
Describe the bug
The home Assistant parser fails in my case because the log has the time zone in the tilestamp whereas the parser doesn't expect this.
To Reproduce
I don't have any non-default settings regarding log format. Home Assistant runs in a container, crowdsec on the host.
Expected behavior
I clearly want the logs to be parsed.
Screenshots
line: 2026-11-07 18:32:15.251+01:00 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from ... (192.168.200.247). Requested URL: '/auth/login_flow/44165863569aa262be5d51e7f037cd58'. (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/157.0.0.0 Safari/537.36 Edg/157.0.0.0)
├ s00-raw
| ├ 🔴 crowdsecurity/syslog-logs
| └ 🟢 crowdsecurity/non-syslog (+5 ~8)
| └ update evt.ExpectMode : %!s(int=0) -> 1
| └ update evt.Stage : -> s01-parse
| └ update evt.Line.Raw : -> 2026-11-07 18:32:15.251+01:00 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from ... (192.168.200.247). Requested URL: '/auth/login_flow/44165863569aa262be5d51e7f037cd58'. (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/157.0.0.0 Safari/537.36 Edg/157.0.0.0)
| └ update evt.Line.Src : -> /home/.../home-assistant.log
| └ update evt.Line.Time : 0001-01-01 00:00:00 +0000 UTC -> 2026-11-07 17:38:00.991955445 +0000 UTC
| └ create evt.Line.Labels.type : home-assistant
| └ update evt.Line.Process : %!s(bool=false) -> true
| └ update evt.Line.Module : -> file
| └ create evt.Parsed.message : 2026-11-07 18:32:15.251+01:00 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from ... (192.168.200.247). Requested URL: '/auth/login_flow/44165863569aa262be5d51e7f037cd58'. (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/157.0.0.0 Safari/537.36 Edg/157.0.0.0)
| └ create evt.Parsed.program : home-assistant
| └ update evt.Time : 0001-01-01 00:00:00 +0000 UTC -> 2026-11-07 17:38:00.992091047 +0000 UTC
| └ create evt.Meta.datasource_path : /home/.../home-assistant.log
| └ create evt.Meta.datasource_type : file
├ s01-parse
| ├ 🔴 crowdsecurity/appsec-logs
| ├ 🔴 LePresidente/authelia-logs
| ├ 🔴 crowdsecurity/caddy-logs
| ├ 🔴 crowdsecurity/home-assistant-logs
| ├ 🔴 gauth-fr/immich-logs
| ├ 🔴 LePresidente/jellyfin-logs
| ├ 🔴 LearningSpot/open-webui-logs
| ├ 🔴 crowdsecurity/sshd-logs
| └ 🔴 crowdsecurity/sshd-success-logs
└-------- parser failure 🔴
Additional context
With the help of ChatGPT, I fixed the parser with this pattern:
pattern_syntax:
TIMESTAMP: '%{YEAR}-%{MONTHNUM}-%{MONTHDAY} %{HOUR}:%{MINUTE}:%{SECOND}(?:\.%{INT})?(?:%{ISO8601_TIMEZONE})?'
- Dominant language
- Python
- Stars
- 257
- Forks
- 235
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 26
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from crowdsecurity/hub
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
crowdsecurity/hub#2020 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
crowdsecurity/hub#2009 ·
Maintainers usually reply within 1 day
-
The Authelia parser (v0.9) doesn't classify `Unsuccessful 1FA authentication attempt by user ''`Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
crowdsecurity/hub#2001 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
crowdsecurity/hub#1999 ·
Maintainers usually reply within 1 day
-
proxmox-logs parser does not handle ipv4 addresses that are being displayed as ipv6 ideallyPossibly taken @hrithiksaini99 claimed this 15 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
crowdsecurity/hub#1934 ·
Maintainers usually reply within 1 day
All issues in crowdsecurity/hub
Similar issues
-
enhancement
Difficulty 1/5 Under an hour Newbie friendliness 62/100
DaoCloud/DaoCloud-docs#7839 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
sav-oss-org/ptusa_main#1610 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
bug status/accepted type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
microsoft/apm#4925 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
sagemathinc/sagebrush#1701 ·
Maintainers usually reply within 1 day