Splunk Search

eval and coalesce return unicode list. How to separate each item into a new row?

zhatsispgx
Path Finder

So when I run the following search, 'event_name' returns a list of all event_name values which match the coalesce(src_ip,host_ip). The output looks to be a python unicode list. i.e. : [u'itemnumber1',u'itemnumber2','itemnumber3'] etc.

sourcetype=suricata OR sourcetype=nessus_scans AND risk!=None | 
eval src_ip = coalesce(src_ip,host_ip) | 
table msg, src_ip, dst_ip, dst_port, event_name, risk

How would i make this so each 'itemnumber(n)' would return a new row, or pretty formatting so that its more readable?

1 Solution

sundareshr
Legend

Try this

 sourcetype=suricata OR sourcetype=nessus_scans AND risk!=None |  eval src_ip = coalesce(src_ip,host_ip) | makemv event_name delim="," | mvexpand event_name | table msg, src_ip, dst_ip, dst_port, event_name, risk

View solution in original post

0 Karma

sundareshr
Legend

Try this

 sourcetype=suricata OR sourcetype=nessus_scans AND risk!=None |  eval src_ip = coalesce(src_ip,host_ip) | makemv event_name delim="," | mvexpand event_name | table msg, src_ip, dst_ip, dst_port, event_name, risk
0 Karma
Get Updates on the Splunk Community!

Observability Unlocked: Kubernetes Monitoring with Splunk Observability Cloud

 Ready to master Kubernetes and cloud monitoring like the pros? Join Splunk’s Growth Engineering team for an ...

Update Your SOAR Apps for Python 3.13: What Community Developers Need to Know

To Community SOAR App Developers - we're reaching out with an important update regarding Python 3.9's ...

October Community Champions: A Shoutout to Our Contributors!

As October comes to a close, we want to take a moment to celebrate the people who make the Splunk Community ...