Attenuation in a fibre is measured using an OTDR (Optical Time-Domain Reflectometer) which looks at the light reflected back long the fibre when a pulse of light is sent down the fibre. Another method is to send light from a continuous source of light and measure the power emerging at the other end of the fibre.