With rapid development of cloud computing technologies and applications, the number and scale of cloud data centers have grown exponentially in recent years. One of the major problems with current cloud data centers is their huge energy consumption, which makes energy consumption management one of the hottest research topics in the field of cloud computing. This paper aims at implementing an effective Distributed Energy Meter (DEM) system for heterogeneous cloud environments based on a multi-component power consumption model for cloud servers. Specifically, we propose a modeling method for the energy consumption of key components (CPU, memory and disk) of computer servers and reveal the mathematical relationship between the resource usage of the key components and the system energy consumption. The proposed DEM system cannot only estimate the energy consumption of heterogeneous cluster environments (Linux and Windows NT), but also support various CPU power consumption models. In addition, a unique disk power consumption model that uses different thresholds to distinguish various disk I/O states (sequential/random, read/write) to achieve an accurate estimation of disk power consumption. Experimental studies conducted on a heterogeneous cluster with workloads generated by PCMark and Sysbench demonstrate that the proposed DEM system outperforms the state-of-art models in estimating the energy consumption of heterogeneous cloud environments.