Back port of the last changes of collectd module