Monitor for the carbon and oxygen impurities in the ASDEX Upgrade tokamak