<?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 Adding asterisk to host list in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Adding-asterisk-to-host-list/m-p/697645#M236970</link>
    <description>&lt;P&gt;I'm working on a dashboard in which the user enters a list of hosts.&amp;nbsp; The issue I'm running into is they must add an asterisk to the host name or it isn't found in the search.&amp;nbsp; This what the SPL looks like.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=os_* (`wineventlog_security` OR sourcetype=linux_secure) host IN ( host1*, host2*, host3*, host4*, host5*, host6*, host7*, host8* ) earliest=-7d@d
| dedup host
| eval sourcetype=if(sourcetype = "linux_secure", sourcetype, source) 
| fillnull value="" 
| table host, index, sourcetype, _raw&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If there is no * then there are no results.&amp;nbsp; What I would like to be able to do is have them enter hostname, FQDN, and either upper or lower case and the SPL would change it to lower case, remove any FQDN parts, add the *, and then search.&amp;nbsp; So far I haven't come up with SPL that works.&amp;nbsp; Any thoughts?&lt;/P&gt;&lt;P&gt;TIA,&lt;BR /&gt;Joe&lt;/P&gt;</description>
    <pubDate>Wed, 28 Aug 2024 19:32:42 GMT</pubDate>
    <dc:creator>jwhughes58</dc:creator>
    <dc:date>2024-08-28T19:32:42Z</dc:date>
    <item>
      <title>Adding asterisk to host list</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-asterisk-to-host-list/m-p/697645#M236970</link>
      <description>&lt;P&gt;I'm working on a dashboard in which the user enters a list of hosts.&amp;nbsp; The issue I'm running into is they must add an asterisk to the host name or it isn't found in the search.&amp;nbsp; This what the SPL looks like.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=os_* (`wineventlog_security` OR sourcetype=linux_secure) host IN ( host1*, host2*, host3*, host4*, host5*, host6*, host7*, host8* ) earliest=-7d@d
| dedup host
| eval sourcetype=if(sourcetype = "linux_secure", sourcetype, source) 
| fillnull value="" 
| table host, index, sourcetype, _raw&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If there is no * then there are no results.&amp;nbsp; What I would like to be able to do is have them enter hostname, FQDN, and either upper or lower case and the SPL would change it to lower case, remove any FQDN parts, add the *, and then search.&amp;nbsp; So far I haven't come up with SPL that works.&amp;nbsp; Any thoughts?&lt;/P&gt;&lt;P&gt;TIA,&lt;BR /&gt;Joe&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2024 19:32:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-asterisk-to-host-list/m-p/697645#M236970</guid>
      <dc:creator>jwhughes58</dc:creator>
      <dc:date>2024-08-28T19:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: Adding asterisk to host list</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-asterisk-to-host-list/m-p/697648#M236972</link>
      <description>&lt;P class="lia-align-left"&gt;Upper/lowercase doesn't matter with search term. Splunk matches case-insensitively (with search command; where command is case-sensitive).&lt;/P&gt;&lt;P class="lia-align-left"&gt;And looking for something is definitely not the same as looking for something*.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2024 20:02:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-asterisk-to-host-list/m-p/697648#M236972</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-08-28T20:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: Adding asterisk to host list</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-asterisk-to-host-list/m-p/697649#M236973</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt; for answering.&amp;nbsp; This is what I found works.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=os_* (`wineventlog_security` OR sourcetype=linux_secure) 
    [| tstats count WHERE index=os_* (source=* OR sourcetype=*) host IN ( $servers_entered$ ) by host 
    | dedup host 
    | eval host=host+"*" 
    | table host] 
| dedup host
| eval sourcetype=if((sourcetype == "linux_secure"),sourcetype,source) 
| fillnull value=""
| table host, index, sourcetype, _raw&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 28 Aug 2024 20:16:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-asterisk-to-host-list/m-p/697649#M236973</guid>
      <dc:creator>jwhughes58</dc:creator>
      <dc:date>2024-08-28T20:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: Adding asterisk to host list</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-asterisk-to-host-list/m-p/697744#M236998</link>
      <description>&lt;P&gt;Oh. This is something we in Poland call "shooting the sparrow with a cannon". If you really want to modify user's input, you should do so on client's side using the &amp;lt;change&amp;gt; functionality of the dashboard.&lt;/P&gt;&lt;P&gt;But I'm still asking what's the point in doing so. If you want to have predefined choices you use different inputs. If you let the user type in something freely honor their choice (and/or educate the users to add the wildcard by themselves).&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 18:09:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-asterisk-to-host-list/m-p/697744#M236998</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-08-29T18:09:40Z</dc:date>
    </item>
  </channel>
</rss>

