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!

Upcoming Webinar: Unmasking Insider Threats with Slunk Enterprise Security’s UEBA

Join us on Wed, Dec 10. at 10AM PST / 1PM EST for a live webinar and demo with Splunk experts! Discover how ...

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...