Skip to main content
Question

Passing the message field in JSON to Splunk

  • March 11, 2025
  • 15 replies
  • 13 views

I'm having trouble getting the JSON under the "message" field recognized in splunk. Is there something simple I'm missing on the Cribl side of things to break this json out of message, or only keep the JSON in the message as the event?

15 replies

Jon Rust
Forum|alt.badge.img
  • Employee
  • March 11, 2025

is _raw shown as `a` or `{}`?


  • Author
  • Employee
  • March 11, 2025

α


Jon Rust
Forum|alt.badge.img
  • Employee
  • March 11, 2025

Try this:Parser function-> source _raw-> destination _raw-> JSON-> extract


Jon Rust
Forum|alt.badge.img
  • Employee
  • March 11, 2025

now _raw should be `{}`if yes, is message also `{}`, or still `a`?


Jon Rust
Forum|alt.badge.img
  • Employee
  • March 11, 2025

add another parser-> source _raw.message-> destination _raw,message-> JSON-> extract


  • Author
  • Employee
  • March 11, 2025

_raw is now `{}`message is still `a`


Jon Rust
Forum|alt.badge.img
  • Employee
  • March 11, 2025

my bet is that the message field was escaped (double escaped?) JSON


Jon Rust
Forum|alt.badge.img
  • Employee
  • March 11, 2025

with the 2nd parser, is it showing as `{}`?


  • Author
  • Employee
  • March 11, 2025

yes it is


Jon Rust
Forum|alt.badge.img
  • Employee
  • March 11, 2025

noice


Jon Rust
Forum|alt.badge.img
  • Employee
  • March 11, 2025

should be good to send to splunk now


Jon Rust
Forum|alt.badge.img
  • Employee
  • March 11, 2025

(to be safe, i'd probably add a final function, Serialize, to turn _raw (all of it) back into a string):


Jon Rust
Forum|alt.badge.img
  • Employee
  • March 11, 2025

this time though, it will only be 1 level of stringification, so splunk will handle it


  • Author
  • Employee
  • March 11, 2025

it took a minute but looks great in Splunk now


  • Author
  • Employee
  • March 11, 2025

Thanks for the help!