<?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 traffic trend graph using snmpget information? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-traffic-trend-graph-using-snmpget-information/m-p/78684#M16111</link>
    <description>&lt;P&gt;I don't see anything obvious about your search that looks out of whack - are you getting the raw data indexed for all of your intervals?&lt;/P&gt;

&lt;P&gt;That said, there's some tricksy stuff about SNMP counters.  Eventually, they will roll over so you need to be prepared for that.  The rollover could be from a true counter rollover (some devices use 32 counters for that kind of thing, and roll over relatively quicky), or from a device reboot, or an SNMP agent restart.  &lt;/P&gt;

&lt;P&gt;There are many tools "out there" already that handle this problem well - stuff like Cacti, MRTG, and Cricket.  I'm wondering if you wouldn't find as much success trying to leverage their existing data collection tools to feed into Splunk for graphing/analysis.&lt;/P&gt;</description>
    <pubDate>Wed, 27 Oct 2010 20:45:36 GMT</pubDate>
    <dc:creator>dwaddle</dc:creator>
    <dc:date>2010-10-27T20:45:36Z</dc:date>
    <item>
      <title>How to get traffic trend graph using snmpget information?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-traffic-trend-graph-using-snmpget-information/m-p/78683#M16110</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I am trying to create network traffic trend graph by:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;&lt;P&gt;execute snmpget to network devices every minute to get counter value for IN/OUT in Octets and put the output to splunk as scripted input.&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;extract counter field to get counter value, convert counter value to decimal, get delta to get bit per minute, then get bps by dividing by 60.&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;use timechart command to get avg(bps) in 5min.&lt;/P&gt;&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;I can see the scripted inputed is successfully indexed into splunk, but I can't get 5-minute average bps using the folloing search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=snmpget host=192.168.1.1 mib_name=*ifIn* 
  | eval decimal=tonumber(counter,8) 
  | delta decimal as bpm 
  | eval bpm = abs(bpm) 
  | eval bps=(bpm/60) 
  | timechart avg(bps) span=5m
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;the search result looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;           _time             avg(bps)
--------------------------- -----------
2010-10-27 15:30:00.000 CST
2010-10-27 15:35:00.000 CST
2010-10-27 15:40:00.000 CST
2010-10-27 15:45:00.000 CST
2010-10-27 15:50:00.000 CST  837.983333
2010-10-27 15:55:00.000 CST  940.983333
2010-10-27 16:00:00.000 CST  942.333333
2010-10-27 16:05:00.000 CST 1250.377778
2010-10-27 16:10:00.000 CST 3151.966667
2010-10-27 16:15:00.000 CST 3144.083333
2010-10-27 16:20:00.000 CST
2010-10-27 16:25:00.000 CST 1466.822222
2010-10-27 16:30:00.000 CST
2010-10-27 16:35:00.000 CST
2010-10-27 16:40:00.000 CST
[root@syslog1010 ~]#
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;There are several gaps. Is there any usage mistake in my query? or if anyone know how to achieve this kind of traffic graph, please let me know.&lt;/P&gt;

&lt;P&gt;Thanks.. &lt;/P&gt;</description>
      <pubDate>Wed, 27 Oct 2010 14:57:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-traffic-trend-graph-using-snmpget-information/m-p/78683#M16110</guid>
      <dc:creator>melonman</dc:creator>
      <dc:date>2010-10-27T14:57:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to get traffic trend graph using snmpget information?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-traffic-trend-graph-using-snmpget-information/m-p/78684#M16111</link>
      <description>&lt;P&gt;I don't see anything obvious about your search that looks out of whack - are you getting the raw data indexed for all of your intervals?&lt;/P&gt;

&lt;P&gt;That said, there's some tricksy stuff about SNMP counters.  Eventually, they will roll over so you need to be prepared for that.  The rollover could be from a true counter rollover (some devices use 32 counters for that kind of thing, and roll over relatively quicky), or from a device reboot, or an SNMP agent restart.  &lt;/P&gt;

&lt;P&gt;There are many tools "out there" already that handle this problem well - stuff like Cacti, MRTG, and Cricket.  I'm wondering if you wouldn't find as much success trying to leverage their existing data collection tools to feed into Splunk for graphing/analysis.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Oct 2010 20:45:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-traffic-trend-graph-using-snmpget-information/m-p/78684#M16111</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2010-10-27T20:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to get traffic trend graph using snmpget information?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-traffic-trend-graph-using-snmpget-information/m-p/78685#M16112</link>
      <description>&lt;P&gt;Check out the answer here. &lt;/P&gt;

&lt;P&gt;&lt;A href="http://answers.splunk.com/questions/1198/create-charts-from-snmp-counter-data-type" rel="nofollow"&gt;http://answers.splunk.com/questions/1198/create-charts-from-snmp-counter-data-type&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Oct 2010 22:40:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-traffic-trend-graph-using-snmpget-information/m-p/78685#M16112</guid>
      <dc:creator>rasingh</dc:creator>
      <dc:date>2010-10-27T22:40:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to get traffic trend graph using snmpget information?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-traffic-trend-graph-using-snmpget-information/m-p/78686#M16113</link>
      <description>&lt;P&gt;Something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=routerifsnmpinfo
 | streamstats current=f global=f window=1
     first(ifHCInOctets) as next_ifHCInOctets,
     first(ifInErrors) as next_ifInErrors,
     first(_time) as next_time
   by host,ifIndex
 | eval dt=next_time-_time
 | eval difHCInOctets=next_ifHCInOctets-ifHCInOctets
 | eval rifHCInOctets=difHCInOctets/dt
 | eval cifInErrors=next_ifInErrors-ifInErrors
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;is more resistant to skips or delays in the timing of collections of data. The above assumes that &lt;CODE&gt;ifHCInOctets&lt;/CODE&gt; and &lt;CODE&gt;ifInErrors&lt;/CODE&gt; are counters, and ignores the 32-bit counter issue by using the &lt;CODE&gt;HC&lt;/CODE&gt; version of the counter, which is supposed to be a 64-bit counter. Note the use of &lt;CODE&gt;streamstats&lt;/CODE&gt; rather than &lt;CODE&gt;delta&lt;/CODE&gt; since it allows you to split by host and interface number (&lt;CODE&gt;ifIndex&lt;/CODE&gt;) and get a full table instead of having to query one host/interface at a time.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Oct 2010 23:51:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-traffic-trend-graph-using-snmpget-information/m-p/78686#M16113</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-10-27T23:51:55Z</dc:date>
    </item>
  </channel>
</rss>

