示例#1
0
    def initSensor(self):
        """Init the Sensor object parameters"""
        super(Sensor, self).initSensor()

        # Get hostnames list
        hostnames = self.config.get('hostnames', [])
        self.filtered_ds = self.config.get(
            'datasources', [
                'max_rtt', 'min_rtt', 'avg_rtt', 'packet_lost',
                'packet_size', 'timeout', 'result',
            ]
        )


        # Set datasource list
        datasources = []
        for hostname in hostnames:
            for filtered in self.filtered_ds:
                dsnames = (hostname, filtered)
                datasources.append(dsnames)

                fullname = '.'.join(dsnames)
                self.logger.debug('Add %(fullname)s datasource' % locals())

        self.senders = mks.getEnabledSenderObjects(self.sensorname, datasources)
示例#2
0
    def initSensor(self):
        """Init the Sensor object parameters"""
        super(Sensor, self).initSensor()

        # Get hostnames list
        hostnames = self.config.get('hostnames', [])
        self.filtered_ds = self.config.get('datasources', [
            'max_rtt',
            'min_rtt',
            'avg_rtt',
            'packet_lost',
            'packet_size',
            'timeout',
            'result',
        ])

        # Set datasource list
        datasources = []
        for hostname in hostnames:
            for filtered in self.filtered_ds:
                dsnames = (hostname, filtered)
                datasources.append(dsnames)

                fullname = '.'.join(dsnames)
                self.logger.debug('Add %(fullname)s datasource' % locals())

        self.senders = mks.getEnabledSenderObjects(self.sensorname,
                                                   datasources)
示例#3
0
    def initSensor(self):
        """Init the Sensor object parameters"""
        super(Sensor, self).initSensor()

        # Get hostnames list
        self.hostnames = self.config.get("hostnames", [])

        # Set datasource list
        datasources = []
        for hostname in self.hostnames:
            dsnames = (hostname, "isup")
            datasources.append(dsnames)

            fullname = ".".join(dsnames)
            self.logger.debug("Add %(fullname)s datasource" % locals())

        self.senders = mks.getEnabledSenderObjects(self.sensorname, datasources)