Get elasticsearch hostname in watcher

I need to get the hostname of the elasticsearch node which executes a watch. As far as it seems it is not available as a ctx variable. As well it seems not possible to get it directly by painless. Does anybody know how this can be done?