Thanks, this looks like what @michel_kessler was suggesting, but it gives more detail. I also tried what @Shaoranlaos suggested, and that worked as well - I will need to process the filename for the databases which share a host, and therefore an agent, but I do prefer the environment variable to mangling the hostname for our setup.