All Apps and Add-ons

Splunk for Asset Discovery: How to fix search syntax for port signatures panel?

peter_royle
Engager

the port signatures panel of the port overview dashboard is not working
The search string is:

eventtype=port_scan "Linux 2.6.32 - 3.10" | stats dc(dest_ip) as count by port_signature | where match(port_signature, replace(replace(""Linux 2.6.32 - 3.10"", "\s*OR\s*", "|"), "*", ".*")) | sort - count

The error is:

Error in 'where' command: The expression is malformed. Expected LIKE.

I get the problem just can't work out where to put the LIKE

Anyone?

Kind Regards
Peter

1 Solution

pmdba
Builder

The problem is in your second "replace()" call. The "Linux 2.6.32 - 3.10" term should only be contained in a single set of double-quotes, not two sets.

What you have:

eventtype=port_scan "Linux 2.6.32 - 3.10" | stats dc(dest_ip) as count by port_signature | where match(port_signature, 
replace(replace(""Linux 2.6.32 - 3.10"", "\s*OR\s*", "|"), "\*", ".*")) | sort - count

What it should be:

eventtype=port_scan "Linux 2.6.32 - 3.10" | stats dc(dest_ip) as count by port_signature | where match(port_signature, 
replace(replace("Linux 2.6.32 - 3.10", "\s*OR\s*", "|"), "\*", ".*")) | sort - count

View solution in original post

pmdba
Builder

The problem is in your second "replace()" call. The "Linux 2.6.32 - 3.10" term should only be contained in a single set of double-quotes, not two sets.

What you have:

eventtype=port_scan "Linux 2.6.32 - 3.10" | stats dc(dest_ip) as count by port_signature | where match(port_signature, 
replace(replace(""Linux 2.6.32 - 3.10"", "\s*OR\s*", "|"), "\*", ".*")) | sort - count

What it should be:

eventtype=port_scan "Linux 2.6.32 - 3.10" | stats dc(dest_ip) as count by port_signature | where match(port_signature, 
replace(replace("Linux 2.6.32 - 3.10", "\s*OR\s*", "|"), "\*", ".*")) | sort - count

peter_royle
Engager

Thanks that works

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