Splunk Search

How do show two recent scan result.

ryansecurtec
New Member

alt text
How do i filter table , just show last 2 days .
And compare Fixed Event by host.
Thanks for your help.

Tags (1)
0 Karma

somesoni2
Revered Legend

Give this a try

index=nessus severity!=informational severity!=low host-ip=10.1.1.249
| fields host_start plugin_name host-ip severity | bucket span=1d _time
| eval lastseen=strftime(_time, "%b %d %Y")
| streamstats current=f window=1 global=f last(plugin_name) as plugin_name_count by host-ip,lastseen
| where plugin_name!=plugin_name_count
| sort 0 host_ip plugin_name_count -_time
| dedup 2 host_ip plugin_name_count
| chart useother=true values(host-ip) by plugin_name_count,lastseen
0 Karma

somesoni2
Revered Legend

What's your search that generating that table? We can provide better solutions based on your current search. Without that, I would say something like this would work (this is doing additional steps which may be possible to do in so much less steps if we know your current search)

your current search giving the field plugin_name_count and one col for each date
| untable plugin_name_count  date ip
| eval date=strptime(date,"%b %d %Y") 
| sort plugin_name_count -date
| dedup 2 plugin_name_count 
| eval date=strftime(date,"%b %d %Y") 
| xyseries plugin_name_count date ip
0 Karma

ryansecurtec
New Member

Hi ~ Thanks for your reply
The table is like this....
index=nessus severity!=informational severity!=low host-ip=10.1.1.249
| fields host_start plugin_name host-ip severity
| bin _time span=1d
| eval n=relative_time(now(), "+26d@d")
| eval lastseen=strftime(_time, "%b %d %Y")
| streamstats current=f window=1 global=f last(plugin_name) as plugin_name_count by host-ip,lastseen
| where plugin_name!=plugin_name_count
| chart useother=true values(host-ip) by plugin_name_count,lastseen
| sort -"_time"

0 Karma
Get Updates on the Splunk Community!

Celebrating Fast Lane: 2025 Authorized Learning Partner of the Year

At .conf25, Splunk proudly recognized Fast Lane as the 2025 Authorized Learning Partner of the Year. This ...

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...