Update heap_used variable to be defined and to pull from ES JVM stats.

Prior to this change, I got 'Unhandled Python exception:
NameError("global name 'heap_used' is not defined",)'