Skip to main content
Question

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

  • Mar 11, 2025 3:18 AM UTC
  • 5 replies
  • 95 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
  • Mar 11, 2025 4:07 AM UTC

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


Jon Rust
Forum|alt.badge.img
  • Employee
  • Mar 11, 2025 4:07 AM UTC

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


Jon Rust
Forum|alt.badge.img
  • Employee
  • Mar 11, 2025 4:07 AM UTC

Eval to remove junk fields:


Jon Rust
Forum|alt.badge.img
  • Employee
  • Mar 11, 2025 4:08 AM UTC

then flatten


Jon Rust
Forum|alt.badge.img
  • Employee
  • Mar 11, 2025 4:08 AM UTC

then Rename: