Splunk Search

combine two line report in single chart

rameshlpatel
Communicator

Hi,

I want to merge two line chart report from two different sourcetype in single chart.

e.g. index="OCSMONITOR" source=*process* | timechart span=1m count(_raw) | [merge] |
index="OCSMONITOR" source=*new* | timechart span=1m count(_raw)

please suggest me how should i do this ?

Tags (2)
0 Karma

lguinn2
Legend

Try this

 index="OCSMONITOR" source=*process* OR source=*new* | timechart span=1m count by source

or this

index="OCSMONITOR" source=*process* OR source=*new* 
| eval type=if(match(source,"process"),"process","new")
| timechart span=1m count by type

somesoni2
Revered Legend

Try this

 index="OCSMONITOR" source=process OR source=new | timechart span=1m count(eval(source="process")) as CountProcess count(eval(source="new")) as CountProcess 
Get Updates on the Splunk Community!

.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 ...

Introducing the 2024 SplunkTrust!

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