Splunk Search

How to count all the count results on multiple searches and display it in a line graph if it has to be shown hourly?

sgarine8925
Engager

For the following search

sourcetype=abc_access OR sourcetype=xyz_soa_access host="*12546abc*p*" source="*access_log*" "ABCProcess" | stats count | RENAME count as ABCOrders| appendcols [search
source="*access*log*" ReceiptService host="ghjsms" | stats count | RENAME count as ReceiptService] | appendcols [search
sourcetype=abc_access OR sourcetype=xyz_soa_access host="*12546abc*p*" source="*access_log*" "ProcessOrders" | stats count | RENAME count as ProcessOrders]

I would like to know
1. How to count all the count results on multiple searches? 2. How to present it in a line graph if it has to be shown on hourly?

Tags (3)
0 Karma
1 Solution

sundareshr
Legend

Here's one way. You may not need multiple searches. You should be able to combine all three into one like this.. Give it a try

sourcetype=abc_access OR sourcetype=xyz_soa_access host="*12546abc*p*" OR host="ghjsms" OR host="*12546abc*p*" source="*access_log*" "ABCProcess"  OR ReceiptService  OR "ProcessOrders" | rex "(?<category>ABCProcess|ReceiptService|ProcessOrders") | timechart span=1h count by category

View solution in original post

sundareshr
Legend

Here's one way. You may not need multiple searches. You should be able to combine all three into one like this.. Give it a try

sourcetype=abc_access OR sourcetype=xyz_soa_access host="*12546abc*p*" OR host="ghjsms" OR host="*12546abc*p*" source="*access_log*" "ABCProcess"  OR ReceiptService  OR "ProcessOrders" | rex "(?<category>ABCProcess|ReceiptService|ProcessOrders") | timechart span=1h count by category
Get Updates on the Splunk Community!

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

🔐 Trust at Every Hop: How mTLS in Splunk Enterprise 10.0 Makes Security Simpler

From Idea to Implementation: Why Splunk Built mTLS into Splunk Enterprise 10.0  mTLS wasn’t just a checkbox ...