Splunk Search

JSON formatting

ThyAbode
Loves-to-Learn

I have the below JSON feed that I can see from a straight search. I'm trying to get some stats especially for pools-availabilityState by name and pools-status.statusReason by name. Tried spath but it didnt not help. How I do this. TIA

 

{ [-]
clientSslProfiles: { [+]
}
deviceGroups: { [+]
}
httpProfiles: { [+]
}
iRules: { [+]
}
ltmPolicies: { [+]
}
networkTunnels: { [+]
}
pools: { [-]
/Common/Ex-pool: { [-]
activeMemberCnt: 0
availabilityState: offline
curPriogrp: 0
enabledState: enabled
highestPriogrp: 0
lowestPriogrp: 0
members: { [+]
}
mr.msgIn: 0
mr.msgOut: 0
mr.reqIn: 0
mr.reqOut: 0
mr.respIn: 0
mr.respOut: 0
name: /Common/Ex-pool
serverside.bitsIn: 0
serverside.bitsOut: 0
serverside.curConns: 0
serverside.maxConns: 0
serverside.pktsIn: 0
serverside.pktsOut: 0
serverside.totConns: 0
status.statusReason: The children pool member(s) are down
tenant: Common
totRequests: 0
}
/Common/F2F3: { [-]
activeMemberCnt: 1
availabilityState: available
curPriogrp: 0
enabledState: enabled
highestPriogrp: 0
lowestPriogrp: 0
members: { [+]
}
mr.msgIn: 0
mr.msgOut: 0
mr.reqIn: 0
mr.reqOut: 0
mr.respIn: 0
mr.respOut: 0
name: /Common/F2F3
serverside.bitsIn: 0
serverside.bitsOut: 0
serverside.curConns: 0
serverside.maxConns: 0
serverside.pktsIn: 0
serverside.pktsOut: 0
serverside.totConns: 0
status.statusReason: The pool is available
tenant: Common
totRequests: 0
}
/Common/2F2F: { [-]
activeMemberCnt: 1
availabilityState: available
curPriogrp: 0
description:
enabledState: enabled
highestPriogrp: 0
lowestPriogrp: 0
members: { [+]
}
mr.msgIn: 0
mr.msgOut: 0
mr.reqIn: 0
mr.reqOut: 0
mr.respIn: 0
mr.respOut: 0
name: /Common/2F2F
serverside.bitsIn: 0
serverside.bitsOut: 0
serverside.curConns: 0
serverside.maxConns: 0
serverside.pktsIn: 0
serverside.pktsOut: 0
serverside.totConns: 0
status.statusReason: The pool is available
tenant: Common
totRequests: 0
}
}
serverSslProfiles: { [+]
}
sslCerts: { [+]
}
system: { [+]
}
telemetryEventCategory: systemInfo
telemetryServiceInfo: { [+]
}
virtualServers: { [+]
}
}

Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

In what way did spath not help? Did you specify the paths you wanted or did you just get everything in the JSON? Can you share what you have tried and say why it didn't give you what you wanted?

0 Karma

ThyAbode
Loves-to-Learn

The spath is giving me everything and I do not know how we can specify certain key-value pair for a table view for stats.

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| spath pools.enabledState output=enabledState

This should work for enabledState. The issue might be if your key has a dot in it. Although you could extract pools first, then run spath on that

| spath pools output=pools
| spath input=pools
0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Tiling

This puzzle (first published here) is based on finding groups of tessellated tiles (inspired by floor tiles I ...

SOK it to Me: Top 3 Benefits of Using Splunk Operator on Kubernetes that’ll Make ...

    Thursday, July 9, 2026  |  11:00AM–12:00PM PDT Duration: 1 hour (includes Q&A) Managing can feel like a ...

Upgrade Prep for 10.4, Network Observability Deep Dives, and More from Splunk Lantern

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...