Splunk Search

Specify More Than One Host?

eboniebutler
New Member

Hey everyone! I have a pretty simple question. Below is a sample search string:

index=os sourcetype=df mount="/etc" host=server1

Is there a way to specific more than one host? I thought I could get away with host=server1,server2 but it didn't work out. I'm trying to tailer my visualization chart for my clients as much as possible so it would help out to just display the data that actually matters to them.

0 Karma

plantiw
New Member

so I am doing sourcetype cisco:asa and host=* but I am not getting all the hosts. Also how do I just get a report on hosts without all the log info?

0 Karma

thambisetty
SplunkTrust
SplunkTrust

you can do like below,

index=os sourcetype=df mount="/etc" host IN (server1,server2)

————————————
If this helps, give a like below.

reswob4
Builder

Depends on how many hosts you want to specify. If it's two or three, simply using OR will do it:

index=os sourcetype=df mount="/etc" (host=server1 OR host=server2 OR host=server3)

If you get into too many hosts, then you may be able to sue a wildcard if they have similar names. If not, then you may have to use more esoteric means, like a lookup table.

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