A working machine, comprising: a lower travelling body; an upper slewing body mounted on the lower travelling body; and a slewing mechanism for slewing the upper slewing body with respect to the lower slewing body, wherein: the slewing mechanism includes a ring gear fixed to the lower travelling body and having a plurality of teeth arranged along an inner circumference thereof, a pinion that is supported by the upper slewing body and is rotated in mesh with the plurality of teeth of the ring gear to thereby slew the upper slewing body, and a grease bath disposed inside the ring gear and extending along the inner circumference of the ring gear, the grease bath storing grease for lubricating a meshing portion between the ring gear and the pinion; characterized in that the upper slewing body includes at least one sensor for detecting a contaminant having a potential for contaminating the grease to deteriorate the grease, and a sensor supporting member that supports the at least one sensor at a position that allows the at least one sensor to revolve together with the upper slewing body to slew the upper slewing body while being immersed in the grease in the grease bath. a lower travelling body; an upper slewing body mounted on the lower travelling body; and a slewing mechanism for slewing the upper slewing body with respect to the lower slewing body, wherein: the slewing mechanism includes a ring gear fixed to the lower travelling body and having a plurality of teeth arranged along an inner circumference thereof, a pinion that is supported by the upper slewing body and is rotated in mesh with the plurality of teeth of the ring gear to thereby slew the upper slewing body, and a grease bath disposed inside the ring gear and extending along the inner circumference of the ring gear, the grease bath storing grease for lubricating a meshing portion between the ring gear and the pinion; characterized in that the upper slewing body includes at least one sensor for detecting a contaminant having a potential for contaminating the grease to deteriorate the grease, and a sensor supporting member that supports the at least one sensor at a position that allows the at least one sensor to revolve together with the upper slewing body to slew the upper slewing body while being immersed in the grease in the grease bath. the slewing mechanism includes a ring gear fixed to the lower travelling body and having a plurality of teeth arranged along an inner circumference thereof, a pinion that is supported by the upper slewing body and is rotated in mesh with the plurality of teeth of the ring gear to thereby slew the upper slewing body, and a grease bath disposed inside the ring gear and extending along the inner circumference of the ring gear, the grease bath storing grease for lubricating a meshing portion between the ring gear and the pinion; characterized in that the upper slewing body includes at least one sensor for detecting a contaminant having a potential for contaminating the grease to deteriorate the grease, and a sensor supporting member that supports the at least one sensor at a position that allows the at least one sensor to revolve together with the upper slewing body to slew the upper slewing body while being immersed in the grease in the grease bath.