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
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")