Everything is SNMP polled and stashed in a database, and I mean *everything*, so each of the 2000 odds servers in that site have all of their temperature sensors polled and the results kept for more than a year. The switches and routers too and then each rack has a temperature probe for ambient, plus air supply and return temp in monitored by the AC (again, into SNMP). The voltage and power usage of every outlet is recorded...our environmental monitoring database is just short of 1TB in size.
It's quite the resource - I can correlate power and network usage with heat output in a busy period vs a quiet one. Evaluate the benefits of shutting down blade chassis' which aren't required. It's also an interesting early warning system, power usage is a good measure of general system load, so if we see increased power usage or heat generated without a corresponding traffic spike then somebody will be finding out why.
We do this much but it makes me wonder what kind of witchcraft google do with the same data...
The mechanics of the polling depends on the hardware and OS generally but usually the vendors tools allow it for server hardware.
* And actually, very little virtualisation, I'm not a big fan personally and it also makes little sense for us, we load balance and failover workloads without so the HA features have little use and it just seems a way to get another layer to pay for support on, adds complexity and eats hardware resources to run. I accept that this isn't typical.