Returns the current health of the specified unit.
local health = UnitHealth(unit);
- UnitId - identifies the unit to query health for
- Integer - current health of the specified unit, returns 0 if the specified unit does not exist (eg. "target" given but there is no target)
Print the target's health to the chat frame:
DEFAULT_CHAT_FRAME:AddMessage( "target health ="..UnitHealth("target") )
- UNIT_HEALTH - Fired whenever a units health is affected.
- UNIT_HEALTH_FREQUENT - Same event as UNIT_HEALTH but not throttled as aggressively by the client.
- UNIT_MAXHEALTH - Fired when a unit's maximum health changes.
- UnitHealthMax - Maximum health value
- Patch 3.0.2 (2008-10-14): Units outside your own party or raid now show genuine health (not just a fraction of 100)
- Patch 1.13.3 (2019-12-10): Changed to return real health values for NPCs in order to alleviate addon comms load from the Real Mob Health addon.
Still returns health percentages when used on players. (Hotfix during build 33302, Feb 7 2020) 
- Patch 1.13.2 (2019-08-26): Versus 8.0.1, UnitHealth returns to older behaviour showing up to 100 for units outside your party or raid