I would like to make a json from some log attributes. Is this possible?
Hello @lucassilveira ,
can you mention sample log line to give you the proper transformation method?
In addition to what @krzysztof_hoja mentioned, you can use Key-Value Pairs (KVPs) as outlined in the documentation: Key-Value Pairs.
In a log processing rule, you can use the KVP operator to transform the necessary key-value pairs into JSON.
For example:
PARSE(content,“‘[’ JSONTIMESTAMP:timestamp ‘] ’ KVP{’['[^[:]*:key ': ’ DATA:value '] '}:kvp ‘[[’ DATA:message ‘]]’”)
|FIELDS_ADD(loglevel:kvp[LOGLEVEL])
Perfect, thank you!
Nice. I didn’t know this feature.

