Splunk Search

How to create a time chart with data from 3 sourcetypes?

raindrop18
Communicator

I want to combine my search results to one time chart. I have tried this but did give me result only from the first source.

index="login" sourcetype="success" | timechart count | appendcols [search index="login" sourcetype="Failed" | timechart count] appendcols [search index="login" sourcetype="no-account" | timechart count]

Tags (2)
1 Solution

srioux
Communicator

Try using:

index="login" sourcetype="success" OR sourcetype="Failed" OR sourcetype="no-account" | timechart count by sourcetype

This'll create your initial search with all results, but your timechart will be a count split by sourcetype values.

View solution in original post

srioux
Communicator

Try using:

index="login" sourcetype="success" OR sourcetype="Failed" OR sourcetype="no-account" | timechart count by sourcetype

This'll create your initial search with all results, but your timechart will be a count split by sourcetype values.

raindrop18
Communicator

thanks you both, works as expected.

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

Or, for a massive performance boost, try this under Splunk 6+:

| tstats count where index="login" AND (sourcetype="success" OR sourcetype="Failed" OR sourcetype="no-account") by sourcetype _time span=auto | timechart count by sourcetype
Get Updates on the Splunk Community!

CX Day is Coming!

Customer Experience (CX) Day is on October 7th!! We're so excited to bring back another day full of wonderful ...

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...