Displacement sensor with core lead-through through the complete sensor. Mechanical movements can thus be transmitted through the sensor. If the sensor is installed vertically and there is a risk of moisture penetration, there will be no accumulation of moisture.