(self, device, host, port, community)
Collect Fusion IO Drive SNMP stats from device
        host and device are from the conf file. In the future device should be
        changed to be what IODRive device it being checked.
        i.e. fioa, fiob.
Collect Fusion IO Drive SNMP stats from device
        host and device are from the conf file. In the future device should be
        changed to be what IODRive device it being checked.
        i.e. fioa, fiob.
Collect Fusion IO Drive SNMP stats from device host and device are from the conf file . In the future device should be changed to be what IODRive device it being checked . i . e . fioa fiob .
def collect_snmp(self, device, host, port, community):
        """
        Collect Fusion IO Drive SNMP stats from device
        host and device are from the conf file. In the future device should be
        changed to be what IODRive device it being checked.
        i.e. fioa, fiob.
        """

        # Set timestamp
        timestamp = time.time()

        for k, v in self.IODRIVE_STATS.items():
            # Get Metric Name and Value
            metricName = '.'.join([k])
            metricValue = int(self.get(v, host, port, community)[v])

            # Get Metric Path
            metricPath = '.'.join(['servers', host, device, metricName])

            # Create Metric
            metric = Metric(metricPath, metricValue, timestamp, 0)

            # Publish Metric
            self.publish_metric(metric)

        for k, v in self.IODRIVE_BYTE_STATS.items():
            # Get Metric Name and Value
            metricName = '.'.join([k])
            metricValue = int(self.get(v, host, port, community)[v])

            # Get Metric Path
            metricPath = '.'.join(['servers', host, device, metricName])

            # Create Metric
            metric = Metric(metricPath, metricValue, timestamp, 0)

            # Publish Metric
            self.publish_metric(metric)
def collect_snmp ( self , device , host , port , community ) : # Set timestamp timestamp = time . time ( ) for k , v in self . IODRIVE_STATS . items ( ) : # Get Metric Name and Value metricName = '.' . join ( [ k ] ) metricValue = int ( self . get ( v , host , port , community ) [ v ] ) # Get Metric Path metricPath = '.' . join ( [ 'servers' , host , device , metricName ] ) # Create Metric metric = Metric ( metricPath , metricValue , timestamp , 0 ) # Publish Metric self . publish_metric ( metric ) for k , v in self . IODRIVE_BYTE_STATS . items ( ) : # Get Metric Name and Value metricName = '.' . join ( [ k ] ) metricValue = int ( self . get ( v , host , port , community ) [ v ] ) # Get Metric Path metricPath = '.' . join ( [ 'servers' , host , device , metricName ] ) # Create Metric metric = Metric ( metricPath , metricValue , timestamp , 0 ) # Publish Metric self . publish_metric ( metric )