I'm using the ten buck, Bell automotive indoor outdoor thermometer. Find it by the air fresheners and other car junk at the big box store, or a car parts place. I like to carefully snip away the plasic sensor housing, so the tiny epoxy coated sensor can get good contact with the metal I want to know the temp of.
Idealy you get the sensor from it into the hub, but for most halls using motors getting two more wires down that axle is easier said than done.

If you can do that, you get actual temps up to 160 F, and then it just says overtemp. You should be stopping by 180, but stopping or at least slowing down when you see 160 is not so bad an idea. After awhile, you get an idea where you stand on riding past the overtemp by how fast it cools back down. Using an infared thermometer on the hub has told me that in most weather, up to 100F, I can keep riding on the flat without getting past 170-180.
The other, easier option is to stick the sensor to the axle stub, with enough tape or whatever on it to keep windchill from causing fluctuating readings. Then you take the temp on the readout, and add 30-40F to that. In cold weather, the hub cools better so it may be 30 F hotter. In summer, the heat stays in the hub longer, so the temps tend to run about 40F hotter. So using the external sensor, look to keep the motor under 140F.
The reason to put the sensor on the axle stub is because it doesn't rotate, and it gives a more accurate indication of internal temps of the rotor than the covers, especially with a gearmotor. A small infared thermometer works great too, but you have to stop to use it. I learned a lot about how to ride cooler by having a continuous dashboard readout. Amazing how different styles of riding up a hill affect the motor heating.
If you are worried about controller temps, the same rig could be used to monitor that.