<?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 extract fields and plot graphs based on the field values in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/extract-fields-and-plot-graphs-based-on-the-field-values/m-p/81951#M4408</link>
    <description>&lt;P&gt;scenario:&lt;/P&gt;

&lt;P&gt;have pushed snmp poll data as an event to splunk as a TCP source.&lt;BR /&gt;
     event format = "parameterId=paramterValue"&lt;BR /&gt;
     event source = SNMPTCP&lt;/P&gt;

&lt;P&gt;to-do: need to find minute average of "parameterValue" for a particular "parameterId"&lt;/P&gt;

&lt;P&gt;sample event data:&lt;/P&gt;

&lt;P&gt;Timestamp       event data&lt;/P&gt;

&lt;P&gt;5:44:13.000 PM  908=51&lt;/P&gt;

&lt;P&gt;5:43:58.000 PM  908=14&lt;/P&gt;

&lt;P&gt;5:43:47.000 PM  908=18&lt;/P&gt;

&lt;P&gt;5:43:36.000 PM  908=49&lt;/P&gt;

&lt;P&gt;5:43:25.000 PM  908=88&lt;/P&gt;

&lt;P&gt;5:43:14.000 PM  908=80&lt;/P&gt;

&lt;P&gt;5:42:58.000 PM  908=98&lt;/P&gt;

&lt;P&gt;5:42:47.000 PM  908=55&lt;/P&gt;

&lt;P&gt;5:42:36.000 PM  908=43&lt;/P&gt;

&lt;P&gt;5:42:20.000 PM  908=13&lt;/P&gt;

&lt;P&gt;when given as a minute wise report&lt;/P&gt;

&lt;P&gt;search query - "sourcetype="SNMPTCP" | timechart span 1m count"&lt;/P&gt;

&lt;P&gt;5.42 - 4&lt;/P&gt;

&lt;P&gt;5.43 - 5&lt;/P&gt;

&lt;P&gt;5.44 - 1&lt;/P&gt;

&lt;P&gt;but to calculate the parameterValue as follows,&lt;/P&gt;

&lt;P&gt;5.42 -  ( 13 + 43 + 55 + 98 ) / 4 = 52&lt;/P&gt;

&lt;P&gt;5.43 -  ( 14 + 18 + 49 + 88 + 80 ) / 5 = 49.8&lt;/P&gt;

&lt;P&gt;5.44 - 51 / 1 = 51&lt;/P&gt;

&lt;P&gt;what is the query to be executed. i tried extract command but in vain. A sample command will be really helpful.&lt;/P&gt;

&lt;P&gt;thanks in advance.&lt;/P&gt;</description>
    <pubDate>Tue, 02 Apr 2013 14:05:32 GMT</pubDate>
    <dc:creator>muraliv</dc:creator>
    <dc:date>2013-04-02T14:05:32Z</dc:date>
    <item>
      <title>extract fields and plot graphs based on the field values</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/extract-fields-and-plot-graphs-based-on-the-field-values/m-p/81951#M4408</link>
      <description>&lt;P&gt;scenario:&lt;/P&gt;

&lt;P&gt;have pushed snmp poll data as an event to splunk as a TCP source.&lt;BR /&gt;
     event format = "parameterId=paramterValue"&lt;BR /&gt;
     event source = SNMPTCP&lt;/P&gt;

&lt;P&gt;to-do: need to find minute average of "parameterValue" for a particular "parameterId"&lt;/P&gt;

&lt;P&gt;sample event data:&lt;/P&gt;

&lt;P&gt;Timestamp       event data&lt;/P&gt;

&lt;P&gt;5:44:13.000 PM  908=51&lt;/P&gt;

&lt;P&gt;5:43:58.000 PM  908=14&lt;/P&gt;

&lt;P&gt;5:43:47.000 PM  908=18&lt;/P&gt;

&lt;P&gt;5:43:36.000 PM  908=49&lt;/P&gt;

&lt;P&gt;5:43:25.000 PM  908=88&lt;/P&gt;

&lt;P&gt;5:43:14.000 PM  908=80&lt;/P&gt;

&lt;P&gt;5:42:58.000 PM  908=98&lt;/P&gt;

&lt;P&gt;5:42:47.000 PM  908=55&lt;/P&gt;

&lt;P&gt;5:42:36.000 PM  908=43&lt;/P&gt;

&lt;P&gt;5:42:20.000 PM  908=13&lt;/P&gt;

&lt;P&gt;when given as a minute wise report&lt;/P&gt;

&lt;P&gt;search query - "sourcetype="SNMPTCP" | timechart span 1m count"&lt;/P&gt;

&lt;P&gt;5.42 - 4&lt;/P&gt;

&lt;P&gt;5.43 - 5&lt;/P&gt;

&lt;P&gt;5.44 - 1&lt;/P&gt;

&lt;P&gt;but to calculate the parameterValue as follows,&lt;/P&gt;

&lt;P&gt;5.42 -  ( 13 + 43 + 55 + 98 ) / 4 = 52&lt;/P&gt;

&lt;P&gt;5.43 -  ( 14 + 18 + 49 + 88 + 80 ) / 5 = 49.8&lt;/P&gt;

&lt;P&gt;5.44 - 51 / 1 = 51&lt;/P&gt;

&lt;P&gt;what is the query to be executed. i tried extract command but in vain. A sample command will be really helpful.&lt;/P&gt;

&lt;P&gt;thanks in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2013 14:05:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/extract-fields-and-plot-graphs-based-on-the-field-values/m-p/81951#M4408</guid>
      <dc:creator>muraliv</dc:creator>
      <dc:date>2013-04-02T14:05:32Z</dc:date>
    </item>
    <item>
      <title>Re: extract fields and plot graphs based on the field values</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/extract-fields-and-plot-graphs-based-on-the-field-values/m-p/81952#M4409</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;First you´ll need to extract the values with, rex command, something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex field=_raw "  908=(?&amp;lt;myvalue&amp;gt;\d+)" | ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then you should have a new field to use called "myvalue" and then you only need to make a search like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="SNMPTCP" | timechart span 1m avg(myvalue)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So combining both:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="SNMPTCP" | rex field=_raw="  908=(?&amp;lt;myvalue&amp;gt;\d+)"| timechart span 1m avg(myvalue)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2013 14:16:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/extract-fields-and-plot-graphs-based-on-the-field-values/m-p/81952#M4409</guid>
      <dc:creator>gfuente</dc:creator>
      <dc:date>2013-04-02T14:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: extract fields and plot graphs based on the field values</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/extract-fields-and-plot-graphs-based-on-the-field-values/m-p/81953#M4410</link>
      <description>&lt;P&gt;thanks for the prompt reply gfuente.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2013 06:07:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/extract-fields-and-plot-graphs-based-on-the-field-values/m-p/81953#M4410</guid>
      <dc:creator>muraliv</dc:creator>
      <dc:date>2013-04-03T06:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: extract fields and plot graphs based on the field values</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/extract-fields-and-plot-graphs-based-on-the-field-values/m-p/81954#M4411</link>
      <description>&lt;P&gt;gfuente,&lt;BR /&gt;
is it possible to achieve the same result by using kv/extract command instead of rex?&lt;BR /&gt;
if possible please share.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2013 12:36:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/extract-fields-and-plot-graphs-based-on-the-field-values/m-p/81954#M4411</guid>
      <dc:creator>muraliv</dc:creator>
      <dc:date>2013-04-04T12:36:20Z</dc:date>
    </item>
  </channel>
</rss>

