Splunk Search

How to plot a timechart from summary index?

splbsm
Explorer

Hi, I have a summery index with events like this :-

3/06/2019 00:00:00 +0000, search_name=ABCD , search_now=1551916800.000, info_min_time=1551830400.000, info_max_time=1551916800.000, info_search_time=1551916803.490, SourceType="up2date-too_small", date="2019-03-06", info_max_time="1551916800.000", info_min_time="1551830400.000", info_search_time="1551916803.490", info_sid="scheduler_612483161search_RMD5b9c004924d61345e_at_1551916800_2619_CB367A2F-91DF-4379-90F8-63AC41173EAB", sum(b)=960, ABCD, search_name

Now I want to use the date from this event and plot a timechart by sourcetype. Can anyone help me please?

Tags (2)
1 Solution

nickhills
Ultra Champion

Give this a go:

[your search]|rename SourceType as original_sourcetype| eval _time=strptime(date, "%Y-%m-%d")|timechart count by original_sourcetype

This assumes you want to timechart them by the date from the summary index

Just as an aside - the rename is probably not necessary, but it helps clarify when you comeback to it in 6months and have forgotten what you did.

If my comment helps, please give it a thumbs up!

View solution in original post

nickhills
Ultra Champion

Give this a go:

[your search]|rename SourceType as original_sourcetype| eval _time=strptime(date, "%Y-%m-%d")|timechart count by original_sourcetype

This assumes you want to timechart them by the date from the summary index

Just as an aside - the rename is probably not necessary, but it helps clarify when you comeback to it in 6months and have forgotten what you did.

If my comment helps, please give it a thumbs up!

splbsm
Explorer

Thank you very much.

0 Karma

nickhills
Ultra Champion

Your welcome!
I updated the title of this question to help others who may be searching in the future!

If my comment helps, please give it a thumbs up!
0 Karma
Get Updates on the Splunk Community!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...