Skip to main content
Question

is it recommended to do a json extract after the GeoIP function?

  • March 11, 2025
  • 5 replies
  • 6 views

Hey Folks, i have a silly Q, I am using GeoIP with maxminddbs and it adds a json array like it should. When it gets into Splunk, the only way to search elements in the array requires an | spath command and cant search like a normal key=value. is it recommended to do a json extract after the GeoIP function? if not, how should I pull those fields?

5 replies

  • Author
  • New Participant
  • March 11, 2025

Ohh Flatten. Didnt even cross my mind on that command. Thanks a bunch!


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

i'd use flatten, and filter out the unwanted entries (other languages etc)


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

Eval to remove junk fields:


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

then flatten


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

then Rename: