<?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 Line Graphs Dynamic Line in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Line-Graphs-Dynamic-Line/m-p/37493#M8390</link>
    <description>&lt;P&gt;Finally getting used to Splunk and have it importing my data from a database.&lt;/P&gt;

&lt;P&gt;Now I'm working on generating a line chart that plots out the recorded load to a database. We would like to look over a particular load and see how the load is across multiple days so we can identify unusual drops. This would include stuff like:&lt;/P&gt;

&lt;P&gt;Row_Count=123
Error_Count=0
Average_Row_Count=120
Tolerance_Percentage=10&lt;/P&gt;

&lt;P&gt;So I can plot out the Row, Average Row and Error fine.&lt;/P&gt;

&lt;P&gt;But now I want to include the Tolerance Percentage which is the standard deviation from the average row count, i.e. a line at 108 and a line at 132.&lt;/P&gt;

&lt;P&gt;| stats list(AVG_ROW_CNT_NBR) AS AVERAGE_ROW_COUNT, list(ROW_CNT_NBR) AS ROW_COUNT, list(ERR_CNT_NBR) AS ERROR_COUNT, list(((AVG_ROW_CNT_NBR/100) * TLRNC_ALLOW_PCT) - AVG_ROW_CNT_NBR) AS TOLERANCE_MIN BY LOAD_MNTR_RUN_ID, JOB_NAME&lt;/P&gt;

&lt;P&gt;Gives out about using *&lt;/P&gt;

&lt;P&gt;| stats list(AVG_ROW_CNT_NBR) AS AVERAGE_ROW_COUNT, list(ROW_CNT_NBR) AS ROW_COUNT, list(ERR_CNT_NBR) AS ERROR_COUNT BY LOAD_MNTR_RUN_ID, JOB_NAME | eval TOLERANCE_MIN=(((AVG_ROW_CNT_NBR/100) * TLRNC_ALLOW_PCT) - AVG_ROW_CNT_NBR)&lt;/P&gt;

&lt;P&gt;Just doesnt report TOLERANCE_MIN.&lt;/P&gt;

&lt;P&gt;Pretty sure I am missing something basic here..&lt;/P&gt;</description>
    <pubDate>Wed, 02 Feb 2011 22:43:14 GMT</pubDate>
    <dc:creator>JohnDoyle</dc:creator>
    <dc:date>2011-02-02T22:43:14Z</dc:date>
    <item>
      <title>Line Graphs Dynamic Line</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Line-Graphs-Dynamic-Line/m-p/37493#M8390</link>
      <description>&lt;P&gt;Finally getting used to Splunk and have it importing my data from a database.&lt;/P&gt;

&lt;P&gt;Now I'm working on generating a line chart that plots out the recorded load to a database. We would like to look over a particular load and see how the load is across multiple days so we can identify unusual drops. This would include stuff like:&lt;/P&gt;

&lt;P&gt;Row_Count=123
Error_Count=0
Average_Row_Count=120
Tolerance_Percentage=10&lt;/P&gt;

&lt;P&gt;So I can plot out the Row, Average Row and Error fine.&lt;/P&gt;

&lt;P&gt;But now I want to include the Tolerance Percentage which is the standard deviation from the average row count, i.e. a line at 108 and a line at 132.&lt;/P&gt;

&lt;P&gt;| stats list(AVG_ROW_CNT_NBR) AS AVERAGE_ROW_COUNT, list(ROW_CNT_NBR) AS ROW_COUNT, list(ERR_CNT_NBR) AS ERROR_COUNT, list(((AVG_ROW_CNT_NBR/100) * TLRNC_ALLOW_PCT) - AVG_ROW_CNT_NBR) AS TOLERANCE_MIN BY LOAD_MNTR_RUN_ID, JOB_NAME&lt;/P&gt;

&lt;P&gt;Gives out about using *&lt;/P&gt;

&lt;P&gt;| stats list(AVG_ROW_CNT_NBR) AS AVERAGE_ROW_COUNT, list(ROW_CNT_NBR) AS ROW_COUNT, list(ERR_CNT_NBR) AS ERROR_COUNT BY LOAD_MNTR_RUN_ID, JOB_NAME | eval TOLERANCE_MIN=(((AVG_ROW_CNT_NBR/100) * TLRNC_ALLOW_PCT) - AVG_ROW_CNT_NBR)&lt;/P&gt;

&lt;P&gt;Just doesnt report TOLERANCE_MIN.&lt;/P&gt;

&lt;P&gt;Pretty sure I am missing something basic here..&lt;/P&gt;</description>
      <pubDate>Wed, 02 Feb 2011 22:43:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Line-Graphs-Dynamic-Line/m-p/37493#M8390</guid>
      <dc:creator>JohnDoyle</dc:creator>
      <dc:date>2011-02-02T22:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: Line Graphs Dynamic Line</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Line-Graphs-Dynamic-Line/m-p/37494#M8391</link>
      <description>&lt;P&gt;You dont want to use stats list like this.  This will give you one result row that has lots of multi-valued values.   Although it sort of looks like what you want, it isnt. &lt;/P&gt;

&lt;P&gt;I think this might be closer to what you're looking for: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your search&amp;gt;
| eval Row_Count_Lower = Row_Count - Tolerance_Percentage
| eval Row_Count_Upper = Row_Count + Tolerance_Percentage | 
| timechart avg(Row_Count_Lower) avg(Row_Count) avg(Row_Count_Upper) avg(Error_Count) span=1h 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The output of that chart will get graphed as 4 lines, and the legend will show that one of the lines is the Row_Count minus the tolerance, one is the Row_Count itself, one is the Row_Count plus the tolerance. &lt;/P&gt;

&lt;P&gt;If you're more interested in maxima and minima, just add in some &lt;CODE&gt;max(Row_Count_Upper)&lt;/CODE&gt; etc as necessary.&lt;/P&gt;

&lt;P&gt;Note: If you're trying to generate graphs your best bet is to always use the &lt;CODE&gt;chart&lt;/CODE&gt; and &lt;CODE&gt;timechart&lt;/CODE&gt; commands.  &lt;/P&gt;

&lt;P&gt;&lt;A href="http://www.splunk.com/base/Documentation/latest/SearchReference/CommonStatsFunctions" rel="nofollow"&gt;http://www.splunk.com/base/Documentation/latest/SearchReference/CommonStatsFunctions&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Feb 2011 03:31:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Line-Graphs-Dynamic-Line/m-p/37494#M8391</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2011-02-03T03:31:40Z</dc:date>
    </item>
  </channel>
</rss>

