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!

September Community Champions: A Shoutout to Our Contributors!

As we close the books on another fantastic month, we want to take a moment to celebrate the people who are the ...

Splunk Decoded: Service Maps vs Service Analyzer Tree View vs Flow Maps

It’s Monday morning, and your phone is buzzing with alert escalations – your customer-facing portal is running ...

What’s New in Splunk Observability – September 2025

What's NewWe are excited to announce the latest enhancements to Splunk Observability, designed to help ITOps ...