NetXMS Support Forum

English Support => General Support => Topic started by: Dani@M3T on April 02, 2014, 01:52:25 PM

Title: Environment variables in nxagentd.conf on windows?
Post by: Dani@M3T on April 02, 2014, 01:52:25 PM
Is there a possibility to use windows environment variables in nxagentd.conf on windows nodes? So we could use one config-file for all windows nodes (32bit oder 64bit, English or different language). Especially %ProgramFiles% would be usefull.
Title: Re: Environment variables in nxagentd.conf on windows?
Post by: Victor Kirhenshtein on April 02, 2014, 08:33:27 PM
No, it's not possible. I'll add it as change request though.

Best regards,
Victor
Title: Re: Environment variables in nxagentd.conf on windows?
Post by: Dani@M3T on April 02, 2014, 08:52:55 PM
thanks for clarification and putting it on the list.
Title: Re: Environment variables in nxagentd.conf on windows?
Post by: Dani@M3T on August 20, 2014, 12:55:33 PM
any news in this case?
Title: Re: Environment variables in nxagentd.conf on windows?
Post by: Victor Kirhenshtein on August 20, 2014, 09:22:48 PM
Seems that it was forgotten. I've scheduled it for 1.2.17 release.

Best regards,
Victor
Title: Re: Environment variables in nxagentd.conf on windows?
Post by: Dani@M3T on October 21, 2014, 08:50:15 PM
After update to NetXMS V1.2.17 I tested the new feature to use environment variables in agent config for windows agents.
So I replaced in Agent Config Manager "C:\Program Files" thrue "%ProgramFiles%". Than I restarted the agent on a Win2012R2 node. The local 'nxagnetd.conf'-File was updated and contains now "%ProgramFiles%". But the agent doesn't start after that.
Title: Re: Environment variables in nxagentd.conf on windows?
Post by: Victor Kirhenshtein on November 04, 2014, 11:20:03 AM
Hi,

you should use ${} (UNIX-like) for environment variable expansion in configs. I've choose that form because you may need to pass % sign to underlying layer (for example, it is often used in names of performance counters), and then you'll have to escape all % that are already there in configs. So, ${ProgramFiles} should work.

Best regards,
Victor
Title: Re: Environment variables in nxagentd.conf on windows?
Post by: Dani@M3T on November 05, 2014, 01:08:18 PM
Thanks Victor. I can confirm it's working like this. So I only need one AgentConfig for all kind of Windows agents! (language, 32bit, 64bit)