简体   繁体   English

如何将日志文件转换为 Json 格式?

[英]How to convert log files into Json format?

I have a log files of my server data.我有我的服务器数据的日志文件。 I need to convert that data into json format.我需要将该数据转换为 json 格式。 I need that data in json format to feed it into elastic-search.Help me with some sort of scripts which can convert this log data.我需要 json 格式的数据才能将其输入到 elastic-search 中。请帮助我使用某种可以转换此日志数据的脚本。

Look into lognormalizer .查看lognormalizer You can specify rules to match log lines, and it will generate json for you, that you can further ingest however you want.您可以指定匹配日志行的规则,它会为您生成 json,您可以根据需要进一步摄取。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM