Dashboards & Visualizations

extracting and creating dashboards

mammefen
New Member

how to combine the following fileds and create a statical value of succesfull and failed call of the particular api by client id?

sample splunk log event:

1.INFO 2019-07-16 16:39:34,938 AFTER: IP_address=/xxxxxxxxx API_name=AAAAAAAAA server ip=RRRRRRR trace_ID=d24eea70-a809-11e9-9eb4-005056906aa7 location=en_US {http.reason=Bad Request, http.status=400, Content-Type=application/json;charset=UTF-8}

2.INFO 2019-07-16 16:39:34,809 client_ID: KKKKKK API_name: AAAAAAAA

just i want to create a dashboard that will show the number of successfull and failed using the client_ID?

thanks,

Tags (1)
0 Karma

DavidHourani
Super Champion

Hi @mammefen,

Try something like this :

Index=yourIndex | stats last(status) as status last(clientID) as clientID by API_name

Let me know if that works out for you.

Cheers,
David

0 Karma

mammefen
New Member

hi david,

thank you for your help
it worked in some extent but there are some null values of the client id for the corresponding status. I am thinking to join the events first and then do the stats. so, can you help on joining the two events?

Thanks,

mammefen

0 Karma

DavidHourani
Super Champion

Most welcome ! The search above does a join since it runs stats on a common field for both events.

Its faster than running a join command but if you would rather use that then it should look as follows :

Index=yourIndex event=firstEvent | join clientID [Index=yourIndex event=firstEvent]

You can find more info about the join command here :
https://docs.splunk.com/Documentation/Splunk/7.3.0/SearchReference/Join

0 Karma

mammefen
New Member

hi david,
i appreciate your help. the following is the sample table i got by using your method.
status---client_id
1. 200----kkkk----API_name
2. 400----empty
3. empty------kkk
4. 403--------kkk
5. emptyk---empty
i am getting this kind of table by using your query . i do not want to get the empty related with the value . how can i exclude from the table? btw all the api names are listed correctly.

than you

0 Karma

niketn
Legend

@mammefen what is the correlation between events 1 and 2? How does client_ID in 2nd event correlate to event 1?

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

mammefen
New Member

the API name is the same for event1 AND 2 .

0 Karma

niketn
Legend

But API name will be same for multiple clients as well.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
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!

Index This | What travels the world but is also stuck in place?

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

Discover New Use Cases: Unlock Greater Value from Your Existing Splunk Data

Realizing the full potential of your Splunk investment requires more than just understanding current usage; it ...

Continue Your Journey: Join Session 2 of the Data Management and Federation Bootcamp ...

As data volumes continue to grow and environments become more distributed, managing and optimizing data ...