# 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

    except Exception as error:
        snmp_data = {"error": "There was a problem accessing SNMP data"}
        logger.error("Error getting SNMP:" + str(error))

    snmp_monitor.json = json.dumps(snmp_data)

    logger.debug(snmp_monitor.json)

    return


#
# ======================================================
# __main__
#
# If you run this module by itself, it will instantiate
# the MonitorJSON class and start an infinite loop
# printing data.
# ======================================================
#
if __name__ == '__main__':

    # When run by itself, we need to create the logger object (which is normally created in webserver.py)
    try:
        f = open("log_settings.json", 'rt')
        log_config = json.load(f)
        f.close()
        logging.config.dictConfig(log_config)
    except FileNotFoundError as e:

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


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


    except Exception as error:
        snmp_data = {"error": "There was a problem accessing SNMP data"}
        logger.error("Error getting SNMP:" + str(error))

    snmp_monitor.json = json.dumps(snmp_data)

    logger.debug(snmp_monitor.json)

    return


#
# ======================================================
# __main__
#
# If you run this module by itself, it will instantiate
# the MonitorJSON class and start an infinite loop
# printing data.
# ======================================================
#
if __name__ == '__main__':

    # When run by itself, we need to create the logger object (which is normally created in webserver.py)
    try:
        f = open("log_settings.json", 'rt')
        log_config = json.load(f)
        f.close()
        logging.config.dictConfig(log_config)
    except FileNotFoundError as e:

        print("Log configuration file not found: " + str(e))