Alerting

How to find when index was last updated

sivakumar28
Loves-to-Learn

Hi All,

 

I have this query that runs 

| tstats latest(_time) as LatestEvent where index=* by index, host
| eval LatestLog=strftime(LatestEvent,"%a %m/%d/%Y %H:%M:%S")
| eval duration = now() - LatestEvent
| eval timediff = tostring(duration, "duration")
| lookup HostTreshold host
| where duration > threshold
| rename host as "src_host", index as "idx"
| fields - LatestEvent
| search NOT (index="cim_modactions" OR index="risk" OR index="audit_summary" OR index="threat_activity" OR index="endpoint_summary" OR index="summary" OR index="main" OR index="notable" OR index="notable_summary" OR index="mandiant")

 

The result is below

sivakumar28_0-1699609144424.png

 

Now how do i add  index = waf_imperva . Thanks

 

Regards,

Roger

Labels (1)
0 Karma

sivakumar28
Loves-to-Learn

The query should have the result of index = waf_imperva. However, the result is not there. How to I ensure to include waf_imperva in the query or how do I troubleshoot why not there? 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Start with this and look to see when you last got events for that index and which host or host is was.

| tstats latest(_time) as LatestEvent where index=waf_imperva by host

Then back track from there to figure out why you don't have any events

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

It is not clear what your expected result would look like - please can you explain further

0 Karma

sivakumar28
Loves-to-Learn

Do i need to include the IP address?

 

 

 

 

 

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Which ip address?

Did you find out if you have any events in that index?

What timeframe did you search over?

0 Karma

sivakumar28
Loves-to-Learn

 Hi ITWhisperer

| tstats latest(_time) as LatestEvent where index=waf_imperva by host

15 min time frame

Host                      Count
10.30.168.10 1699663326

 

Why query below is not providing this result? My humble request for a struggling engineer, May I have your whatsup?

| tstats latest(_time) as LatestEvent where index=* by index, host
| eval LatestLog=strftime(LatestEvent,"%a %m/%d/%Y %H:%M:%S")
| eval duration = now() - LatestEvent
| eval timediff = tostring(duration, "duration")
| lookup HostTreshold host
| where duration > threshold
| rename host as "src_host", index as "idx"
| fields - LatestEvent
| search NOT (index="cim_modactions" OR index="risk" OR index="audit_summary" OR index="threat_activity" OR index="endpoint_summary" OR index="summary" OR index="main" OR index="notable" OR index="notable_summary" OR index="mandiant")
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

It looks like your host ip may not be in your lookup - please add the relevant information to the lookup.

0 Karma

sivakumar28
Loves-to-Learn

Hi @ITWhisperer ,

 

How do i do that? Any steps pls. Thanks.

 

 

Regards,

Siva Kumar

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Edit your lookup file and reload it, or use outputlookup to overwrite/update it.

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 ...