Splunk Search

Why the count of the user per hour varies after executing the same query after a inetrval of time?

srideviv
Engager

Hi All,

Input logs are forwarded from a syslog server. We extracted server name and user id from the logs. Our requirement is to find the count of users logged in a particular server per hour. So we used the below query but the result is varying at every execution. Could you please help with this issue?

| table _time, server, userdetails
| timechart span=1h dc(userdetails) by server

Thanks in advance.

0 Karma

VSIRIS
Path Finder

At every execution you timerange is getting differed, so obviously if you stick to your earliest and latest of time, then your result will be constant. You can add the below in your query and see to yourself

index=abc earliest=-2h@h latest=-1h@h
| table _time, server, userdetails
| timechart span=1h dc(userdetails) by server

0 Karma

to4kawa
Ultra Champion

Maybe your time picker will be Last ....
So at each searching, search range and the count of results are different.

0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...