<?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: eval with wildcard in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/eval-with-wildcard/m-p/576962#M201079</link>
    <description>&lt;P&gt;This works like a charm. Thanks&lt;/P&gt;</description>
    <pubDate>Wed, 01 Dec 2021 23:57:11 GMT</pubDate>
    <dc:creator>shashank_24</dc:creator>
    <dc:date>2021-12-01T23:57:11Z</dc:date>
    <item>
      <title>eval with wildcard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/eval-with-wildcard/m-p/475916#M133714</link>
      <description>&lt;P&gt;I am trying to use an eval but there is a wildcard so I noticed this does not work. Ho can I get this to work? I tried using match or Like but I cant get it working&lt;/P&gt;

&lt;P&gt;......count(eval(logger ="blablabla test HTTP status: 200.")) OR  logger="something id * HTTP status: 200") AS Example&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2020 16:02:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/eval-with-wildcard/m-p/475916#M133714</guid>
      <dc:creator>Mike6960</dc:creator>
      <dc:date>2020-02-18T16:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: eval with wildcard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/eval-with-wildcard/m-p/475917#M133715</link>
      <description>&lt;P&gt;Try &lt;BR /&gt;
&lt;CODE&gt;|stats count(eval(like(logger,"%status: 200"))) as Example&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2020 16:33:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/eval-with-wildcard/m-p/475917#M133715</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2020-02-18T16:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: eval with wildcard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/eval-with-wildcard/m-p/475918#M133716</link>
      <description>&lt;P&gt;Hi, what does 'category' do ?&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2020 17:08:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/eval-with-wildcard/m-p/475918#M133716</guid>
      <dc:creator>Mike6960</dc:creator>
      <dc:date>2020-02-18T17:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: eval with wildcard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/eval-with-wildcard/m-p/475919#M133717</link>
      <description>&lt;P&gt;sorry - should have been logger - amended in the answer.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2020 17:16:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/eval-with-wildcard/m-p/475919#M133717</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2020-02-18T17:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: eval with wildcard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/eval-with-wildcard/m-p/475920#M133718</link>
      <description>&lt;P&gt;@Mike6960 &lt;/P&gt;

&lt;P&gt;You can try this also.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;YOUR_SEARCH | eval example= case(like(logger,"blablabla test HTTP status: 200."),1,like(logger,"something id % HTTP status: 200"),1,1=1,0) | stats sum(example) as example
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Sample:&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval logger="blablabla test HTTP status: 200.|something id 1234 HTTPA status: 200|something id 1234 HTTP status: 200", logger=split(logger,"|") 
| mvexpand logger
| rename comment as "Upto this is for data generation only" 
| eval example= case(like(logger,"blablabla test HTTP status: 200."),1,like(logger,"something id % HTTP status: 200"),1,1=1,0)
| stats sum(example) as example
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 19 Feb 2020 08:57:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/eval-with-wildcard/m-p/475920#M133718</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2020-02-19T08:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: eval with wildcard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/eval-with-wildcard/m-p/475921#M133719</link>
      <description>&lt;P&gt;If you are counting logs with status code 200, then extract status from logger and count it. You can use extracted field to count logs with other status codes also.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=logger "status:\s(?&amp;lt;status&amp;gt;[\d]+)" | stats count(eval(status=200)) AS count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 19 Feb 2020 10:00:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/eval-with-wildcard/m-p/475921#M133719</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-02-19T10:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: eval with wildcard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/eval-with-wildcard/m-p/576962#M201079</link>
      <description>&lt;P&gt;This works like a charm. Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 23:57:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/eval-with-wildcard/m-p/576962#M201079</guid>
      <dc:creator>shashank_24</dc:creator>
      <dc:date>2021-12-01T23:57:11Z</dc:date>
    </item>
  </channel>
</rss>

