Monitoring the composition of the exhaust gases or of one of its components