Dashboards & Visualizations

Json parsing

incoghnito_1
Engager

Hello ,
I realy hope you can help me !! 🙂
I have a json from API request (dynatrace).

I would like to have the value agent version for each host 

How can i do this ? 

My command : 

***index="dynatrace_hp" "agentVersion.major"="*" "agentVersion.major"="*" "agentVersion.minor"="*" esxiHostName="*" | stats values(esxiHostName, ) values(agentVersion.minor)***

 

 

Inkedtempsnip_LI.jpg

 Thx for you Help  !!! 


 

Labels (1)
Tags (1)
0 Karma
1 Solution

Vardhan
Contributor

Hi @incoghnito_1 

Try the below SPL command

index="dynatrace_hp" "agentVersion.major"="*" "agentVersion.major"="*" "agentVersion.minor"="*" esxiHostName="*" | stats  values(agentVersion.minor) by esxiHostName

View solution in original post

incoghnito_1
Engager

thx for your help ! 
I have difficulty having the agents version for each hosts I am looking for the command to do this

0 Karma

Vardhan
Contributor

Hi @incoghnito_1 

Try the below SPL command

index="dynatrace_hp" "agentVersion.major"="*" "agentVersion.major"="*" "agentVersion.minor"="*" esxiHostName="*" | stats  values(agentVersion.minor) by esxiHostName

incoghnito_1
Engager

works thx you very much have a good day ! 

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @incoghnito_1,

good for you, see next time!

Ciao and happy splunking.

Giuseppe

P.S.: Karma Points are appreciated 😉

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @incoghnito_1,

let me understand: have you problems in field extractions or in the stats command?

in other words, if you run the main search (without the stats command), have you the fields to use in the stats command or not?

if not you could use the "spath" command or a regex to exctract the needed fields fields.

Ciao.

Giuseppe

0 Karma
Get Updates on the Splunk Community!

Infographic provides the TL;DR for the 2024 Splunk Career Impact Report

We’ve been buzzing with excitement about the recent validation of Splunk Education! The 2024 Splunk Career ...

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...