<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Can I create a search parameter that maps to multiple field values? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Can-I-create-a-search-parameter-that-maps-to-multiple-field/m-p/601050#M209205</link>
    <description>&lt;P&gt;For context, I'm creating a dashboard where a user can search activity of all hosts in an environment or one host in that same environment. Unfortunately, the naming convention used for hostnames makes searching all hosts in a specific environment a bit more complicated than using a single field/value pair with a wildcard. For example, searching all non-production hosts would require a search similar to the following in my case:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=servers host!="*prd*" AND (host="*30*" OR host="*40*")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the dashboard, I'd like the user to be able to select a single hostname from a dropdown, or an "All Servers" option from the dropdown.&lt;/P&gt;&lt;P&gt;With that being said, is there a way I can map all the hostnames to a single "field value" such that something like...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=servers host=allhosts&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;...would accomplish the same thing as my initial search example?&lt;/P&gt;&lt;P&gt;This would be helpful as it would allow me to use a token for the host field when a user selects an option from the hosts dropdown.&lt;/P&gt;</description>
    <pubDate>Wed, 08 Jun 2022 16:07:05 GMT</pubDate>
    <dc:creator>griffins</dc:creator>
    <dc:date>2022-06-08T16:07:05Z</dc:date>
    <item>
      <title>Can I create a search parameter that maps to multiple field values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-create-a-search-parameter-that-maps-to-multiple-field/m-p/601050#M209205</link>
      <description>&lt;P&gt;For context, I'm creating a dashboard where a user can search activity of all hosts in an environment or one host in that same environment. Unfortunately, the naming convention used for hostnames makes searching all hosts in a specific environment a bit more complicated than using a single field/value pair with a wildcard. For example, searching all non-production hosts would require a search similar to the following in my case:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=servers host!="*prd*" AND (host="*30*" OR host="*40*")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the dashboard, I'd like the user to be able to select a single hostname from a dropdown, or an "All Servers" option from the dropdown.&lt;/P&gt;&lt;P&gt;With that being said, is there a way I can map all the hostnames to a single "field value" such that something like...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=servers host=allhosts&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;...would accomplish the same thing as my initial search example?&lt;/P&gt;&lt;P&gt;This would be helpful as it would allow me to use a token for the host field when a user selects an option from the hosts dropdown.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2022 16:07:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-create-a-search-parameter-that-maps-to-multiple-field/m-p/601050#M209205</guid>
      <dc:creator>griffins</dc:creator>
      <dc:date>2022-06-08T16:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: Can I create a search parameter that maps to multiple field values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-create-a-search-parameter-that-maps-to-multiple-field/m-p/601059#M209210</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/223696"&gt;@griffins&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could use an eventype for this:&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.2.6/Knowledge/Abouteventtypes" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.2.6/Knowledge/Abouteventtypes&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jamie&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2022 17:17:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-create-a-search-parameter-that-maps-to-multiple-field/m-p/601059#M209210</guid>
      <dc:creator>jamie00171</dc:creator>
      <dc:date>2022-06-08T17:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: Can I create a search parameter that maps to multiple field values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-create-a-search-parameter-that-maps-to-multiple-field/m-p/601060#M209211</link>
      <description>&lt;P&gt;Could you use*&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2022 17:18:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-create-a-search-parameter-that-maps-to-multiple-field/m-p/601060#M209211</guid>
      <dc:creator>jamie00171</dc:creator>
      <dc:date>2022-06-08T17:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: Can I create a search parameter that maps to multiple field values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-create-a-search-parameter-that-maps-to-multiple-field/m-p/601067#M209214</link>
      <description>&lt;P&gt;I think this would work; however, after reading through some of the eventtype documentation, search macros were suggested if I was looking to shorten a search. So I was able to create what I needed using search macros, but I believe your suggestion would also work&lt;EM&gt; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2022 18:00:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-create-a-search-parameter-that-maps-to-multiple-field/m-p/601067#M209214</guid>
      <dc:creator>griffins</dc:creator>
      <dc:date>2022-06-08T18:00:25Z</dc:date>
    </item>
  </channel>
</rss>

