Write the points in MQTT.

def export(self, name, columns, points):
        """Write the points in MQTT."""

        WHITELIST = '_-' + string.ascii_letters + string.digits
        SUBSTITUTE = '_'

        def whitelisted(s,
                        whitelist=WHITELIST,
                        substitute=SUBSTITUTE):
            return ''.join(c if c in whitelist else substitute for c in s)

        for sensor, value in zip(columns, points):
            try:
                sensor = [whitelisted(name) for name in sensor.split('.')]
                tobeexport = [self.topic, self.hostname, name]
                tobeexport.extend(sensor)
                topic = '/'.join(tobeexport)

                self.client.publish(topic, value)
            except Exception as e:
                logger.error("Can not export stats to MQTT server (%s)" % e)