# Path: credentials.py
# SNMP_COMMUNITY = "public"


from pysnmp.entity.rfc3413.oneliner import cmdgen
from credentials import SNMP_COMMUNITY
import time
import json
import logging.config


# How To Calculate Bandwidth Utilization Using SNMP
# http://www.cisco.com/en/US/tech/tk648/tk362/technologies_tech_note09186a008009496e.shtml
"""

__author__ = 'scott@flakshack.com (Scott Vintinner)'


# =================================SETTINGS======================================
MAX_DATAPOINTS = 30
SAMPLE_INTERVAL = 60
GRAPH_TITLE = "Internet (Mbps)"

# Standard SNMP OIDs
# sysUpTime	    1.3.6.1.2.1.1.3.0    (this is hundreds of a second)
# 64-bit counters because 32-bit defaults rollover too quickly
# ifHCInOctets	1.3.6.1.2.1.31.1.1.1.6.interfacenumber
# ifHCOutOctets	1.3.6.1.2.1.31.1.1.1.10.interfacenumber


# Enter the details for each SNMP counter.
# ip:  This is the IP address or resolvable host name
# community:  This is the SNMPv1 community that will grant access to read the OID (usually this is "public")
# oid:  This is the SNMP OID interface counter we'll be measuring.
# uptime_oid:  This is the SNMP OID for the device's uptime (so we know what the time was when we measured the counter)
# name:  This is the name of the device as it will appear on the graph
DEVICES = (
    {"ip": "pa1", "community": SNMP_COMMUNITY, "oid": "1.3.6.1.2.1.31.1.1.1.6.6",
     "uptime_oid": "1.3.6.1.2.1.1.3.0", "name": "PA1 RX"},

# Path: credentials.py
# SNMP_COMMUNITY = "public"


# Path: snmp_interface_2.py
from pysnmp.entity.rfc3413.oneliner import cmdgen
from credentials import SNMP_COMMUNITY
import time
import json
import logging.config



# How To Calculate Bandwidth Utilization Using SNMP
# http://www.cisco.com/en/US/tech/tk648/tk362/technologies_tech_note09186a008009496e.shtml
"""

__author__ = 'scott@flakshack.com (Scott Vintinner)'


# =================================SETTINGS======================================
MAX_DATAPOINTS = 30
SAMPLE_INTERVAL = 60
GRAPH_TITLE = "Internet (Mbps)"

# Standard SNMP OIDs
# sysUpTime	    1.3.6.1.2.1.1.3.0    (this is hundreds of a second)
# 64-bit counters because 32-bit defaults rollover too quickly
# ifHCInOctets	1.3.6.1.2.1.31.1.1.1.6.interfacenumber
# ifHCOutOctets	1.3.6.1.2.1.31.1.1.1.10.interfacenumber


# Enter the details for each SNMP counter.
# ip:  This is the IP address or resolvable host name
# community:  This is the SNMPv1 community that will grant access to read the OID (usually this is "public")
# oid:  This is the SNMP OID interface counter we'll be measuring.
# uptime_oid:  This is the SNMP OID for the device's uptime (so we know what the time was when we measured the counter)
# name:  This is the name of the device as it will appear on the graph
DEVICES = (
    {"ip": "pa1", "community": SNMP_COMMUNITY, "oid": "1.3.6.1.2.1.31.1.1.1.6.6",
     "uptime_oid": "1.3.6.1.2.1.1.3.0", "name": "PA1 RX"},

    {"ip": "pa1", "community": SNMP_COMMUNITY, "oid": "1.3.6.1.2.1.31.1.1.1.10.6",