def collect_snmp(self, device, host, port, community):
        self.log.debug(
            'Collecting raw SNMP statistics from device \'{0}\''.format(device))

        dev_config = self.config['devices'][device]
        if 'oids' in dev_config:
            for oid, metricName in dev_config['oids'].items():

                if (device, oid) in self.skip_list:
                    self.log.debug(
                        'Skipping OID \'{0}\' ({1}) on device \'{2}\''.format(
                            oid, metricName, device))
                    continue

                timestamp = time.time()
                value = self._get_value(device, oid, host, port, community)
                if value is None:
                    continue

                self.log.debug(
                    '\'{0}\' ({1}) on device \'{2}\' - value=[{3}]'.format(
                        oid, metricName, device, value))

                path = '.'.join([self.config['path_prefix'], device,
                                 self.config['path_suffix'], metricName])
                metric = Metric(path=path, value=value, timestamp=timestamp,
                                precision=self._precision(value),
                                metric_type='GAUGE')
                self.publish_metric(metric)
Collect SNMP interface data from device
dataset/ETHPy150Open BrightcoveOS/Diamond/src/collectors/snmpraw/snmpraw.py/SNMPRawCollector.collect_snmp