Splunk Search

How do i get top services and put it in chart??

RashmiGowda
Explorer

Hello,

I need to get the top 25 services from the requesting system and have to put it in a chart with the SUCCESS and FAILURE of transactions. So m using query like this. Can any one suggest how to use "TOP" Command with chart to get the top 25 services.

Query:

index="abc" requestingSystem="RS" | top limit=25 lookup_service_operation_name | transaction messageIdentifier maxspan=1m | search eventcount="2"| chart count as Transactions, count(eval(responseMessageField like"Success%" OR responseMessageField like"SUCCESS%")) as Success, count(eval(responseMessageField!="Success" AND responseMessageField!="SUCCESS")) as Failures by lookup_service_operation_name.

But this query is not helping to get the top 25 services and also count of the transactions for services also not correct.
Can any one plz help me out in this..?

Thanks in advance.

Tags (2)
0 Karma

martin_mueller
SplunkTrust
SplunkTrust

Without knowing your data this is just a guess...

index=abc requestingSystem=RS (start OR success OR failure)
| transaction messageIdentifier maxspan=1m startswith="start" endswith="success OR failure"
| eval success = if(match(responseMessageField, "(?i)success"), 1, 0)
| chart count as Transactions, sum(success) as Success by lookup_service_operation_name
| eval Failures = Transactions - Success
| sort - Transactions | head 25
0 Karma

RashmiGowda
Explorer

martin_mueller - thank you,

The data is in the xml format. it will contain the start time, end time and other user data with success and failure.

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...