Splunk Search

Timechart, 2nd field value on the chart

dfofie
New Member

I have a timechart,

But I've liked to display another field value directly on one chart line. (see the picture)
alt text

This is the query I'm using:

index="testing_cc_ps" sourcetype="prc_l4_rqmt_progress"
| eval newTime=strptime(date, "%Y-%m-%d")
| eval _time=newTime
| table _time, type, value
| timechart span=1d values(value) by type usenull=false useother=f

The is a third field called Milestone, is it any possibility to write a query that can also plot those milestone on the chart ?
Best regards.

0 Karma
1 Solution

kmaron
Motivator

try the appendcols command: https://docs.splunk.com/Documentation/Splunk/7.2.0/SearchReference/Appendcols

index="testing_cc_ps" sourcetype="prc_l4_rqmt_progress" 
| eval newTime=strptime(date, "%Y-%m-%d") 
| eval _time=newTime 
| table _time, type, value 
| timechart span=1d values(value) by type usenull=false useother=f
| appendcols [search (base search stuff) | timechart for milestones]

View solution in original post

0 Karma

kmaron
Motivator

try the appendcols command: https://docs.splunk.com/Documentation/Splunk/7.2.0/SearchReference/Appendcols

index="testing_cc_ps" sourcetype="prc_l4_rqmt_progress" 
| eval newTime=strptime(date, "%Y-%m-%d") 
| eval _time=newTime 
| table _time, type, value 
| timechart span=1d values(value) by type usenull=false useother=f
| appendcols [search (base search stuff) | timechart for milestones]
0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...