Splunk Search

where on 3 fields at once

gnovak
Builder

I have been stumped on this all afternoon and I finally decided to ask this question here. Today I just can't figure this out. It seems easy enough, but I'm having a problem making it happen!

sourcetype=addstorm earliest=-2d@d latest=-0d@d | rex field=_raw "(?P<date>[^;]+);(?P<Registrar>[^;]+);(?P<domains>\d*);(?P<hosts>\d*);(?P<contacts>\d*)" | table Registrar domains hosts contacts | dedup Registrar | where domains>700

The above search looks at the field "domains" and shows me ones where domains>700. However I want the search to also look at the fields hosts and contacts as well.

So I want something like | where domains OR hosts OR contacts > 700

I just can't get it to happen. Any ideas? I tried some eval commands, even using the "if" statements but i can't seem to get it right.

Tags (1)
0 Karma
1 Solution

dwaddle
SplunkTrust
SplunkTrust

I agree with Kristian - more information would be valuable. However, to answer the simplest iteration of your question, this may be more appropriate:

| search domains >700 OR hosts > 700 OR contacts > 700

View solution in original post

dwaddle
SplunkTrust
SplunkTrust

I agree with Kristian - more information would be valuable. However, to answer the simplest iteration of your question, this may be more appropriate:

| search domains >700 OR hosts > 700 OR contacts > 700

gnovak
Builder

this worked. Thanks. Perhaps I was over thinking things!

0 Karma

kristian_kolb
Ultra Champion

Without really knowing what you want to do, or what your log data is, I believe that your missing something. Based on your search above, I believe that you want some type of aggregation of data, like "make a list of all Registrars who have registered more than 700 domains". Your search, as it is now, does not do that.

However, your data may already contain the count. It may also be so that your dedup command removes data that would be needed for further calculations, since it only keeps the first occurrence and discard the rest.

Please post a few sample events, and perhaps your desired output.

/kristian

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