Splunk Search

Not getting by day results for a timechart

di2esysadmin
Path Finder

I'm banging my head against the wall. Here's my search:

host="atlassian-stash*" sourcetype=atlassian source="/opt/atlassian/stash-data/log/atlassian-stash-access*.log" | timechart dc(stash_users) span=1d AS "Unique Stash Users"

stash_users is an extracted field. Pretty clear from search results that it's working correctly.

When I run the above, I get 8 results (as though it thinks it's giving me by day results) the only days with values are 2/18 and 2/11. As though it's counting unique stash_users by week.

I have this precise format working with a different extracted field on a different file. Hence the head banging.

Help appreciated.

Karla

Tags (1)
0 Karma
1 Solution

di2esysadmin
Path Finder

That's it! The problem is my field extraction. It was based on a filename. The entries for the others days came from log files with a different named format.

Thanks for the ideas!

View solution in original post

0 Karma

di2esysadmin
Path Finder

That's it! The problem is my field extraction. It was based on a filename. The entries for the others days came from log files with a different named format.

Thanks for the ideas!

0 Karma

di2esysadmin
Path Finder

There has to be a problem with the way I've extracted the field. It's too simple for it to be anything else.

0 Karma

di2esysadmin
Path Finder

No change in behavior. 😞

0 Karma

yannK
Splunk Employee
Splunk Employee

Just for sanity,

change the order of your timechart to avoid having the span between the function and the "AS"
| timechart span=1d dc(stash_users) AS "Unique Stash Users"

linu1988
Champion

what do u get by host="atlassian-stash"

sourcetype=atlassian source="/opt/atlassian/stash-data/log/atlassian-stash-access.log"|bucket _time span=1d| stats dc(stash_users) by _time?

0 Karma

di2esysadmin
Path Finder

Didn't fix it. Here's my query now:

host="atlassian-stash*" sourcetype=atlassian source="/opt/atlassian/stash-data/log/atlassian-stash-access*.log" | timechart span=1d dc(stash_users) AS "Unique Stash Users"

0 Karma

yannK
Splunk Employee
Splunk Employee

good, @di2esysadmin please accept the answer to mark it as resolved.

0 Karma

linu1988
Champion

This is it 😄

0 Karma

linu1988
Champion

What do you get if you just make a |bucket _time span=1d| stats dc(stash_users) by _time instead of timechart?

0 Karma
Get Updates on the Splunk Community!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...