<?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 Eval variable1=variable2 is True or False? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Eval-variable1-variable2-is-True-or-False/m-p/81604#M20704</link>
    <description>&lt;P&gt;Folks...
I am extracting two variables at search time and trying to report when the two variables are not the same.  At this point the two variables are host (coming from the splunk LF running on the system) and os_hostname (coming from a script that calls hostname on a linux box).  Basically I want to know when host!=os_hostname and report on that.  We have some admins that are cloning servers and forgetting to re-install Splunk so all the cloned systems are reporting as if they were the original cloned system.&lt;/P&gt;

&lt;P&gt;I assume there is a way to do this with the Eval command, but can't seem to find the right syntax.  Can someone help me?&lt;/P&gt;</description>
    <pubDate>Tue, 02 Nov 2010 00:58:27 GMT</pubDate>
    <dc:creator>starks951</dc:creator>
    <dc:date>2010-11-02T00:58:27Z</dc:date>
    <item>
      <title>Eval variable1=variable2 is True or False?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-variable1-variable2-is-True-or-False/m-p/81604#M20704</link>
      <description>&lt;P&gt;Folks...
I am extracting two variables at search time and trying to report when the two variables are not the same.  At this point the two variables are host (coming from the splunk LF running on the system) and os_hostname (coming from a script that calls hostname on a linux box).  Basically I want to know when host!=os_hostname and report on that.  We have some admins that are cloning servers and forgetting to re-install Splunk so all the cloned systems are reporting as if they were the original cloned system.&lt;/P&gt;

&lt;P&gt;I assume there is a way to do this with the Eval command, but can't seem to find the right syntax.  Can someone help me?&lt;/P&gt;</description>
      <pubDate>Tue, 02 Nov 2010 00:58:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-variable1-variable2-is-True-or-False/m-p/81604#M20704</guid>
      <dc:creator>starks951</dc:creator>
      <dc:date>2010-11-02T00:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: Eval variable1=variable2 is True or False?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-variable1-variable2-is-True-or-False/m-p/81605#M20705</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;... | eval state=if(host!=os_hostname,"bad","good")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 02 Nov 2010 01:01:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-variable1-variable2-is-True-or-False/m-p/81605#M20705</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-11-02T01:01:14Z</dc:date>
    </item>
    <item>
      <title>Re: Eval variable1=variable2 is True or False?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-variable1-variable2-is-True-or-False/m-p/81606#M20706</link>
      <description>&lt;P&gt;This works GREAT... any way to make it more fuzzy so it doesn't care about capital letters, IE host=computera and os_hostname=COMPUTERA ?&lt;/P&gt;</description>
      <pubDate>Tue, 02 Nov 2010 03:30:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-variable1-variable2-is-True-or-False/m-p/81606#M20706</guid>
      <dc:creator>starks951</dc:creator>
      <dc:date>2010-11-02T03:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: Eval variable1=variable2 is True or False?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-variable1-variable2-is-True-or-False/m-p/81607#M20707</link>
      <description>&lt;P&gt;&lt;CODE&gt;if(lower(host)!=lower(os_hostname),...)&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Nov 2010 13:15:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-variable1-variable2-is-True-or-False/m-p/81607#M20707</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-11-02T13:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: Eval variable1=variable2 is True or False?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-variable1-variable2-is-True-or-False/m-p/81608#M20708</link>
      <description>&lt;P&gt;If you really just want to know when host!=os_hostname, just use&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;       ... | where host!=os_hostname 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 11 Jan 2011 02:43:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-variable1-variable2-is-True-or-False/m-p/81608#M20708</guid>
      <dc:creator>carasso</dc:creator>
      <dc:date>2011-01-11T02:43:04Z</dc:date>
    </item>
  </channel>
</rss>

