<?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: Trend values on x-axis and y-axis by serv in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Trend-values-on-x-axis-and-y-axis-by-serv/m-p/370212#M165880</link>
    <description>&lt;P&gt;@DalJeanis,&lt;/P&gt;

&lt;P&gt;By using &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=... sourcetype=... 
| rex "(?&amp;lt;totaltime&amp;gt;) and (?&amp;lt;duration&amp;gt;\w+) and (?&amp;lt;serv&amp;gt;)" 
| table totaltime,duration,source
| timechart or chart would like to populate totaltime in x-axis and duration in y-axis for each serv
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;from the sample data highlighted for Full GC &lt;BR /&gt;
28820.220 is totaltime&lt;BR /&gt;
0.0261704 is duration&lt;BR /&gt;
and the serv will extract from my source which is a default extract.&lt;BR /&gt;
any sort of suggestion would be helpful to create a graph&lt;/P&gt;</description>
    <pubDate>Sat, 30 Sep 2017 13:42:26 GMT</pubDate>
    <dc:creator>nagaraju_chitta</dc:creator>
    <dc:date>2017-09-30T13:42:26Z</dc:date>
    <item>
      <title>Trend values on x-axis and y-axis by serv</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trend-values-on-x-axis-and-y-axis-by-serv/m-p/370209#M165877</link>
      <description>&lt;P&gt;index=... sourcetype=... &lt;BR /&gt;
| rex "(?) and (?\w+) and (?)" &lt;BR /&gt;
| table  totaltime,duration&lt;BR /&gt;
| timechart or chart would like to populate totaltime in x-axis and duration in y-axis for each serv&lt;/P&gt;

&lt;P&gt;would like to show trend line graph based on the values of "totaltime" in x-axis and "duration" in y-axis for each "serv". Assume the below sample from "serv1". for serv2,serve3,etc has to show on the graph&lt;/P&gt;

&lt;P&gt;sample data:&lt;BR /&gt;
&lt;STRONG&gt;28820.220&lt;/STRONG&gt;: [Full GC (System.gc()) 8832K-&amp;gt;8624K(37888K), &lt;STRONG&gt;0.0261704 secs&lt;/STRONG&gt;]&lt;BR /&gt;
29372.500: [GC (Allocation Failure) 23984K-&amp;gt;8816K(37888K), 0.0013546 secs]&lt;BR /&gt;
29932.500: [GC (Allocation Failure) 24176K-&amp;gt;8808K(37888K), 0.0017082 secs]&lt;BR /&gt;
30492.500: [GC (Allocation Failure) 24168K-&amp;gt;8960K(37888K), 0.0017122 secs]&lt;BR /&gt;
31047.500: [GC (Allocation Failure) 24320K-&amp;gt;8944K(37888K), 0.0020634 secs]&lt;BR /&gt;
31602.500: [GC (Allocation Failure) 24304K-&amp;gt;8992K(37888K), 0.0017542 secs]&lt;BR /&gt;
32157.500: [GC (Allocation Failure) 24352K-&amp;gt;8968K(37888K), 0.0018971 secs]&lt;BR /&gt;
32420.247: [GC (System.gc()) 16160K-&amp;gt;8944K(37888K), 0.0012816 secs] &lt;BR /&gt;
8186.000: [GC (Allocation Failure)  91332K-&amp;gt;36212K(246272K), 0.0081127 secs]&lt;BR /&gt;
8347.676: [GC (System.gc())  42225K-&amp;gt;35996K(246272K), 0.0040077 secs]&lt;BR /&gt;
&lt;STRONG&gt;8347.678:&lt;/STRONG&gt; [Full GC (System.gc())  35996K-&amp;gt;21313K(246272K), &lt;STRONG&gt;0.1147433 secs&lt;/STRONG&gt;]&lt;BR /&gt;
8929.342: [GC (Allocation Failure)  76609K-&amp;gt;24356K(246784K), 0.0047687 secs]&lt;BR /&gt;
8952.577: [GC (Allocation Failure)  80164K-&amp;gt;29098K(246272K), 0.0053928 secs]&lt;BR /&gt;
9921.694: [GC (Allocation Failure)  84906K-&amp;gt;27626K(247808K), 0.0053474 secs]&lt;BR /&gt;
11567.840: [GC (Allocation Failure)  85994K-&amp;gt;27730K(247808K), 0.0030062 secs]&lt;BR /&gt;
11947.795: [GC (System.gc())  41757K-&amp;gt;27562K(248320K), 0.0035917 secs]&lt;BR /&gt;
&lt;STRONG&gt;11947.797&lt;/STRONG&gt;: [Full GC (System.gc())  27562K-&amp;gt;22923K(248320K), &lt;STRONG&gt;0.1237187 secs&lt;/STRONG&gt;]&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2017 17:46:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trend-values-on-x-axis-and-y-axis-by-serv/m-p/370209#M165877</guid>
      <dc:creator>nagaraju_chitta</dc:creator>
      <dc:date>2017-09-29T17:46:58Z</dc:date>
    </item>
    <item>
      <title>Re: Trend values on x-axis and y-axis by serv</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trend-values-on-x-axis-and-y-axis-by-serv/m-p/370210#M165878</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=... sourcetype=... 
| rex "(?) and (?\w+) and (?)" 
| timechart duration by server | trendline sma2(duration ) AS Duration


&lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/6.6.1/SearchReference/Trendline" target="test_blank"&gt;https://docs.splunk.com/Documentation/SplunkCloud/6.6.1/SearchReference/Trendline&lt;/A&gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Sep 2017 18:39:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trend-values-on-x-axis-and-y-axis-by-serv/m-p/370210#M165878</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2017-09-29T18:39:02Z</dc:date>
    </item>
    <item>
      <title>Re: Trend values on x-axis and y-axis by serv</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trend-values-on-x-axis-and-y-axis-by-serv/m-p/370211#M165879</link>
      <description>&lt;P&gt;@nagaraju_chittathuru - &lt;/P&gt;

&lt;P&gt;1)Please be sure to mark your code (with the 1010 010 button, for example) so that the system does not delete HTML-like features.  &lt;/P&gt;

&lt;P&gt;2) Your rex appears to be pulling three values, but you have only mentioned two other than server, and there is no server name in the data sample.&lt;/P&gt;

&lt;P&gt;3) Please identify how the values for server, totaltime and duration are supposed to be determined based on the data.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2017 18:39:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trend-values-on-x-axis-and-y-axis-by-serv/m-p/370211#M165879</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-09-29T18:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: Trend values on x-axis and y-axis by serv</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trend-values-on-x-axis-and-y-axis-by-serv/m-p/370212#M165880</link>
      <description>&lt;P&gt;@DalJeanis,&lt;/P&gt;

&lt;P&gt;By using &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=... sourcetype=... 
| rex "(?&amp;lt;totaltime&amp;gt;) and (?&amp;lt;duration&amp;gt;\w+) and (?&amp;lt;serv&amp;gt;)" 
| table totaltime,duration,source
| timechart or chart would like to populate totaltime in x-axis and duration in y-axis for each serv
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;from the sample data highlighted for Full GC &lt;BR /&gt;
28820.220 is totaltime&lt;BR /&gt;
0.0261704 is duration&lt;BR /&gt;
and the serv will extract from my source which is a default extract.&lt;BR /&gt;
any sort of suggestion would be helpful to create a graph&lt;/P&gt;</description>
      <pubDate>Sat, 30 Sep 2017 13:42:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trend-values-on-x-axis-and-y-axis-by-serv/m-p/370212#M165880</guid>
      <dc:creator>nagaraju_chitta</dc:creator>
      <dc:date>2017-09-30T13:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: Trend values on x-axis and y-axis by serv</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trend-values-on-x-axis-and-y-axis-by-serv/m-p/370213#M165881</link>
      <description>&lt;P&gt;@Sukisen: thanks for reply.please read the post about my requirement and let me know any suggestions.would like to populate the totaltime values on x-axis and duration on y-axis by serv name where serv name comes from the file name which includes in the source.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Sep 2017 19:11:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trend-values-on-x-axis-and-y-axis-by-serv/m-p/370213#M165881</guid>
      <dc:creator>nagaraju_chitta</dc:creator>
      <dc:date>2017-09-30T19:11:20Z</dc:date>
    </item>
    <item>
      <title>Re: Trend values on x-axis and y-axis by serv</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trend-values-on-x-axis-and-y-axis-by-serv/m-p/370214#M165882</link>
      <description>&lt;P&gt;hi can you post what the output of your table command looks like in the statistics tab?&lt;/P&gt;</description>
      <pubDate>Sun, 01 Oct 2017 10:23:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trend-values-on-x-axis-and-y-axis-by-serv/m-p/370214#M165882</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2017-10-01T10:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: Trend values on x-axis and y-axis by serv</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trend-values-on-x-axis-and-y-axis-by-serv/m-p/370215#M165883</link>
      <description>&lt;P&gt;@Sukisen1981...below is the data the chart or timechart supposed to populate from the sampledata provided in the post&lt;BR /&gt;
totaltime:&lt;BR /&gt;
28820.220&lt;BR /&gt;
8347.678&lt;BR /&gt;
11947.797&lt;/P&gt;

&lt;P&gt;duration:&lt;BR /&gt;
0.0261704 &lt;BR /&gt;
0.1147433 &lt;BR /&gt;
0.1237187&lt;/P&gt;

&lt;P&gt;serv name from the filename which is source&lt;BR /&gt;
serv1&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2017 07:44:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trend-values-on-x-axis-and-y-axis-by-serv/m-p/370215#M165883</guid>
      <dc:creator>nagaraju_chitta</dc:creator>
      <dc:date>2017-10-02T07:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: Trend values on x-axis and y-axis by serv</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trend-values-on-x-axis-and-y-axis-by-serv/m-p/370216#M165884</link>
      <description>&lt;P&gt;@nagaraju_chittathuru, you need to provide more specifics for us to assist you:&lt;/P&gt;

&lt;P&gt;1) You are missing regular expression from the rex command to fetch totaltime and duration. Based on your current data and one of your previous command it should be &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex "^(?&amp;lt;totaltime&amp;gt;[^:]+):\s+\[Full GC\s\(([^\)]+)\)\)\s+(?&amp;lt;field1&amp;gt;\d+)K-\&amp;gt;(?&amp;lt;field2&amp;gt;\d+)K\((?&amp;lt;field3&amp;gt;\d+)K\),\s+(?&amp;lt;duration&amp;gt;[^\s]+)\ssecs\]" 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;2) You have mentioned &lt;CODE&gt;serv&lt;/CODE&gt; field but from your example it is not clear as to what is the regular expression for &lt;CODE&gt;serv&lt;/CODE&gt;field and what is its regular expression. Please clarify.&lt;/P&gt;

&lt;P&gt;3) You have extracted serv but using &lt;CODE&gt;source&lt;/CODE&gt; in your table. Do you really need &lt;CODE&gt;serv&lt;/CODE&gt; field? Do you need to get latest values of totaltome and duration by every source? If this is what you want then following should be your query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;YourBaseSearch&amp;gt;
| table totaltime,duration,source
| stats last(totaltime) as totaltime last(duration) as duration by source
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;PS: Timechart uses epoch time as x-axis time field. Since you do not have epoch time in your query you can not run the time chart command.&lt;/P&gt;

&lt;P&gt;Read about transforming commands like stats (&lt;A href="http://docs.splunk.com/Documentation/SplunkCloud/latest/SearchReference/Stats"&gt;http://docs.splunk.com/Documentation/SplunkCloud/latest/SearchReference/Stats&lt;/A&gt;) and timechart (&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Timechart"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Timechart&lt;/A&gt;)  etc. to understand how and when to use these. Also read about Statistical and Charting functions available for these (&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/CommonStatsFunctions#Types_of_statistical_and_charting_functions"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/CommonStatsFunctions#Types_of_statistical_and_charting_functions&lt;/A&gt; )&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2017 08:48:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trend-values-on-x-axis-and-y-axis-by-serv/m-p/370216#M165884</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-10-02T08:48:01Z</dc:date>
    </item>
    <item>
      <title>Re: Trend values on x-axis and y-axis by serv</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trend-values-on-x-axis-and-y-axis-by-serv/m-p/370217#M165885</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| stats values(duration) as dur by server,totaltime
| eval  {dur}/{server}=dur 
| fields - server, - dur
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 02 Oct 2017 10:52:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trend-values-on-x-axis-and-y-axis-by-serv/m-p/370217#M165885</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2017-10-02T10:52:28Z</dc:date>
    </item>
    <item>
      <title>Re: Trend values on x-axis and y-axis by serv</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trend-values-on-x-axis-and-y-axis-by-serv/m-p/370218#M165886</link>
      <description>&lt;P&gt;@niketnilay&lt;BR /&gt;
Below are the clarifications&lt;BR /&gt;
1. by using the REGEX that you have specified .am trying to extract totaltime and duration&lt;BR /&gt;
2. serv is the part of source and I am extracting it from source by using split&lt;BR /&gt;
3. need to get latest values of totaltime and duration by every source and show this as a trend.&lt;BR /&gt;
advise if any? below is the regex and chart using and expected results are not getting. Needs to populate the values of totaltime and duration for each serv(source)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;rex max_match=0 field=_raw "(?m)^(?&amp;lt;timestamp&amp;gt;[^:]+):\s+\[(?&amp;lt;FullGCEvents&amp;gt;Full.*)\s+(?&amp;lt;field1&amp;gt;\d+)K-\&amp;gt;(?&amp;lt;field2&amp;gt;\d+)K\((?&amp;lt;field3&amp;gt;\d+)K\),\s+(?&amp;lt;gctime&amp;gt;[^\s]+)\ssecs\]" |  chart max(gctime) as Duration by timestamp
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 02 Oct 2017 21:37:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trend-values-on-x-axis-and-y-axis-by-serv/m-p/370218#M165886</guid>
      <dc:creator>nagaraju_chitta</dc:creator>
      <dc:date>2017-10-02T21:37:49Z</dc:date>
    </item>
    <item>
      <title>Re: Trend values on x-axis and y-axis by serv</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trend-values-on-x-axis-and-y-axis-by-serv/m-p/370219#M165887</link>
      <description>&lt;P&gt;@Sukisen1981&lt;BR /&gt;
thanks again and no results and chart are displaying when i followed. any otherway to populate only values not the statistics as mentioned in the below rex&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;rex max_match=0 field=_raw "(?m)^(?&amp;lt;timestamp&amp;gt;[^:]+):\s+\[(?&amp;lt;FullGCEvents&amp;gt;Full.*)\s+(?&amp;lt;field1&amp;gt;\d+)K-\&amp;gt;(?&amp;lt;field2&amp;gt;\d+)K\((?&amp;lt;field3&amp;gt;\d+)K\),\s+(?&amp;lt;gctime&amp;gt;[^\s]+)\ssecs\]" |  chart max(gctime) as Duration by timestamp
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 02 Oct 2017 21:40:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trend-values-on-x-axis-and-y-axis-by-serv/m-p/370219#M165887</guid>
      <dc:creator>nagaraju_chitta</dc:creator>
      <dc:date>2017-10-02T21:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: Trend values on x-axis and y-axis by serv</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trend-values-on-x-axis-and-y-axis-by-serv/m-p/370220#M165888</link>
      <description>&lt;P&gt;Hi, &lt;BR /&gt;
I don't know what you are trying.....please refer to my screen shot and tell me if its somewhat near to your needs&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/3592iFE90BF8B030B2898/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2017 17:13:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trend-values-on-x-axis-and-y-axis-by-serv/m-p/370220#M165888</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2017-10-04T17:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: Trend values on x-axis and y-axis by serv</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trend-values-on-x-axis-and-y-axis-by-serv/m-p/370221#M165889</link>
      <description>&lt;P&gt;@Sukisen1981: my requirement is simple. just need a trend line out of the below data. also posting my statisticstab and visualizationtab images&lt;/P&gt;

&lt;P&gt;totaltime:&lt;BR /&gt;
28820.220&lt;BR /&gt;
8347.678&lt;BR /&gt;
11947.797&lt;/P&gt;

&lt;P&gt;duration:&lt;BR /&gt;
0.0261704 &lt;BR /&gt;
0.1147433 &lt;BR /&gt;
0.1237187&lt;/P&gt;

&lt;P&gt;how will you populate the totaltime on x-axis and duration on y-axis?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;     | stats values(totaltime) as totdur values(Duration) as duration
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/3593i7AEE1B4CE2C543E2/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2017 17:26:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trend-values-on-x-axis-and-y-axis-by-serv/m-p/370221#M165889</guid>
      <dc:creator>nagaraju_chitta</dc:creator>
      <dc:date>2017-10-06T17:26:25Z</dc:date>
    </item>
  </channel>
</rss>

