Splunk Search

Can you help me with a query with the timechart command?

mlorrette
Path Finder

same search: timespan showing X results while search is showing Y results for the same timeframe.

This search that is part of a dashboard shows events on a Last 30 Days timeframe:

index=application "login.categories{}"="User Failed Login" | dedup user | timechart count span=1d

It returns 80 events for a particular date.
When I open the visualization in the search, I still see a count of 80 events for that one date.

However, when I zoom in on that day, through View Events or Narrow to This Timeframe, 130 events come up. Expanding the |timechart search for the last 3 months, now shows 50 events on that one specific date! The only thing I'm changing is the timeframe.

What's going on with timechart? Using Splunk 6.5.2.

0 Karma
1 Solution

briancronrath
Contributor

It's because you are deduping. It is expected that if you zoom out further, you'll get less users on that time frame because it will have most likely had duplicates in other timeframes (and they will get tallied only once over the entire timeframe). Similarly if you zoom in you'll get more results in the time frame because the deduping is more focused to a shorter timeframe.

Are you looking to dedup based on specific buckets of time? For instance, are you wanting to dedup in regards to just each day worth of logins? If so, dedup won't be the command you want, you'd be better off doing a

[...] | timechart dc(user) span=1d

View solution in original post

briancronrath
Contributor

It's because you are deduping. It is expected that if you zoom out further, you'll get less users on that time frame because it will have most likely had duplicates in other timeframes (and they will get tallied only once over the entire timeframe). Similarly if you zoom in you'll get more results in the time frame because the deduping is more focused to a shorter timeframe.

Are you looking to dedup based on specific buckets of time? For instance, are you wanting to dedup in regards to just each day worth of logins? If so, dedup won't be the command you want, you'd be better off doing a

[...] | timechart dc(user) span=1d

woodcock
Esteemed Legend

I was getting ready to type the same thing!

0 Karma

mlorrette
Path Finder

This is working perfectly. In a hindsight, it's "obvious" because the | dedup part comes before the timechart piece. Very heplful. Thank you.

0 Karma
Get Updates on the Splunk Community!

New in Observability Cloud - Explicit Bucket Histograms

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

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...