Sensor device having a closing apparatus and a sensor apparatus for detecting contamination in the form of metal particles in a fluid, which is at least partially surrounded by a separating wall, which delimits a pipe system or a housing through which the fluid flows, wherein the closing apparatus comprises a receiving opening, which allows the sensor apparatus located in functional position, with its sensor detecting the metal particles, to engage at least partially through the separating wall, wherein the closing apparatus is also configured to remove the sensor apparatus from the separating wall, in particular for maintenance or replacement purposes, into a non-functional position, wherein the sensor apparatus interacts with the closing apparatus such that, when the sensor apparatus is removed into its non-functional position, the closing apparatus closes the receiving opening and, in the reverse direction, when the sensor apparatus is moved into its functional position, the closing apparatus releases this receiving opening, wherein the closing apparatus, forming a kind of non-return valve, comprises a spring-loaded obturator disc, which can respectively be moved under the influence of the sensor apparatus against the action of its closing spring into an opening position releasing the receiving opening or can be moved under the influence of the closing spring into its blocking position closing the receiving opening, wherein the closing spring of the closing apparatus is a compression spring, which is supported with one of its ends on a receiving housing and/or bearing parts and with its other end engages on a brace part (61; 77), which is an integral component of the closing apparatus or can be connected to the closing apparatus, and wherein the obturator disc and the brace part (61; 77) are held a defined distance away from one another by means of a web-like connection piece, characterised in that the connection piece releases fluid passages in the direction of the brace part (61; 77), which, with a further fluid passage (75; 85) of the brace part (61; 77), permit a fluid-conveying connection via the receiving opening released by means of the closing apparatus to the sensor of the sensor apparatus. wherein the closing apparatus comprises a receiving opening, which allows the sensor apparatus located in functional position, with its sensor detecting the metal particles, to engage at least partially through the separating wall, wherein the closing apparatus is also configured to remove the sensor apparatus from the separating wall, in particular for maintenance or replacement purposes, into a non-functional position, wherein the sensor apparatus interacts with the closing apparatus such that, when the sensor apparatus is removed into its non-functional position, the closing apparatus closes the receiving opening and, in the reverse direction, when the sensor apparatus is moved into its functional position, the closing apparatus releases this receiving opening, wherein the closing apparatus, forming a kind of non-return valve, comprises a spring-loaded obturator disc, which can respectively be moved under the influence of the sensor apparatus against the action of its closing spring into an opening position releasing the receiving opening or can be moved under the influence of the closing spring into its blocking position closing the receiving opening, wherein the closing spring of the closing apparatus is a compression spring, which is supported with one of its ends on a receiving housing and/or bearing parts and with its other end engages on a brace part (61; 77), which is an integral component of the closing apparatus or can be connected to the closing apparatus, and wherein the obturator disc and the brace part (61; 77) are held a defined distance away from one another by means of a web-like connection piece, characterised in that the connection piece releases fluid passages in the direction of the brace part (61; 77), which, with a further fluid passage (75; 85) of the brace part (61; 77), permit a fluid-conveying connection via the receiving opening released by means of the closing apparatus to the sensor of the sensor apparatus.