<?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 Re: Matching event results to a lookup field with a wildcard. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Matching-event-results-to-a-lookup-field-with-a-wildcard/m-p/574774#M200292</link>
    <description>&lt;P&gt;Create a new lookup definition called "&lt;SPAN&gt;Windows_App_Services" that references&amp;nbsp;Windows_App_Services.csv.&amp;nbsp; In the Advanced Options section, set the Match type field to "WILDCARD(host)".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Then replace the join in the query with a lookup.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=windows source=service earliest=-20m
[inputlookup Windows_App_Services.csv | table host Name ]
| stats count(eval(if(State!="Running",1,null()))) as failureCount by host Name
| lookup Windows_App_Services host OUTPUT severity failuresAllowed&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 12 Nov 2021 18:00:36 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2021-11-12T18:00:36Z</dc:date>
    <item>
      <title>Matching event results to a lookup field with a wildcard.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Matching-event-results-to-a-lookup-field-with-a-wildcard/m-p/574771#M200291</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to build out a lookup of services on specific servers that I want to know when they've stopped. But I wanted to use wildcards for servers so I didn't need to type out a lot of servers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the some sample data and the base of the search that I've been playing with.&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;host&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;Name&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;severity&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;failuresAllowed&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="25px"&gt;server1234&lt;/TD&gt;&lt;TD height="25px"&gt;service1&lt;/TD&gt;&lt;TD height="25px"&gt;low&lt;/TD&gt;&lt;TD height="25px"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;server1*&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;service2&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;high&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;server2*&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;service3&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;medium&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;index=windows source=service earliest=-20m&lt;BR /&gt;[inputlookup Windows_App_Services.csv | table host Name ]&lt;BR /&gt;| stats count(eval(if(State!="Running",1,null()))) as failureCount by host Name&lt;BR /&gt;| join host Name type=outer [inputlookup Windows_App_Services.csv]&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The first inputlookup pulls in just the server name and service we're looking at so that I can search only those events. Then I count how many of those events have a State of not running so I know how many times in the 20 minute lookup back period they haven't been running. Then I'd like to pull in severity and failuresAllowed so that I can use those to calculate severity in ITSI, but when I try to do the join it does not work because the host doesn't match what's in the lookup since it's wildcarded.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried creating a wildcard match_type on that lookup, but that doesn't seem to help me. Anyone have any ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Fri, 12 Nov 2021 16:38:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Matching-event-results-to-a-lookup-field-with-a-wildcard/m-p/574771#M200291</guid>
      <dc:creator>joeybagofdonuts</dc:creator>
      <dc:date>2021-11-12T16:38:49Z</dc:date>
    </item>
    <item>
      <title>Re: Matching event results to a lookup field with a wildcard.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Matching-event-results-to-a-lookup-field-with-a-wildcard/m-p/574774#M200292</link>
      <description>&lt;P&gt;Create a new lookup definition called "&lt;SPAN&gt;Windows_App_Services" that references&amp;nbsp;Windows_App_Services.csv.&amp;nbsp; In the Advanced Options section, set the Match type field to "WILDCARD(host)".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Then replace the join in the query with a lookup.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=windows source=service earliest=-20m
[inputlookup Windows_App_Services.csv | table host Name ]
| stats count(eval(if(State!="Running",1,null()))) as failureCount by host Name
| lookup Windows_App_Services host OUTPUT severity failuresAllowed&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Nov 2021 18:00:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Matching-event-results-to-a-lookup-field-with-a-wildcard/m-p/574774#M200292</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-11-12T18:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: Matching event results to a lookup field with a wildcard.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Matching-event-results-to-a-lookup-field-with-a-wildcard/m-p/574784#M200294</link>
      <description>&lt;P&gt;Thanks! That worked for me, I was messing up the syntax of calling the lookup. I've accepted this as the solution, but I have a follow up question if you'd be so inclined.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Say I want to take it a step further and be able to list multiple hosts and be able to wild card. Like this for example:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="24.870967741935484%" height="25px"&gt;host&lt;/TD&gt;&lt;TD width="25.129032258064516%" height="25px"&gt;Name&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;severity&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;failuresAllowed&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="24.870967741935484%" height="25px"&gt;server123::server234::server345&lt;/TD&gt;&lt;TD width="25.129032258064516%" height="25px"&gt;Service1&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;low&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="24.870967741935484%" height="25px"&gt;server1*&lt;/TD&gt;&lt;TD width="25.129032258064516%" height="25px"&gt;Service2&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;high&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="24.870967741935484%" height="25px"&gt;server123&lt;/TD&gt;&lt;TD width="25.129032258064516%" height="25px"&gt;Service3&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;medium&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works for the 2nd and 3rd row. Note that I'm doing my lookup by host and Name because certain servers could be looking at the same services with different severities resulting if it's stopped.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=windows source=service earliest=-20m
[inputlookup Windows_App_Services.csv | table host Name | makemv delim=:: host | mvexpand host]
| stats count(eval(if(State!="Running",1,null()))) as failureCount by host Name
| lookup Windows_App_Services host Name OUTPUT severity failuresAllowed&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However I'm not sure how to split out the hosts in the first row as this doesn't quite do it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=windows source=service
[inputlookup Windows_App_Services.csv | table host Name | makemv delim=:: host | mvexpand host]
| stats count(eval(if(State!="Running",1,null()))) as failureCount by host Name
| lookup Windows_App_Services_Lookup host Name | makemv delim=:: host | mvexpand host&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm at a point where I could probably bang my head against a wall for a little and figure it out, but any advice would be much appreciated!&lt;/P&gt;</description>
      <pubDate>Fri, 12 Nov 2021 18:38:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Matching-event-results-to-a-lookup-field-with-a-wildcard/m-p/574784#M200294</guid>
      <dc:creator>joeybagofdonuts</dc:creator>
      <dc:date>2021-11-12T18:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: Matching event results to a lookup field with a wildcard.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Matching-event-results-to-a-lookup-field-with-a-wildcard/m-p/574787#M200296</link>
      <description>&lt;P&gt;I did some headslamming and realized I could just do this. Might not be the most efficient so still open to critiques, but this got me the results I wanted!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=windows source=service
[inputlookup Windows_App_Services.csv | table host Name | makemv delim=:: host | mvexpand host]
| stats count(eval(if(State!="Running",1,null()))) as failureCount by host Name
| lookup Windows_App_Services_Lookup host Name
| join host Name type=outer [inputlookup Windows_App_Services.csv | makemv delim=:: host | mvexpand host]&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 12 Nov 2021 19:39:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Matching-event-results-to-a-lookup-field-with-a-wildcard/m-p/574787#M200296</guid>
      <dc:creator>joeybagofdonuts</dc:creator>
      <dc:date>2021-11-12T19:39:30Z</dc:date>
    </item>
  </channel>
</rss>

