API:UnitHealth

Get the current percentage health of a unit.

Parameter

 * unit
 * String - the UnitId (e.g. "target", "party1", "raid1", etc..)

Returns

 * health
 * Integer - current health of the specified unit in health points. Returns nil if the specified unit does not exist (eg. "target" given but there is no target).

Examples
Print your health to the Say channel.

Snipped for health in your addon