Quantcast
Channel: Questions in topic: "splunk-enterprise"
Viewing all articles
Browse latest Browse all 47296

Splunk query to find the timestamp of each (Login, Logout, Expire) keyword from _raw and log file last updated time

$
0
0
Hi Guys, Can anyone please help me in below query. I want the name of all log files with details of keywords from each sourcetype. If there is keyword present in the specific log file then the last time when that keyword was there in the log file. Log_Name | Updatedago | Login | Logout | Expire Server.log | Last Login event at "TimeFrame"| Last LogOut event at "TimeFrame"| Last Expire event at "TimeFrame" Server1.log | Last Login event at "TimeFrame"| Last LogOut event at "TimeFrame"| Last Expire event at "TimeFrame" The Login , Logout, Expire are the keywords available in _raw field. The timestamp field specifies the logs are updated how many minutes/hours ago(last updated time of log file) I am using below query but no results and not sure how to get last updated thing. index=serverlogs source=server*.log | eval status=if(_raw LIKE "*Login*" ,Login, _raw LIKE "*LogOut*","Logout", _raw LIKE "*Expire*","Expire",0 )

Viewing all articles
Browse latest Browse all 47296

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>