Mechanics

I HAVE A M SPORT AND 9 TIMES OUT OF 10 WHEN I START THE CAR, A YELLOW WARNING LIGHT OF THE CAR ON A RAMP COMES ON, ONLY TWICE HAS THE LIGHT NOT COME ON, I WAS TOLD IT REQUIRES AN INSPECTION, IS THIS TRUE? IF NOT, WHAT IS HAPPENING TO THE CAR?

2008 BMW 120d • 40,000 miles