This 1.9+ vanilla command adds a health bar to every mob. When you look at the mob, it will display its health. Note that this overrides every entities' custom name (besides armorstands), so it's recommended to backup your world if you added custom names to any entity besides armorstands. Every mobs' name will be replaced with hearts. When you hurt them, their hearts will reduce. Half-hearts are NOT included, and any mob with more than 20 health will not have their name overridden.
Credits to Dragonz (https://www.youtube.com/watch?v=bUfYmBUbmfc) for this amazing idea, this sorta replaces the Damage Indicator mod (only for mobs with 20 health and less).