Splunk Search

Crossing multivalued fields

Caio_Santos
Path Finder

Got the following: One field with 4 types of values/functions and another field that is the status of those functions such as INFO or ERROR.

I would like to cross this information to see each function how many ERROS or INFOs those got. I was wondering if I could do this task with stats, but the search command bellow is so far what i could get.

index="websphere_index" sourcetype="portoprint-app-*"
| rex "(?m)^\[.*\]\[.*\]\s+?(?<WEB_STATUS>([A-Z]+))\s+?[\w\.]+\s+?\[.*\]\s+?\w+\(\)"
| rex "(?m)^\[.*\]\[.*\]\s[A-Z]+(\s+?|\S+?).*\1\[.*\]\s(?<WEBSPHERE_FUNCTION>(\w+\(\)))"
| stats count(WEB_STATUS) by WEBSPHERE_FUNCTION

Thanks!

Tags (2)
0 Karma
1 Solution

Stephen_Sorkin
Splunk Employee
Splunk Employee

Instead of stats, try chart, like:

... | chart count by WEBSPHERE_FUNCTION WEB_STATUS

Or you could do:

... | stats count by WEBSPHERE_FUNCTION WEB_STATUS

View solution in original post

Stephen_Sorkin
Splunk Employee
Splunk Employee

Instead of stats, try chart, like:

... | chart count by WEBSPHERE_FUNCTION WEB_STATUS

Or you could do:

... | stats count by WEBSPHERE_FUNCTION WEB_STATUS

Caio_Santos
Path Finder

Exactly what I wanted ! Thank you

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...