Currently is not possible to add additional ENV variables to be exported to ES.
Proposal
Add custom fields to ES docs using the logstash plugin.
def myFields = [:]
myFields['env_a'] = 1
myFields['env_b'] = 2
logstashSend failBuild: false, maxLines: 200,customData: myFields
Hello, there has been several attempts at this in the past (none completed), most recently https://github.com/jenkinsci/logstash-plugin/pull/98
PRs are welcome