Dashboards & Visualizations

Time in Min to plot on a chart

gravi
Explorer

I have a time field in the format 00:07:34.271009 format.

I want to plot the time on y-axis of a line chart and tried to convert using | eval timeinmin=time/60 but it gives an empty value

How do I convert above mentioned time format to be able to be plotted on a chart?

Tags (1)

oscar84x
Contributor

You can use timechart and specify a span of 1 minute. For example:

<your search>
| timechart count  span=1m
0 Karma

woodcock
Esteemed Legend

Like this:

| makeresults 
| eval time="00:07:34.271009" 
| rex field=time "(?J)(?:(?<tt_hours>\d+):(?<tt_minutes>\d+):)?(?:(?<tt_minutes>\d+):)?(?<tt_seconds>.+)$" 
| fillnull value=0 tt_hours tt_minutes 
| eval _time = tt_seconds + (60 * (tt_minutes + (60 * tt_hours))) + relative_time(now(), "@d")
0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...