Hi samsam48,
you can use more fields in the search command with boolean operators (remember that no operator means AND).
You can use more times the rex command in a search or extract more fields in the same rex and use all of them in the following search command, e.g.
my_search
| rex "regex extracting field1"
| rex "regex extracting field2"
| rex "regex extracting field3"
| search field1=value1 field2=value2 field3=value3
You have two way to extract fields:
using field extractor
using the rex command
the first one is related to a single sourcetype and permits to extract a field one time and use it in every search;
the second one isn't related to a sourcetype and applicable to all the results of a search not depending on the sourcetype, but must be extracted in every search.
Remember that for performaces it's better to have the search parameters as left as you can, so (if possible) it's better to extract a field out of the search and use it in the main search without declaring it in the regex.
About the index, it's better to use the index parameter in every search to have more performant searches, because if you don't declare it (also more than one) Splunk runs you search in all the indexes of the default search path instead the one you want, in addition you could not find results if your index isn't in the default search path, declared for your user's role (if you're using admin you have in the default search path all the indexes), e.g. in your search
index=my_index sourcetype=ServerA (word1 OR word2 OR word3)
...
See at http://docs.splunk.com/Documentation/Splunk/7.1.2/Search/GetstartedwithSearch
Bye.
Giuseppe
P.S.. if you're satisfied by this answer acept and/or upvote it.
... View more