C
CrowdSec5mo ago
ook

Traefik logs parsing name=child-crowdsecurity/traefik-logs stage=s01-parse

Hello, I see that traefik logs are parsed pretty well, but I see plenty of these errors as well:
__time="2025-03-28T17:29:45Z" level=error msg="UnmarshalJSON : invalid character '.' after top-level value" line="47.242.222.214 - - [28/Mar/2025:17:29:45 +0000] \"HEAD /de/language/bearbeiten?de=%2Fde%2Fmodell-3d%2Fverschiedene%2Fprueba-de-conector-para-tubo-silicona%2Fkommentare&en=%2Fen%2F3d-model%2Fverschiedene%2Fprueba-de-conector-para-tubo-silicona%2Fcomments&es=%2Fes%2Fmodelo-3d%2Fverschiedene%2Fprueba-de-conector-para-tubo-silicona%2Fcomentarios&fr=%2Ffr%2Fmod%25C3%25A8le-3d%2Fversch"
time="2025-03-28T17:29:45Z" level=warning msg="failed to run filter : invalid character '.' after top-level value (1:1)\n | UnmarshalJSON(evt.Parsed.message, evt.Unmarshaled, \"traefik\") in [\"\", nil]\n | ^" id=icy-grass name=child-crowdsecurity/traefik-logs stage=s01-parse
time="2025-03-28T17:29:46Z" level=error msg="UnmarshalJSON : invalid character '.' after top-level value" line="202.41.171.9 - - [28/Mar/2025:17:29:45 +0000] \"GET /en/users/sign-in HTTP/2.0\" 200 68409 \"-\" \"-\" 1450942 \"cults"
time="2025-03-28T17:29:46Z" level=warning msg="failed to run filter : invalid character '.' after top-level value (1:1)\n | UnmarshalJSON(evt.Parsed.message, evt.Unmarshaled, \"traefik\") in [\"\", nil]\n | ^" id=icy-grass name=child-crowdsecurity/traefik-logs stage=s01-parse__
__time="2025-03-28T17:29:45Z" level=error msg="UnmarshalJSON : invalid character '.' after top-level value" line="47.242.222.214 - - [28/Mar/2025:17:29:45 +0000] \"HEAD /de/language/bearbeiten?de=%2Fde%2Fmodell-3d%2Fverschiedene%2Fprueba-de-conector-para-tubo-silicona%2Fkommentare&en=%2Fen%2F3d-model%2Fverschiedene%2Fprueba-de-conector-para-tubo-silicona%2Fcomments&es=%2Fes%2Fmodelo-3d%2Fverschiedene%2Fprueba-de-conector-para-tubo-silicona%2Fcomentarios&fr=%2Ffr%2Fmod%25C3%25A8le-3d%2Fversch"
time="2025-03-28T17:29:45Z" level=warning msg="failed to run filter : invalid character '.' after top-level value (1:1)\n | UnmarshalJSON(evt.Parsed.message, evt.Unmarshaled, \"traefik\") in [\"\", nil]\n | ^" id=icy-grass name=child-crowdsecurity/traefik-logs stage=s01-parse
time="2025-03-28T17:29:46Z" level=error msg="UnmarshalJSON : invalid character '.' after top-level value" line="202.41.171.9 - - [28/Mar/2025:17:29:45 +0000] \"GET /en/users/sign-in HTTP/2.0\" 200 68409 \"-\" \"-\" 1450942 \"cults"
time="2025-03-28T17:29:46Z" level=warning msg="failed to run filter : invalid character '.' after top-level value (1:1)\n | UnmarshalJSON(evt.Parsed.message, evt.Unmarshaled, \"traefik\") in [\"\", nil]\n | ^" id=icy-grass name=child-crowdsecurity/traefik-logs stage=s01-parse__
How could I solve this parsing? Thank you.
3 Replies
CrowdSec
CrowdSec5mo ago
Important Information
Thank you for getting in touch with your support request. To expedite a swift resolution, could you kindly provide the following information? Rest assured, we will respond promptly, and we greatly appreciate your patience. While you wait, please check the links below to see if this issue has been previously addressed. If you have managed to resolve it, please use run the command /resolve or press the green resolve button below.
Log Files
If you possess any log files that you believe could be beneficial, please include them at this time. By default, CrowdSec logs to /var/log/, where you will discover a corresponding log file for each component.
Guide Followed (CrowdSec Official)
If you have diligently followed one of our guides and hit a roadblock, please share the guide with us. This will help us assess if any adjustments are necessary to assist you further.
Screenshots
Please forward any screenshots depicting errors you encounter. Your visuals will provide us with a clear view of the issues you are facing.
© Created By WhyAydan for CrowdSec ❤️
iiamloz
iiamloz5mo ago
Interesting it stating that the CLF is not what we expects, do you have any modifications to hide or show data on the logging options?
ook
ookOP5mo ago
Not sure what you mean. For some reason the agents can't see the traefik container logs, so I write the traefik logs in a hostpath PV that I mount on both traefik and agent, and setup an additional acquisition of type traefik.

Did you find this page helpful?