Add support for writing stats to InfluxDB.