<?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 isnull in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/eval-isnull/m-p/123146#M33232</link>
    <description>&lt;P&gt;Where is the field "hostTICKET" present? Its not coming from lookup right? Is it there in the logs?&lt;/P&gt;</description>
    <pubDate>Tue, 08 Apr 2014 13:29:53 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2014-04-08T13:29:53Z</dc:date>
    <item>
      <title>eval isnull</title>
      <link>https://community.splunk.com/t5/Splunk-Search/eval-isnull/m-p/123142#M33228</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;

&lt;P&gt;Anyone know why i'm still getting NULL in my timechart?&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;The lookup "existing" has two columns "ticket|host_message". host_message column matches the eval expression host+CISCO_MESSAGE below...  I **can&lt;/STRONG&gt; get the host+message+ticket number to show up in the timechart with the following query - however if the results do not match host_message in the lookup, hostTICKET comes back null.**  I want null to simply be host_message without the ticket because it does not exist on the lookup.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=net | rex "(?i)^([^:]*:){8}(?&amp;lt;CISCO_LOG&amp;gt;.*)$" | eval host_message=host+CISCO_LOG | lookup existing host_message |  eval hostTICKET=if(isnull(hostTICKET),host_message+" "+TICKET,host_message) | timechart count by hostTICKET
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:20:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/eval-isnull/m-p/123142#M33228</guid>
      <dc:creator>subtrakt</dc:creator>
      <dc:date>2020-09-28T16:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: eval isnull</title>
      <link>https://community.splunk.com/t5/Splunk-Search/eval-isnull/m-p/123143#M33229</link>
      <description>&lt;P&gt;You're using the wrong operator for performing string concatenations. It should be ".", not "+". So, your eval statement should read&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eval hostTicket=if(isnull(hostTICKET),host_message." ".TICKET,host_message
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 08 Apr 2014 08:08:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/eval-isnull/m-p/123143#M33229</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2014-04-08T08:08:32Z</dc:date>
    </item>
    <item>
      <title>Re: eval isnull</title>
      <link>https://community.splunk.com/t5/Splunk-Search/eval-isnull/m-p/123144#M33230</link>
      <description>&lt;P&gt;It is still coming back as NULL for messages that are not defined in the lookup.  the field after "isnull" in parentheses is supposed to be the field that could come back as null correct?&lt;/P&gt;</description>
      <pubDate>Tue, 08 Apr 2014 12:34:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/eval-isnull/m-p/123144#M33230</guid>
      <dc:creator>subtrakt</dc:creator>
      <dc:date>2014-04-08T12:34:50Z</dc:date>
    </item>
    <item>
      <title>Re: eval isnull</title>
      <link>https://community.splunk.com/t5/Splunk-Search/eval-isnull/m-p/123145#M33231</link>
      <description>&lt;P&gt;No.  NULL is being filled in by the lookup statement, so when it gets to the eval the values is NULL, which is not null.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Apr 2014 13:22:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/eval-isnull/m-p/123145#M33231</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2014-04-08T13:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: eval isnull</title>
      <link>https://community.splunk.com/t5/Splunk-Search/eval-isnull/m-p/123146#M33232</link>
      <description>&lt;P&gt;Where is the field "hostTICKET" present? Its not coming from lookup right? Is it there in the logs?&lt;/P&gt;</description>
      <pubDate>Tue, 08 Apr 2014 13:29:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/eval-isnull/m-p/123146#M33232</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-04-08T13:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: eval isnull</title>
      <link>https://community.splunk.com/t5/Splunk-Search/eval-isnull/m-p/540158#M152787</link>
      <description>&lt;P&gt;The above eval statement does not correctly convert &lt;STRONG&gt;0&lt;/STRONG&gt; to &lt;STRONG&gt;0.0.0.0&lt;/STRONG&gt; and &lt;STRONG&gt;null values&lt;/STRONG&gt;. Try this:&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Note:&amp;nbsp;&lt;/STRONG&gt;replace&amp;nbsp;&lt;STRONG&gt;ip&lt;/STRONG&gt; with the field name you would like to convert.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval o1=floor(ip/16777216) | eval o2=floor((ip-o1*16777216)/65536) | eval o3=floor((ip-(o1*16777216+o2*65536))/256)| eval o4=ip-(o1*16777216+o2*65536+o3*256) | eval ipv4=tostring(o1)+"."+tostring(o2)+"."+tostring(o3)+"."+tostring(o4) | eval ipv4=if(ipv4="Null.Null.Null.Null","",ipv4)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Feb 2021 19:48:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/eval-isnull/m-p/540158#M152787</guid>
      <dc:creator>_brettfitz</dc:creator>
      <dc:date>2021-02-16T19:48:48Z</dc:date>
    </item>
  </channel>
</rss>

