I have a situation where log lines are hitting my beats input sent via journalbeat. The input uses the json codec and so expects json.
However, some of the log lines in the client systems journal are plain text. So, i'm thinking to disable the codec on the input and apply the json filter on the message field when the message field from that input is json.
Can you explain to me how I can check that a given message is in fact json before applying the json filter?