<?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: Count To Boolean in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Count-To-Boolean/m-p/506122#M141612</link>
    <description>&lt;P&gt;You could either change "count" directly with the eval:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval count = if(count=1, "true", "false")&lt;/LI-CODE&gt;&lt;P&gt;or you remove "count" after you evaled "countflag" (or any other fieldname of your choice)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| fields - count&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 25 Jun 2020 08:52:27 GMT</pubDate>
    <dc:creator>rnowitzki</dc:creator>
    <dc:date>2020-06-25T08:52:27Z</dc:date>
    <item>
      <title>Count To Boolean</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Count-To-Boolean/m-p/506111#M141606</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have a requirement wherein I count a specific log in the last minute. The count is supposed to be 1.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to convert this count to boolean to show in my visualization. Something like, if count = 1 then True else False.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need only true or false as output of the query and not with count.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm basically trying to create a application status monitoring! Any pointers?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sharad R K&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2020 07:56:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Count-To-Boolean/m-p/506111#M141606</guid>
      <dc:creator>sharadrk</dc:creator>
      <dc:date>2020-06-25T07:56:38Z</dc:date>
    </item>
    <item>
      <title>Re: Count To Boolean</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Count-To-Boolean/m-p/506114#M141607</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/222966"&gt;@sharadrk&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Is this what you are looking for?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval countflag = if(count=1, "true", "false")&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;("countflag" can be anything, you could eve overwrite the count field itself.)&lt;/P&gt;&lt;P&gt;It's not really boolean, just the strings "true" or "false". In the Documentation it says "&lt;SPAN&gt;The result of an eval expression cannot be a Boolean." But you should be able to work with that way.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Eval" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Eval&lt;/A&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2020 08:19:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Count-To-Boolean/m-p/506114#M141607</guid>
      <dc:creator>rnowitzki</dc:creator>
      <dc:date>2020-06-25T08:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: Count To Boolean</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Count-To-Boolean/m-p/506117#M141610</link>
      <description>&lt;P&gt;But the thing is if I use this concept, I get output in a table with Count and then countflag.&amp;nbsp;&lt;/P&gt;&lt;P&gt;That is not what I wanted. I just wanted True or False. How can I not show count and only show countflag?&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2020 08:41:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Count-To-Boolean/m-p/506117#M141610</guid>
      <dc:creator>sharadrk</dc:creator>
      <dc:date>2020-06-25T08:41:55Z</dc:date>
    </item>
    <item>
      <title>Re: Count To Boolean</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Count-To-Boolean/m-p/506122#M141612</link>
      <description>&lt;P&gt;You could either change "count" directly with the eval:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval count = if(count=1, "true", "false")&lt;/LI-CODE&gt;&lt;P&gt;or you remove "count" after you evaled "countflag" (or any other fieldname of your choice)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| fields - count&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2020 08:52:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Count-To-Boolean/m-p/506122#M141612</guid>
      <dc:creator>rnowitzki</dc:creator>
      <dc:date>2020-06-25T08:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: Count To Boolean</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Count-To-Boolean/m-p/506124#M141614</link>
      <description>&lt;P&gt;sample:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats count where index=_internal sourcetype=splunkd by PREFIX("group=")
| eval boolean=if(count&amp;gt;1000,1,0)
| rename COMMENT as "this is the logic"
| eval result=nullif(match(boolean,"1"),"true")&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 25 Jun 2020 09:33:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Count-To-Boolean/m-p/506124#M141614</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-06-25T09:33:38Z</dc:date>
    </item>
  </channel>
</rss>

