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
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...

Design, Compete, Win: Submit Your Best Splunk Dashboards for a .conf26 Pass

Hello Splunkers,  We’re excited to kick off a Splunk Dashboard contest! We know that dashboards are a primary ...

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...