Splunk Search

How to create chart view when you have all columns in same events ?

NirajAlly
New Member

ok, let me try my best to explain my question here.

I have Json format logs and now I need them to compare based on one of the value there. below is sample event.

{ [-]
cpuUtilization: { [-]
guest: 0

idle: 100

irq: 0

nice: 0

steal: 0

system: 0

total: 0

user: 0

wait: 0

}

diskIO: [ [+]
]

engine: MYSQL

fileSys: [ [+]
]

instanceID: MyDB1

So I have same events coming from MyDB2, MyDB3.. etc. Now I want to get a below view.

    My DB1  My DB2  My DB3
 idle:  100 100 100
 irq:   0   0   0
 nice:  0   0   0
 steal: 0   0   0
 system:    0   0   0
 total: 0   0   0
 user:  0   0   0
 wait:  0   0   0

I am very poor dealing with Multi value command if that is what I need to use here. Need your help.

Tags (3)
0 Karma

woodcock
Esteemed Legend

You have not given us much detail but probably something like this:

index=<You Should Always Specify An Index> AND sourcetype=<And sourcetype Too>
| stats avg(*) AS * BY host
| untable host metric value
| xyseries metric host value
0 Karma

vishaltaneja070
Motivator

Hello @NirajAlly

If for every instance you are getting different events then it will be pretty east easy
as for every field which is visible on the json above will have one field available in interesting field

Just click on All fields and try to search idle,you will see the field exists and use that to run the chart command.

0 Karma

NirajAlly
New Member

Provided one in my question is the Json format event which I have on my splunk.

0 Karma

niketn
Legend

@NirajAlly community will be able to assist you better if you can share the raw JSON with valid JSON formatting (please mock anonymize any sensitive information before posting on Splunk Answers). Else provide the current fields that are currently available, with your current output, so that we can convert the same to the desired result.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...