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
Get Updates on the Splunk Community!

Application management with Targeted Application Install for Victoria Experience

  Experience a new era of flexibility in managing your Splunk Cloud Platform apps! With Targeted Application ...

Index This | What goes up and never comes down?

January 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Splunkers, Pack Your Bags: Why Cisco Live EMEA is Your Next Big Destination

The Power of Two: Splunk + Cisco at "Ludicrous Scale"   You know Splunk. You know Cisco. But have you seen ...