# 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
#!/usr/bin/env python
"""snmp_interface: module called to generate SNMP monitoring data formatted for use with StatusBoard iPad App

"""

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

# =================================SETTINGS======================================
MAX_DATAPOINTS = 30
SAMPLE_INTERVAL = 60
GRAPH_TITLE = "Active PRI Lines"

# Cisco Voice Gateway Active Calls
# ISDN-MIB:isdnBearerOperStatus     1.3.6.1.2.1.10.20.1.2.1.1.2
# This is a table of all the PRI channels.  If the value is 4, there is an active call, so we will
# Run through the table to total the number of active calls.

# 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.
# name:  This is the name of the device as it will appear on the graph
DEVICES = (
    {"ip": "cisco-clt-vg1", "community": SNMP_COMMUNITY, "oid": "1.3.6.1.2.1.10.20.1.2.1.1.2", "name": "CLT1"},
    {"ip": "cisco-clt-vg2", "community": SNMP_COMMUNITY, "oid": "1.3.6.1.2.1.10.20.1.2.1.1.2", "name": "CLT2"},

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


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

#!/usr/bin/env python
"""snmp_interface: module called to generate SNMP monitoring data formatted for use with StatusBoard iPad App

"""

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

# =================================SETTINGS======================================
MAX_DATAPOINTS = 30
SAMPLE_INTERVAL = 60
GRAPH_TITLE = "Active PRI Lines"

# Cisco Voice Gateway Active Calls
# ISDN-MIB:isdnBearerOperStatus     1.3.6.1.2.1.10.20.1.2.1.1.2
# This is a table of all the PRI channels.  If the value is 4, there is an active call, so we will
# Run through the table to total the number of active calls.

# 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.
# name:  This is the name of the device as it will appear on the graph
DEVICES = (
    {"ip": "cisco-clt-vg1", "community": SNMP_COMMUNITY, "oid": "1.3.6.1.2.1.10.20.1.2.1.1.2", "name": "CLT1"},
    {"ip": "cisco-clt-vg2", "community": SNMP_COMMUNITY, "oid": "1.3.6.1.2.1.10.20.1.2.1.1.2", "name": "CLT2"},

    {"ip": "cisco-rh-wan", "community": SNMP_COMMUNITY, "oid": "1.3.6.1.2.1.10.20.1.2.1.1.2", "name": "RH"},