Icinga2 acces host custom variabel from service

I think this concatenation will not be evaluated there.
I have no idea if that works but you could try:
if ( macro("$host.vars.my_var_check_service_"+config+"$") == 1 ) {