Splunk Search

Plot a line chart to compare against 2 time ranges by a specific field

splunker9999
Path Finder

Hello Community,  I am looking to Plot a line chart to compare against 2 time ranges by a specific field.

This is for JIRA metrics.

For example I have 3 fields
Created_time 
2020-10-29T03:49:09.000-0700

resolved_time
2021-01-06T15:26:23.000-0800

Ticket:
ABC123

Show a line chart with 2 legends created_time, resolved_time by ticket. 

This will help me compare against when a ticket opened vs closed.

Labels (2)
Tags (1)
0 Karma

splunker9999
Path Finder

Hello @bowesmana.

Thanks for the response.

I will try this logic and see how this works. My y-axis will be  count of tickets created vs closed everyday

Actually I am not looking for duration, this report is for management where they will see 2 lines showing the count of tickets created vs closed

0 Karma

bowesmana
SplunkTrust
SplunkTrust

@splunker9999 

Is your x-axis meant to be time, if so, what is your y-axis? 

Perhaps you are trying to see duration of ticket, in which case, you could calculate duration by subtracting created from resolved time, e.g.

 

| eval ct=strptime(Created_time, "%FT%T.%Q%z")
| eval rt=strptime(resolved_time, "%FT%T.%Q%z")
| eval duration=(rt-ct)/86400

 

which would give you duration in days and then you could use timechart to plot the y-axis duration over the created or resolved time with

 

| eval _time=ct
| timechart max(duration) by ticket

 

change _time=rt to get the x-axis as closure time.

Note that timechart will give you 10 tickets, unless you use limit=X

Is that what you are after?

  

0 Karma
Get Updates on the Splunk Community!

Splunk Mobile: Your Brand-New Home Screen

Meet Your New Mobile Hub  Hello Splunk Community!  Staying connected to your data—no matter where you are—is ...

Introducing Value Insights (Beta): Understand the Business Impact your organization ...

Real progress on your strategic priorities starts with knowing the business outcomes your teams are delivering ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...