You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
Problem
I'm setting up a syslog source transformed to a structured format that I want to push to a clickhouse sink. I set the schema on clickhouse to all strings which doesn't seem like it helps as it's an error thrown at parsing. I think the Meta object is causing the issue. If I take the JSON out from the emit_syslog call and do a manual call to Clickhouse it throws a Code: 26. DB::ParsingException: Cannot parse JSON string: expected opening quote: (while reading the value of key meta): While executing ParallelParsingBlockInputFormat: (at row 1) . (CANNOT_PARSE_QUOTED_STRING) (version 23.9.2.47608 (official build)) Removing the Meta property from the JSON and it passes with a 200 instead of a 400 over HTTP. I tried to pull a copy of the message direct from vector through a proxy (Fiddler) but couldn't get that to work for some reason.
This Clickhouse issue may help you. It sounds like meta has a string type in your Clickhouse table but you are trying to insert a map.
You can either (1) update your Clickhouse table to have the correct types or (2) transform the events in Vector to convert the meta field to a string. For the latter, you could use the encode_json VRL function in a remap transform.
A note for the community
Problem
I'm setting up a syslog source transformed to a structured format that I want to push to a clickhouse sink. I set the schema on clickhouse to all strings which doesn't seem like it helps as it's an error thrown at parsing. I think the Meta object is causing the issue. If I take the JSON out from the
emit_syslog
call and do a manual call to Clickhouse it throws aCode: 26. DB::ParsingException: Cannot parse JSON string: expected opening quote: (while reading the value of key meta): While executing ParallelParsingBlockInputFormat: (at row 1) . (CANNOT_PARSE_QUOTED_STRING) (version 23.9.2.47608 (official build))
Removing the Meta property from the JSON and it passes with a 200 instead of a 400 over HTTP. I tried to pull a copy of the message direct from vector through a proxy (Fiddler) but couldn't get that to work for some reason.Configuration
Version
vector 0.34.1 (x86_64-pc-windows-msvc 86f1c22 2023-11-16 14:59:10.486846964)
Debug Output
Example Data
{"appname":"xxxxxx","facility":"local0","host":"LAPTOP-XXXXXXXXXX","hostname":"LAPTOP-XXXXXXXXXX","message":"Request finished HTTP/2 POST https://localhost:5501/mini-profiler/results application/json 832 - 200 14253 application/json 0.2664ms","meta":{"ConnectionId":"0HN02B3V95686","ContentLength":"14253","ContentType":"application/json","ElapsedMilliseconds":"0.2664","EventId":"{ Id: 2 }","Host":"localhost:5501","HostingRequestFinishedLog":"Request finished HTTP/2 POST https://localhost:5501/mini-profiler/results application/json 832 - 200 14253 application/json 0.2664ms","Method":"POST","Path":"/mini-profiler/results","PathBase":"","Protocol":"HTTP/2","QueryString":"","RequestId":"0HN02B3V95686:00000211","RequestPath":"/mini-profiler/results","Scheme":"https","SourceContext":"Microsoft.AspNetCore.Hosting.Diagnostics","StatusCode":"200"},"msgid":"Microsoft.AspNetCore.Hosting.Dia","procid":67884,"severity":"info","source_ip":"127.0.0.1","source_type":"syslog","timestamp":"2023-12-21T19:14:53.706270Z","version":1}
Additional Context
No response
References
No response
The text was updated successfully, but these errors were encountered: