icon/x Created with Sketch.

Splunk Cookie Policy

We use our own and third-party cookies to provide you with a great online experience. We also use these cookies to improve our products and services, support our marketing campaigns, and advertise to you on our website and other websites. Some cookies may continue to collect information after you have left our website. Learn more (including how to update your settings) here.
Accept Cookie Policy

We are working on something new...

A Fresh New Splunkbase
We are designing a New Splunkbase to improve search and discoverability of apps. Check out our new and improved features like Categories and Collections. New Splunkbase is currently in preview mode, as it is under active development. We welcome you to navigate New Splunkbase and give us feedback.

Accept License Agreements

This app is provided by a third party and your right to use the app is in accordance with the license provided by that third-party licensor. Splunk is not responsible for any third-party apps and does not provide any warranty or support. If you have any questions, complaints or claims with respect to this app, please contact the licensor directly.

Thank You

Downloading SNMP Modular Input Poller
SHA256 checksum (snmp-modular-input-poller_254.tgz) b24f1e5aad185c30c73f5f946a537d87543702043ef1ebd13677bc04a7016be0 SHA256 checksum (snmp-modular-input-poller_253.tgz) 06cfd13171be5470e64c50966aba2b5c100484f137b2f7574e6e7b35ff23b9ab SHA256 checksum (snmp-modular-input-poller_251.tgz) 22e1c60a015b9c36c64a82047d716e626a752a946b59ed18e2434f148ae88c9a SHA256 checksum (snmp-modular-input-poller_250.tgz) bd5a00e4ec774126f9dd543bd2367d28f80907d324a36ed8e2d289e03d375d46 SHA256 checksum (snmp-modular-input-poller_240.tgz) 924478b38ef13db38f6fde7ed9199958f66f9103923bf8419625ed15e75371cd SHA256 checksum (snmp-modular-input-poller_230.tgz) 47bcf7b940e944dff3d3cd900076403287712507e36f7106fd180c5e9c608b3e SHA256 checksum (snmp-modular-input-poller_221.tgz) 78769491337882d9544ec34e19630c77d50da0ef1db94b49957a695f0f858556 SHA256 checksum (snmp-modular-input-poller_220.tgz) 3221822a5f426a1f59cdc98b19d06a45e3a92d454cad731419647323fa71ac3c SHA256 checksum (snmp-modular-input-poller_212.tgz) f00c0f8ba8d35c93a5eac25628313ef260f5bfa7586399fd6a90790789420bc3 SHA256 checksum (snmp-modular-input-poller_201.tgz) c8fdbffe7d799942a94093994096ed4a07eec30e9515b3e54ba4a66a5a4319c6 SHA256 checksum (snmp-modular-input-poller_200.tgz) 0329c0c8ed8ad00283fd564af60fb68a8215fdba6e3c4eff46b0ea856ee6996c
To install your download
For instructions specific to your download, click the Details tab after closing this window.

Flag As Inappropriate

splunk

SNMP Modular Input Poller

This app has been archived. Learn more about app archiving.
This app is NOT supported by Splunk. Please read about what that means for you here.
Overview
Details
SNMP Interface & IPSLA statistic poller

[snmpif://hostname]
destination = hostname
snmp_version = 3
v3_securityName = username
v3_authKey = password
snmpinterval = 300
interfaces = 1,5,8,9
index = network
# The sourcetype can be whatever you want
sourcetype = snmpif


[ipsla://hostname]
destination = hostname
snmp_version = 3
v3_securityName = username
v3_authKey = password
snmpinterval = 300
operations = 2,7
index = network
sourcetype = ipsla

SnmpMod

Deployment

splunk install app snmpmod.spl -update 1 -auth admin:changeme
cd $SPLUNK_HOME/etc/apps/snmpmod
mkdir local
vim local/inputs.conf

SNMP v3

If you are using SNMP version 3 , you have to obtain the PyCrypto package yourself:

As of Python 2.7.9, pip is included with the release. Run

pip2 install pycrypto
  • Windows
  • Copy C:\Python27\Lib\site-packages\Crypto to $SPLUNK_HOME\etc\apps\snmpmod\bin
  • Linux
  • Copy /usr/local/lib/python2.7/dist-packages/Crypto to $SPLUNK_HOME/etc/apps/snmpmod/bin

snmpif Stanza

[snmpif://hostname]
destination = hostname
snmp_version = 3
v3_securityName = username
v3_authKey = password
snmpinterval = 300
interfaces = 1,5,8,9
index = network
# The sourcetype can be whatever you want
sourcetype = snmpif

ipsla Stanza

[ipsla://hostname]
destination = hostname
snmp_version = 3
v3_securityName = username
v3_authKey = password
snmpinterval = 300
operations = 2,7
index = network
sourcetype = ipsla

Response Handlers

destination, host and /etc/hosts

Currently, all response handlers set the Splunk host to the value of destination. If you don't have DNS (bad sysadmin!) add an entry to /etc/hosts. I'd be very happy to take a pull request that will look at a host config option and override destination with that value.

SNMP Interface Search Query

I strongly recommend you create a search macro snmpif_traffic that uses streamstats to calculate the bits per second from the raw snmpif data. My macro is:

stats first(*) as * by _time host ifIndex
| streamstats window=2 global=false current=true range(if*Octets) as delta*, range(_time) as secs by host, ifIndex
| where secs>0
| eval bpsIn=coalesce(deltaHCIn, deltaIn)*8/secs
| eval bpsOut=coalesce(deltaHCOut, deltaOut)*8/secs
| eval mbpsIn=bpsIn/1000000 | eval mbpsOut=bpsOut/1000000

Then to call it and display the results as a graph:

index=snmpif host=foo ifIndex=17 | `snmpif_parse`
| timechart bins=500 avg(mbpsIn) as "Mbps IN", avg(mbpsOut) as "Mbps OUT"

And calculate 95th percentile figures

index=snmpif host=foo ifIndex=17 | `snmpif_parse`
| stats perc95(mbpsIn) as "IN", perc95(mbpsOut) as "OUT"

Summary Collection

The search term shown above is quite expensive. I am running the query above and collecting the data into a new index.

[search index=network sourcetype=snmp_traffic | stats first(_time) as earliest] index=network sourcetype="snmpif"
| stats first(*) as * by _time host ifIndex
| streamstats window=2 global=false current=true range(if*Octets) as delta*, range(_time) as secs by host, ifIndex
| where secs>0
| eval bpsIn=coalesce(deltaHCIn, deltaIn)*8/secs
| eval bpsOut=coalesce(deltaHCOut, deltaOut)*8/secs
| eval mbpsIn=bpsIn/1000000
| eval mbpsOut=bpsOut/1000000
| fields _time host ifIndex bpsIn bpsOut ifAdminStatus ifDescr ifMtu ifOperStatus ifPhysAddress ifSpecific ifSpeed ifType mbpsIn mbpsOut
| collect index=network sourcetype=snmp_traffic

There is a trick there of using the most recent snmp_traffic event to start the next round of collections. I run this search every 30 minutes.

About

This project was originally based on SplunkModularInputsPythonFramework.
I have taken the SNMP modular input, refactored the python code to be more re-usable and added extra stanzas for polling interfaces and ipsla statistics.

Release Notes

Version 2.5.4
April 1, 2016

v2.5.4

  • More changes to error handling
Version 2.5.3
March 24, 2016

Release Notes

v2.5.3

  • Fixes and tweaks to logging

v2.5.2

  • Significant improvements to logging
Version 2.5.1
Feb. 2, 2016

v2.5.1

  • Issue #3: Fixed statistics coming through
Version 2.5.0
Jan. 18, 2016

v2.5.0

v2.4.0

  • Added qos section for querying CB QOS policy rates

v2.3.0

  • Added jitter stats packet loss counters to IPSLA

v2.2.1

  • Increase transport timeout to 2 seconds

v2.2.0

  • Added RTT Sum2 to IPSLA poller
  • Added operation response to IPSLA poller
  • Added high counter Ucast packets to snmpif

v2.1.2

  • Removed RTTSumHigh from IPSLA

v2.1.1

  • Renamed IPSLA entry to operation
Version 2.4.0
Nov. 13, 2015
  • Added qos section for querying CB QOS policy rates
Version 2.3.0
July 1, 2015

v2.3.0

  • Added jitter stats packet loss counters to IPSLA

v2.2.1

  • Increase transport timeout to 2 seconds

v2.2.0

  • Added RTT Sum2 to IPSLA poller
  • Added operation response to IPSLA poller
  • Added high counter Ucast packets to snmpif

v2.1.2

  • Removed RTTSumHigh from IPSLA

v2.1.1

  • Renamed IPSLA entry to operation
Version 2.2.1
June 18, 2015

Increase transport timeout to 2 seconds

Version 2.2.0
May 15, 2015

v2.2.0 Changelog

  • Added RTT Sum2 to IPSLA poller
  • Added operation response to IPSLA poller
  • Added high counter Ucast packets to snmpif
Version 2.1.2
April 23, 2015

Breaking change

Renamed IPSLA entry to operation

Version 2.0.1
March 20, 2015

Bug fix release

Version 2.0.0
March 20, 2015
  • Added support for polling CISCO IPSLA statistics via [ipsla:// stanza
  • Fixed up exception handling
  • Tweaked logging

Subscribe Share

Are you a developer?

As a Splunkbase app developer, you will have access to all Splunk development resources and receive a 10GB license to build an app that will help solve use cases for customers all over the world. Splunkbase has 1000+ apps from Splunk, our partners and our community. Find an app for most any data source and user need, or simply create your own with help from our developer portal.

Follow Us:
Splunk, Splunk>,Turn Data Into Doing, Data-to-Everything, and D2E are trademarks or registered trademarks of Splunk Inc. in the United States and other countries. All other brand names,product names,or trademarks belong to their respective owners.