<?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: help on token strange behaviour in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416677#M170845</link>
    <description>&lt;P&gt;Can you share a screenshot as well?&lt;/P&gt;</description>
    <pubDate>Wed, 12 Jun 2019 07:43:59 GMT</pubDate>
    <dc:creator>FrankVl</dc:creator>
    <dc:date>2019-06-12T07:43:59Z</dc:date>
    <item>
      <title>help on token strange behaviour</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416665#M170833</link>
      <description>&lt;P&gt;hi&lt;/P&gt;

&lt;P&gt;I use the search below and I filter the data with 2 token&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup tablet_host.csv 
| lookup PanaBatteryStatus.csv "Hostname00" as host OUTPUT BatteryTemp00 BatteryModel00 CycleCount00 HealthState00 LastRecalibration00 ManufactureDate00 DesignCapacity00 
| lookup lookup_cmdb_fo_all.csv HOSTNAME as host output SITE 
| stats values(SITE) as SITE values(BatteryModel00) as BatteryModel values(CycleCount00) as CycleCount values(HealthState00) as HealthState values(LastRecalibration00) as LastRecalibration values(ManufactureDate00) as ManufactureDate values(DesignCapacity00) as DesignCapacity by host 
| search CycleCount=$tok_cycle$ 
| search HealthState=$tok_health$ 
| sort +host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have an issue with | search HealthState=$tok_health$ &lt;BR /&gt;
By default, the filter value is : &amp;lt;85&lt;BR /&gt;
The filter works but in the result I also have events where healthstate = 100,00 or more!&lt;BR /&gt;
conversely, when I m doing &amp;gt;85 I have no events where value is 100,00 or more!&lt;BR /&gt;
what is the problem please??&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2019 05:38:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416665#M170833</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-06-10T05:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: help on token strange behaviour</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416666#M170834</link>
      <description>&lt;P&gt;try wrapping your token in tonumber function like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval health = tonumber($tok_health|s$) 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Jun 2019 06:59:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416666#M170834</guid>
      <dc:creator>nabeel652</dc:creator>
      <dc:date>2019-06-10T06:59:53Z</dc:date>
    </item>
    <item>
      <title>Re: help on token strange behaviour</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416667#M170835</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I think you should take below point into consideration about  command. Might be this could help you in some extent.&lt;/P&gt;

&lt;P&gt;Specify the number of results to return from the sorted results. If no count is specified, the default limit of 10000 is used. If 0 is specified, all results are returned.&lt;/P&gt;

&lt;P&gt;Thanks &lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2019 07:05:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416667#M170835</guid>
      <dc:creator>vikas_baranwal</dc:creator>
      <dc:date>2019-06-10T07:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: help on token strange behaviour</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416668#M170836</link>
      <description>&lt;P&gt;Dear @jip31,&lt;/P&gt;

&lt;P&gt;Are you trying to pass value as mentioned below.    &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    | search CycleCount=&amp;lt;85
    | search HealthState=&amp;lt;85    
    OR     
    | search CycleCount=&amp;gt;85
    | search HealthState=&amp;gt;85
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Can you try something like this &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| search CycleCount&amp;lt;=85
| search HealthState&amp;lt;=85
OR
| search CycleCount&amp;gt;=85
| search HealthState&amp;gt;=85
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Shankarananth &lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2019 07:10:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416668#M170836</guid>
      <dc:creator>Shan</dc:creator>
      <dc:date>2019-06-10T07:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: help on token strange behaviour</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416669#M170837</link>
      <description>&lt;P&gt;hi&lt;BR /&gt;
when I do this I have an "encoded" issue with &amp;gt; or &amp;lt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2019 05:47:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416669#M170837</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-06-11T05:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: help on token strange behaviour</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416670#M170838</link>
      <description>&lt;P&gt;hi&lt;BR /&gt;
I have an issue :  Error in 'eval' command: The arguments to the 'tonumber' function are invalid.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2019 05:49:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416670#M170838</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-06-11T05:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: help on token strange behaviour</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416671#M170839</link>
      <description>&lt;P&gt;Sorry I have spoken too fast&lt;BR /&gt;
no encoded issue but I have an error ith OR : operator is missing a clause on the right hand side&lt;BR /&gt;
but if I only do :&lt;BR /&gt;
 | search CycleCount&amp;lt;=85&lt;BR /&gt;
 | search HealthState&amp;lt;=85&lt;BR /&gt;
I have always events &amp;gt; 85!&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2019 06:12:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416671#M170839</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-06-11T06:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: help on token strange behaviour</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416672#M170840</link>
      <description>&lt;P&gt;Dear @jip31,&lt;/P&gt;

&lt;P&gt;It's ok no problem.. &lt;BR /&gt;
Is below code are the one you're expecting to achieve..&lt;BR /&gt;
Kindly provide the screen-shot of error, your getting while adding the below code to your query. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | search CycleCount&amp;lt;=85
 | search HealthState&amp;lt;=85
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In What manner you're going to pass the token value eg 85 or &amp;gt;85 or &amp;lt;85 or !85.&lt;/P&gt;

&lt;P&gt;Thanks..&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2019 07:03:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416672#M170840</guid>
      <dc:creator>Shan</dc:creator>
      <dc:date>2019-06-11T07:03:52Z</dc:date>
    </item>
    <item>
      <title>Re: help on token strange behaviour</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416673#M170841</link>
      <description>&lt;P&gt;Ihave no error with this code shankarananth but I have the same problem : even if I m doing &amp;gt; 85 I have events =100 or more...&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2019 07:11:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416673#M170841</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-06-11T07:11:17Z</dc:date>
    </item>
    <item>
      <title>Re: help on token strange behaviour</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416674#M170842</link>
      <description>&lt;P&gt;@ jip3,&lt;/P&gt;

&lt;P&gt;Is above mentioned code latest one .. &lt;BR /&gt;
can you display the complete code one more time ..&lt;/P&gt;

&lt;P&gt;Thanks..&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2019 09:42:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416674#M170842</guid>
      <dc:creator>Shan</dc:creator>
      <dc:date>2019-06-11T09:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: help on token strange behaviour</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416675#M170843</link>
      <description>&lt;P&gt;Yeah, that of course doesn't work when you include the &amp;lt; operator in the token value.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2019 09:49:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416675#M170843</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-06-11T09:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: help on token strange behaviour</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416676#M170844</link>
      <description>&lt;P&gt;Here is the xml&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;Hardware Monitoring - Battery details&amp;lt;/label&amp;gt;
  &amp;lt;fieldset submitButton="true"&amp;gt;
    &amp;lt;input type="text" token="tok_cycle" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;CycleCount&amp;lt;/label&amp;gt;
      &amp;lt;default&amp;gt;&amp;amp;gt; 200&amp;lt;/default&amp;gt;
      &amp;lt;initialValue&amp;gt;*&amp;lt;/initialValue&amp;gt;
    &amp;lt;/input&amp;gt;
    &amp;lt;input type="text" token="tok_health" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;HealthState&amp;lt;/label&amp;gt;
      &amp;lt;default&amp;gt;&amp;amp;lt; 85&amp;lt;/default&amp;gt;
      &amp;lt;initialValue&amp;gt;*&amp;lt;/initialValue&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;| inputlookup tablet_host.csv 
| lookup PanaBatteryStatus.csv "Hostname00" as host OUTPUT BatteryTemp00 BatteryModel00 CycleCount00 HealthState00 LastRecalibration00 ManufactureDate00 DesignCapacity00 
| lookup lookup_cmdb_fo_all.csv HOSTNAME as host output SITE 
| stats values(SITE) as SITE values(BatteryModel00) as BatteryModel values(CycleCount00) as CycleCount values(HealthState00) as HealthState values(LastRecalibration00) as LastRecalibration values(ManufactureDate00) as ManufactureDate values(DesignCapacity00) as DesignCapacity by host 
| search CycleCount$tok_cycle$ 
| search HealthState$tok_health$ 


| sort +host&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;0&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="count"&amp;gt;10&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;row&amp;lt;/option&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Jun 2019 05:32:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416676#M170844</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-06-12T05:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: help on token strange behaviour</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416677#M170845</link>
      <description>&lt;P&gt;Can you share a screenshot as well?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2019 07:43:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416677#M170845</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-06-12T07:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: help on token strange behaviour</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416678#M170846</link>
      <description>&lt;P&gt;&lt;A href="https://www.cjoint.com/c/IFmjtFKeFiq"&gt;https://www.cjoint.com/c/IFmjtFKeFiq&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2019 09:20:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416678#M170846</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-06-12T09:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: help on token strange behaviour</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416679#M170847</link>
      <description>&lt;P&gt;Looks like your healthstate field is interpreted as a string. Try inserting an &lt;CODE&gt;| eval HealthState=tonumber(HealthState)&lt;/CODE&gt; between the stats and the search commands.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2019 10:16:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416679#M170847</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-06-12T10:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: help on token strange behaviour</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416680#M170848</link>
      <description>&lt;P&gt;I Have no results when i add the code :&lt;/P&gt;

&lt;P&gt;stats values(SITE) as SITE values(BatteryModel00) as BatteryModel values(CycleCount00) as CycleCount values(HealthState00) as HealthState values(LastRecalibration00) as LastRecalibration values(ManufactureDate00) as ManufactureDate values(DesignCapacity00) as DesignCapacity by host &lt;BR /&gt;
| eval HealthState=tonumber(HealthState) &lt;BR /&gt;
| search CycleCount$tok_cycle$ &lt;BR /&gt;
| search HealthState$tok_health$ &lt;BR /&gt;
| sort +host&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:53:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416680#M170848</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2020-09-30T00:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: help on token strange behaviour</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416681#M170849</link>
      <description>&lt;P&gt;Ah, my bad, the issue is with the comma instead of . as decimal separator. Try it like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval HealthState=tonumber(replace(HealthState,",","."))
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Jun 2019 11:02:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416681#M170849</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-06-12T11:02:37Z</dc:date>
    </item>
    <item>
      <title>Re: help on token strange behaviour</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416682#M170850</link>
      <description>&lt;P&gt;perfect!! thanks&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2019 11:22:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416682#M170850</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-06-12T11:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: help on token strange behaviour</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416683#M170851</link>
      <description>&lt;P&gt;i cant accept your answer I dont know why??&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2019 11:34:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416683#M170851</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-06-12T11:34:40Z</dc:date>
    </item>
    <item>
      <title>Re: help on token strange behaviour</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416684#M170852</link>
      <description>&lt;P&gt;I converted the relevant comment to an answer, you should be able to accept that now &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2019 11:54:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-token-strange-behaviour/m-p/416684#M170852</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-06-12T11:54:09Z</dc:date>
    </item>
  </channel>
</rss>

