The EMC2101 from Microchip/SMSC is a fan controller with temperature monitoring, and it will take care of all of that for you
Programmable PWM output and tachometer input, with both internal and external temperature sensing, with a 1°C accuracy, it's a perfect friend for any 3 or 4-pin PC fan you may find.
In addition to allowing you to control a fan, the EMC2101 includes an internal temperature sensor, as well as connections for an external temperature sensing diode
If you use an external temperature sensor, you can even configure a lookup table (LUT) that allows you to set different fan speeds depending on the temperature, and the EMC2101 will automatically adjust the speed depending on the temperature.