<?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: Dividing a value by 1000 in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Dividing-a-value-by-1000/m-p/358988#M106124</link>
    <description>&lt;P&gt;That one i tried, no result came.&lt;BR /&gt;
You changed the regex by adding  \d{4}-\d{2}-\d{2})&lt;BR /&gt;
I don't understand,what it does?&lt;/P&gt;</description>
    <pubDate>Tue, 20 Jun 2017 19:50:31 GMT</pubDate>
    <dc:creator>prathapkcsc</dc:creator>
    <dc:date>2017-06-20T19:50:31Z</dc:date>
    <item>
      <title>Dividing a value by 1000</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dividing-a-value-by-1000/m-p/358975#M106111</link>
      <description>&lt;P&gt;My search looks like this&lt;BR /&gt;
base search | rex ".&lt;EM&gt;?(?[^,]+),\s&lt;/EM&gt;?(?[^,]+),\s*?(?[^,]+),\s*?(?[^,]+),\s*?(?[^,]+),\s*?(?[^,]+),\s*?(?[^,]+),\s*?(?[^,]+),\s*?(?[^,]+),\s*?(?[^,]+)"&lt;BR /&gt;&lt;BR /&gt;
 | eval Total_Disk=Total_Disk/1000&lt;BR /&gt;
 | table _time server NODE Count CPU Total_Disk Used_Disk Total_Memory Used_Memory&lt;/P&gt;

&lt;P&gt;Here, I am dividing the Total_Disk by 1000. But, in table statistics Total_Disk not printing any values.&lt;BR /&gt;
How to get the data according to my requirement.&lt;BR /&gt;
Thank You&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:32:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dividing-a-value-by-1000/m-p/358975#M106111</guid>
      <dc:creator>prathapkcsc</dc:creator>
      <dc:date>2020-09-29T14:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: Dividing a value by 1000</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dividing-a-value-by-1000/m-p/358976#M106112</link>
      <description>&lt;P&gt;is Total_Disk a field with values coming back before your rex command? after your rex command? what does the data look like before your eval statement? &lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2017 17:46:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dividing-a-value-by-1000/m-p/358976#M106112</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2017-06-20T17:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: Dividing a value by 1000</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dividing-a-value-by-1000/m-p/358977#M106113</link>
      <description>&lt;P&gt;My guess is field Total_Disk is not extracted (value is null). So try running this to confirm if the value is extracted or not. If not (field Total_Disk is null/blank), paste your sample event and query again (and make sure you select the query and click on Ctrl+K or "101010" button to apply code formatting).&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base search | rex ".?(?[^,]+),\s?(?[^,]+),\s*?(?[^,]+),\s*?(?[^,]+),\s*?(?[^,]+),\s*?(?[^,]+),\s*?(?[^,]+),\s*?(?[^,]+),\s*?(?[^,]+),\s*?(?[^,]+)" 
| eval Total_Disk1=Total_Disk/1000
| table _time server NODE Count CPU Total_Disk Total_Disk1 Used_Disk Total_Memory Used_Memory
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:32:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dividing-a-value-by-1000/m-p/358977#M106113</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2020-09-29T14:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: Dividing a value by 1000</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dividing-a-value-by-1000/m-p/358978#M106114</link>
      <description>&lt;P&gt;@prathapkcsc, Please re-post your search query with code button (101010) so that special characters do not get escaped. Would it be possible for you to add some sample events as well?&lt;/P&gt;

&lt;P&gt;If possible use Splunk Interactive Field Extraction(IFX) instead of rex to make sure that field is getting extracted as you expect. You can also test your regular expression through IFX regex101.com. (&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Knowledge/ExtractfieldsinteractivelywithIFX"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Knowledge/ExtractfieldsinteractivelywithIFX&lt;/A&gt;)&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2017 18:53:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dividing-a-value-by-1000/m-p/358978#M106114</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-06-20T18:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: Dividing a value by 1000</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dividing-a-value-by-1000/m-p/358979#M106115</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;base search| rex ".*?(?&amp;lt;server&amp;gt;[^,]+),\s*?(?&amp;lt;NODE&amp;gt;[^,]+),\s*?(?&amp;lt;date&amp;gt;[^,]+),\s*?(?&amp;lt;time&amp;gt;[^,]+),\s*?(?&amp;lt;Count&amp;gt;[^,]+),\s*?(?&amp;lt;CPU&amp;gt;[^,]+),\s*?(?&amp;lt;Total_Disk&amp;gt;[^,]+),\s*?(?&amp;lt;Used_Disk&amp;gt;[^,]+),\s*?(?&amp;lt;Total_Memory&amp;gt;[^,]+),\s*?(?&amp;lt;Used_Memory&amp;gt;[^,]+)"  
 | eval Total_Disk=Total_disk/1000 
| table _time server NODE Count CPU Total_Disk Used_Disk Total_Memory Used_Memory

This is my search
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 20 Jun 2017 19:06:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dividing-a-value-by-1000/m-p/358979#M106115</guid>
      <dc:creator>prathapkcsc</dc:creator>
      <dc:date>2017-06-20T19:06:05Z</dc:date>
    </item>
    <item>
      <title>Re: Dividing a value by 1000</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dividing-a-value-by-1000/m-p/358980#M106116</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;DataNode,Hadoop,2017-06-17,23:05,26, 0.18, 1149876, 7231, 251, 70.8462
Flume,Hadoop,2017-06-17,23:05,9, 0.23, 108345, 114, 125, 17.6667
ResourceManager,Hadoop,2017-06-17,23:05,2, 0.11, 22146,320, 125, 9
ZooKeeper,Hadoop,2017-06-17,23:05,5, 0.2, 63747, 977, 125, 10
Foyer,Hadoop,2017-06-17,23:05,2, 0.14, 22146,320, 125, 10.5
Splunk,Hadoop,2017-06-17,23:05,1, 0.06, 40959, 106, 251, 3

This is my sample data
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 20 Jun 2017 19:14:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dividing-a-value-by-1000/m-p/358980#M106116</guid>
      <dc:creator>prathapkcsc</dc:creator>
      <dc:date>2017-06-20T19:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: Dividing a value by 1000</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dividing-a-value-by-1000/m-p/358981#M106117</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;base search 
 |  rex ".*?(?&amp;lt;server&amp;gt;[^,]+),\s*?(?&amp;lt;NODE&amp;gt;[^,]+),\s*?(?&amp;lt;date&amp;gt;[^,]+),\s*?(?&amp;lt;time&amp;gt;[^,]+),\s*?(?&amp;lt;Count&amp;gt;[^,]+),\s*?(?&amp;lt;CPU&amp;gt;[^,]+),\s*?(?&amp;lt;Total_Disk&amp;gt;[^,]+),\s*?(?&amp;lt;Used_Disk&amp;gt;[^,]+),\s*?(?&amp;lt;Total_Memory&amp;gt;[^,]+),\s*?(?&amp;lt;Used_Memory&amp;gt;[^,]+)" 

  | eval Total_Disk=Total_Disk/1000 
| table _time server NODE Count CPU Total_Disk Used_Disk Total_Memory Used_Memory
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 20 Jun 2017 19:17:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dividing-a-value-by-1000/m-p/358981#M106117</guid>
      <dc:creator>prathapkcsc</dc:creator>
      <dc:date>2017-06-20T19:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: Dividing a value by 1000</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dividing-a-value-by-1000/m-p/358982#M106118</link>
      <description>&lt;P&gt;Total_Disk value coming after the rex command.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2017 19:22:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dividing-a-value-by-1000/m-p/358982#M106118</guid>
      <dc:creator>prathapkcsc</dc:creator>
      <dc:date>2017-06-20T19:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: Dividing a value by 1000</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dividing-a-value-by-1000/m-p/358983#M106119</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base search| rex ".*?(?&amp;lt;server&amp;gt;[^,]+),\s*?(?&amp;lt;NODE&amp;gt;[^,]+),\s*?(?&amp;lt;date&amp;gt;[^,]+),\s*?(?&amp;lt;time&amp;gt;[^,]+),\s*?(?&amp;lt;Count&amp;gt;[^,]+),\s*?(?&amp;lt;CPU&amp;gt;[^,]+),\s*?(?&amp;lt;Total_Disk&amp;gt;[^,]+),\s*?(?&amp;lt;Used_Disk&amp;gt;[^,]+),\s*?(?&amp;lt;Total_Memory&amp;gt;[^,]+),\s*?(?&amp;lt;Used_Memory&amp;gt;[^,]+)"  
  | eval Total_Disk=tonumber(Total_disk)/1000 
 | table _time server NODE Count CPU Total_Disk Used_Disk Total_Memory Used_Memory
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 20 Jun 2017 19:23:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dividing-a-value-by-1000/m-p/358983#M106119</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-06-20T19:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: Dividing a value by 1000</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dividing-a-value-by-1000/m-p/358984#M106120</link>
      <description>&lt;P&gt;This is also not giving the results. Null values are coming.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2017 19:27:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dividing-a-value-by-1000/m-p/358984#M106120</guid>
      <dc:creator>prathapkcsc</dc:creator>
      <dc:date>2017-06-20T19:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: Dividing a value by 1000</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dividing-a-value-by-1000/m-p/358985#M106121</link>
      <description>&lt;P&gt;How about this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base search| rex "^\s*(?&amp;lt;server&amp;gt;[^,]+),\s*(?&amp;lt;NODE&amp;gt;[^,]+),\s*(?&amp;lt;date&amp;gt;\d{4}-\d{2}-\d{2}),\s*(?&amp;lt;time&amp;gt;\d{2}\:\d{2}),\s*(?&amp;lt;Count&amp;gt;\d+),\s*(?&amp;lt;CPU&amp;gt;[^,]+),\s*(?&amp;lt;Total_Disk&amp;gt;[^,]+),\s*(?&amp;lt;Used_Disk&amp;gt;[^,]+),\s*(?&amp;lt;Total_Memory&amp;gt;[^,]+),\s*(?&amp;lt;Used_Memory&amp;gt;\S+)"  
   | eval Total_Disk=tonumber(Total_Disk)/1000 
  | table _time server NODE Count CPU Total_Disk Used_Disk Total_Memory Used_Memory
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 20 Jun 2017 19:32:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dividing-a-value-by-1000/m-p/358985#M106121</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-06-20T19:32:40Z</dc:date>
    </item>
    <item>
      <title>Re: Dividing a value by 1000</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dividing-a-value-by-1000/m-p/358986#M106122</link>
      <description>&lt;P&gt;Perfect !&lt;BR /&gt;
Can you explain that ?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2017 19:38:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dividing-a-value-by-1000/m-p/358986#M106122</guid>
      <dc:creator>prathapkcsc</dc:creator>
      <dc:date>2017-06-20T19:38:00Z</dc:date>
    </item>
    <item>
      <title>Re: Dividing a value by 1000</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dividing-a-value-by-1000/m-p/358987#M106123</link>
      <description>&lt;P&gt;I initially started with fixing the regex, but I believe that was not the issue. The issue could be the wrong case used in Total_Disk field name (used Total_&lt;STRONG&gt;d&lt;/STRONG&gt;isk instead of Total_&lt;STRONG&gt;D&lt;/STRONG&gt;isk), in the last query you posted.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:32:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dividing-a-value-by-1000/m-p/358987#M106123</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2020-09-29T14:32:44Z</dc:date>
    </item>
    <item>
      <title>Re: Dividing a value by 1000</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dividing-a-value-by-1000/m-p/358988#M106124</link>
      <description>&lt;P&gt;That one i tried, no result came.&lt;BR /&gt;
You changed the regex by adding  \d{4}-\d{2}-\d{2})&lt;BR /&gt;
I don't understand,what it does?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2017 19:50:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dividing-a-value-by-1000/m-p/358988#M106124</guid>
      <dc:creator>prathapkcsc</dc:creator>
      <dc:date>2017-06-20T19:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: Dividing a value by 1000</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dividing-a-value-by-1000/m-p/358989#M106125</link>
      <description>&lt;P&gt;\d is for digits. I basically explicitly provided format of date and time fields. I kike to be specific where I can.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2017 20:19:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dividing-a-value-by-1000/m-p/358989#M106125</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-06-20T20:19:18Z</dc:date>
    </item>
  </channel>
</rss>

