<?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: How to get the result of timechart value divided by a number in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-result-of-timechart-value-divided-by-a-number/m-p/452974#M167605</link>
    <description>&lt;P&gt;You are searching for  &lt;CODE&gt;job=* "jobname"&lt;/CODE&gt;, you dedup by &lt;CODE&gt;job&lt;/CODE&gt; and timechart by &lt;CODE&gt;jobname&lt;/CODE&gt;. In another post you have  &lt;CODE&gt;name1&lt;/CODE&gt; and &lt;CODE&gt;url&lt;/CODE&gt; (the latter as a field name). So what are you really searching for?&lt;/P&gt;

&lt;P&gt;And regarding this "devided by 6" - do you really want to divide? Why are you sure your number should be "like dividing the jobname by 6"?&lt;/P&gt;

&lt;P&gt;Would be great to get an understanding of the underlying data.&lt;/P&gt;</description>
    <pubDate>Thu, 13 Sep 2018 08:29:04 GMT</pubDate>
    <dc:creator>rvany</dc:creator>
    <dc:date>2018-09-13T08:29:04Z</dc:date>
    <item>
      <title>How to get the result of timechart value divided by a number</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-result-of-timechart-value-divided-by-a-number/m-p/452962#M167593</link>
      <description>&lt;P&gt;search command&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host= index= sourcetype=syslog job=* "jobname" | dedub job | fields - _raw  | timechart span=1d count by jobname
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I get the result as&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;_time                                jobname
2018-09-08                       24
2018-09-07                       12
2018-09-06                       36
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But I need the result as below     ( like dividing the jobname field value by 6)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;_time                 jobname
2018-09-08        4
2018-09-07        2
2018-09-06        6
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please suggest.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Sep 2018 07:56:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-result-of-timechart-value-divided-by-a-number/m-p/452962#M167593</guid>
      <dc:creator>mindia</dc:creator>
      <dc:date>2018-09-10T07:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the result of timechart value divided by a number</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-result-of-timechart-value-divided-by-a-number/m-p/452963#M167594</link>
      <description>&lt;P&gt;@mindia,&lt;/P&gt;

&lt;P&gt;There are multiple ways to do it.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host= index= sourcetype=syslog job=* "jobname" | dedub job | fields - _raw | timechart span=1d count by jobname|untable _time,jobname,count|eval count=count/6|xyseries _time,jobname,count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;OR&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host= index= sourcetype=syslog job=* "jobname" | dedub job | fields - _raw | timechart span=1d count by jobname|foreach * [eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;=&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;/6]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Sep 2018 12:14:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-result-of-timechart-value-divided-by-a-number/m-p/452963#M167594</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-09-10T12:14:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the result of timechart value divided by a number</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-result-of-timechart-value-divided-by-a-number/m-p/452964#M167595</link>
      <description>&lt;P&gt;hi @mindia,&lt;/P&gt;

&lt;P&gt;Did the answer below solve your problem? If so, please resolve this post by approving it! &lt;BR /&gt;
If your problem is still not solved, keep us updated so that someone else can help ya.&lt;BR /&gt;
Thanks for posting!&lt;/P&gt;</description>
      <pubDate>Mon, 10 Sep 2018 22:21:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-result-of-timechart-value-divided-by-a-number/m-p/452964#M167595</guid>
      <dc:creator>mstjohn_splunk</dc:creator>
      <dc:date>2018-09-10T22:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the result of timechart value divided by a number</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-result-of-timechart-value-divided-by-a-number/m-p/452965#M167596</link>
      <description>&lt;P&gt;Actually both commands did not help here. My search is slightly different.&lt;/P&gt;

&lt;P&gt;The logs contain job ids and  url = "&lt;A href="https://url/"&gt;https://url/&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;I am searching for the  and count by I am specifying url&lt;/P&gt;

&lt;P&gt;host= index= sourcetype=syslog job=* "" | dedub job | fields - _raw | timechart span=1d count by url&lt;/P&gt;

&lt;P&gt;I tried below search using foreach&lt;/P&gt;

&lt;P&gt;host= index= sourcetype=syslog job=* "" | dedub job | fields - _raw | timechart span=1d count by url |foreach * [eval &amp;lt;&amp;gt;=&amp;lt;&amp;gt;/6]  &lt;/P&gt;

&lt;P&gt;.. it displayed the same result..    actually what to substitute for FIELD is not clear. &lt;/P&gt;

&lt;P&gt;The another commend  using untable was not able execute. it gave errors.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Sep 2018 10:57:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-result-of-timechart-value-divided-by-a-number/m-p/452965#M167596</guid>
      <dc:creator>mindia</dc:creator>
      <dc:date>2018-09-11T10:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the result of timechart value divided by a number</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-result-of-timechart-value-divided-by-a-number/m-p/452966#M167597</link>
      <description>&lt;P&gt;The logs contain job ids and url = "&lt;A href="https://url/name1"&gt;https://url/name1&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;I am searching for the name1 and count by I am specifying 'url'&lt;/P&gt;

&lt;P&gt;host= index= sourcetype=syslog job=* "name1" | dedub job | fields - _raw | timechart span=1d count by url&lt;/P&gt;

&lt;P&gt;similarly I would try for name2&lt;/P&gt;

&lt;P&gt;host= index= sourcetype=syslog job=* "name2" | dedub job | fields - _raw | timechart span=1d count by url&lt;/P&gt;</description>
      <pubDate>Tue, 11 Sep 2018 14:26:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-result-of-timechart-value-divided-by-a-number/m-p/452966#M167597</guid>
      <dc:creator>mindia</dc:creator>
      <dc:date>2018-09-11T14:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the result of timechart value divided by a number</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-result-of-timechart-value-divided-by-a-number/m-p/452967#M167598</link>
      <description>&lt;P&gt;@mindia, for the foreach you dont need to substitute anything , just use FIELD as it is. &lt;/P&gt;

&lt;P&gt;What's the error in untable ? &lt;/P&gt;

&lt;P&gt;In the result after timechart , how many columns are you getting ? I mean is it _time,jobname1,jobname2 or is it only one job name ?&lt;/P&gt;

&lt;P&gt;Below is a run anywhere example you could use and compare&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_* earliest=-15m |timechart span=5m count by sourcetype|untable _time,sourcetype,count|eval count=count/6|xyseries _time,sourcetype,count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Sep 2018 02:19:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-result-of-timechart-value-divided-by-a-number/m-p/452967#M167598</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-09-12T02:19:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the result of timechart value divided by a number</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-result-of-timechart-value-divided-by-a-number/m-p/452968#M167599</link>
      <description>&lt;P&gt;Both of the solutions provided by @renjith.nair should have worked.  Here's a third...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=foo index=bar sourcetype=syslog job=* "jobname" 
| dedup job 
| eval quarter= 0.25
| timechart span=1d sum(quarter) by url
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And here's a fourth ...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=foo index=bar sourcetype=syslog job=* "jobname" 
| dedup job 
| timechart span=6h count by url
| bin _time span=1d
| stats avg(*) as * by _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And I'm tempted to come up with a fifth, just for grins.&lt;/P&gt;

&lt;P&gt;All of these should work, given your stated requirements.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Sep 2018 03:09:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-result-of-timechart-value-divided-by-a-number/m-p/452968#M167599</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2018-09-12T03:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the result of timechart value divided by a number</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-result-of-timechart-value-divided-by-a-number/m-p/452969#M167600</link>
      <description>&lt;P&gt;@renjith.nair nothing worked &lt;/P&gt;

&lt;P&gt;the log contains  job ids and urls. URL ex: &lt;STRONG&gt;&lt;A href="http://website/names"&gt;http://website/names&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;the query is&lt;/P&gt;

&lt;P&gt;host="hostname" index="indexname" sourcetype="syslog" job=* &lt;STRONG&gt;"&lt;A href="http://website/name1"&gt;http://website/name1&lt;/A&gt;"&lt;/STRONG&gt; | dedup job | fields - _raw &lt;BR /&gt;
| timechart span=1d count by url&lt;/P&gt;

&lt;P&gt;I get the result as&lt;/P&gt;

&lt;P&gt;_time                                jobname&lt;BR /&gt;
 2018-09-08                       24&lt;BR /&gt;
 2018-09-07                       12&lt;BR /&gt;
 2018-09-06                       36&lt;BR /&gt;
But I need the result as below ( like dividing the jobname field value by 6)&lt;/P&gt;

&lt;P&gt;_time                 jobname&lt;BR /&gt;
 2018-09-08        4&lt;BR /&gt;
 2018-09-07        2&lt;BR /&gt;
 2018-09-06        6&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 06:16:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-result-of-timechart-value-divided-by-a-number/m-p/452969#M167600</guid>
      <dc:creator>mindia</dc:creator>
      <dc:date>2018-09-13T06:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the result of timechart value divided by a number</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-result-of-timechart-value-divided-by-a-number/m-p/452970#M167601</link>
      <description>&lt;P&gt;Not yet.....&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 06:18:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-result-of-timechart-value-divided-by-a-number/m-p/452970#M167601</guid>
      <dc:creator>mindia</dc:creator>
      <dc:date>2018-09-13T06:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the result of timechart value divided by a number</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-result-of-timechart-value-divided-by-a-number/m-p/452971#M167602</link>
      <description>&lt;P&gt;Logs contain job ids and urls&lt;/P&gt;

&lt;P&gt;Ex: job=23  url=&lt;A href="http://website/names"&gt;http://website/names&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Make a note, url contains names, whereas I am searching for each name. like name1, name2, etc.&lt;/P&gt;

&lt;P&gt;host= index= sourcetype=syslog job=* "&lt;A href="http://website/name1"&gt;http://website/name1&lt;/A&gt;" | dedub job | fields - _raw  | timechart span=1d count by url&lt;/P&gt;

&lt;P&gt;Splunk search returns results like below&lt;/P&gt;

&lt;P&gt;_time                                name1&lt;BR /&gt;
 2018-09-08                       24&lt;BR /&gt;
 2018-09-07                       12&lt;BR /&gt;
 2018-09-06                       36&lt;/P&gt;

&lt;P&gt;But I need the result as below ( like dividing the name1 field value by 6)&lt;/P&gt;

&lt;P&gt;_time                 name1&lt;BR /&gt;
 2018-09-08        4&lt;BR /&gt;
 2018-09-07        2&lt;BR /&gt;
 2018-09-06        6&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 06:22:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-result-of-timechart-value-divided-by-a-number/m-p/452971#M167602</guid>
      <dc:creator>mindia</dc:creator>
      <dc:date>2018-09-13T06:22:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the result of timechart value divided by a number</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-result-of-timechart-value-divided-by-a-number/m-p/452972#M167603</link>
      <description>&lt;P&gt;Maybe the shortest solution is to write "dedup" (instead of dedub)?&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 07:21:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-result-of-timechart-value-divided-by-a-number/m-p/452972#M167603</guid>
      <dc:creator>rvany</dc:creator>
      <dc:date>2018-09-13T07:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the result of timechart value divided by a number</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-result-of-timechart-value-divided-by-a-number/m-p/452973#M167604</link>
      <description>&lt;P&gt;it is already dedup..  its a typo here.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 07:46:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-result-of-timechart-value-divided-by-a-number/m-p/452973#M167604</guid>
      <dc:creator>mindia</dc:creator>
      <dc:date>2018-09-13T07:46:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the result of timechart value divided by a number</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-result-of-timechart-value-divided-by-a-number/m-p/452974#M167605</link>
      <description>&lt;P&gt;You are searching for  &lt;CODE&gt;job=* "jobname"&lt;/CODE&gt;, you dedup by &lt;CODE&gt;job&lt;/CODE&gt; and timechart by &lt;CODE&gt;jobname&lt;/CODE&gt;. In another post you have  &lt;CODE&gt;name1&lt;/CODE&gt; and &lt;CODE&gt;url&lt;/CODE&gt; (the latter as a field name). So what are you really searching for?&lt;/P&gt;

&lt;P&gt;And regarding this "devided by 6" - do you really want to divide? Why are you sure your number should be "like dividing the jobname by 6"?&lt;/P&gt;

&lt;P&gt;Would be great to get an understanding of the underlying data.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 08:29:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-result-of-timechart-value-divided-by-a-number/m-p/452974#M167605</guid>
      <dc:creator>rvany</dc:creator>
      <dc:date>2018-09-13T08:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the result of timechart value divided by a number</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-result-of-timechart-value-divided-by-a-number/m-p/452975#M167606</link>
      <description>&lt;P&gt;name1 is the actual.. I had explained with example.  I need not to be exactly 6 it can be any number but I want to specify.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Sep 2018 06:45:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-result-of-timechart-value-divided-by-a-number/m-p/452975#M167606</guid>
      <dc:creator>mindia</dc:creator>
      <dc:date>2018-09-14T06:45:19Z</dc:date>
    </item>
  </channel>
</rss>

