Add logstash variables for memory

This also cleans up the variables naming and usage.