Splunk Search

After integrating Splunk with JIRA, How can I see the list/count of defects created in last 7 days?

cadrija
Path Finder

I have integrated Splunk with JIRA. I want to see the list/count of defects created in last 7 days. I'm picking the created field from JIRA but still, the list is showing both created and updated list/count together. Please help me solve this issue.
My query :-

eventtype=jira  (issuetype="Bug" OR issuetype="Defect")
| spath fields.created
| dedup key sortby - fields.created
| stats count
0 Karma

umar2
New Member

I've done something similar and haven't experienced that issue but try running the count on the actual field as below and add the where clause if you're not using the time range picker on the Search UI.

eventtype=jira  (issuetype="Bug" OR issuetype="Defect") AND fields.created=*
 | spath fields.created
 | dedup key 
 | stats count(fields.created)
 | where fields.created>=relative_time(now(),"-7d@d") 

If fields.created is not in EPOCH then you can use something similar to the line below - you'd put this line in after the dedup.

|strptime(fields.created, "%Y-%m-%dT%H:%M:%S")
0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...