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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...