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!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk on November 6 at 11AM PT, and empower your SOC to reach new heights! Duration: ...

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...