-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
json configuration not recognized anymore #330
Comments
It's actually not a module fault but a filebeat upgrade fault I suppose, the newer version of filebeat supports only ndjson parsers. I checking my options with this module since supporting parsers would mean some rewrites of the input template. BTW. did you manage using this parsers.0.ndjson trick with puppet module or outside of the module? I don't think the current version support injecting these parsers.0.ndjson trick. |
The current version of the module does not support anything else than json as it is hardcoded. I changed manually to parsers.0.ndjson to make it work. |
Actually I've end up with wrapper:
But I think the problem is that when you want to support many filebeat versions you just can't cover it with a fancy template. I think using to_yaml with config validation is the only option. I can also think that the ruby function which would use JSON schema for validation would be helpful here, similarly as in helm and JSON schema validation: https://www.arthurkoziel.com/validate-helm-chart-values-with-json-schemas/ |
Well, this sounds like a solution indeed, but makes the usage of such input more complex though. |
The idea is great but every time Elastic changes something in configuration format you have to wait for the module author to release a new version. |
Hello,
I updated from 4.11 to 4.14 with the following input definition:
and the corresponding line example from /var/log/syslog.json
{"@timestamp":"2023-07-17T21:02:55.407481+00:00","@version":"1","message":"Applied catalog in 24.84 seconds","host":"code-acceptance-db-1","severity":"notice","facility":"daemon","programname":"puppet-agent","procid":"9130"}
My issue being the programname no longer recognized as input field after the update.
After checking /etc/filebeat/conf.d/syslog.yml and the corresponding documentation I changed the current json into parsers.0.ndjson and I got the field back.
Is there another way to have the same behaviour than previously with the 4.14 version ?
Thank you !
Best regards,
OV
The text was updated successfully, but these errors were encountered: