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

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

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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...