NetXMS Support Forum

English Support => General Support => Topic started by: lindeamon on November 09, 2011, 03:14:31 PM

Title: Agent Configuration
Post by: lindeamon on November 09, 2011, 03:14:31 PM
hi,

i have two netxms servers:
1. v1.1.5 on centos 6 linux
2. v1.1.6 on win2k3 server

on both servers i have created the same agent configuration.
i have two servers with different agents versions v1.1.5 and v1.1.6

no matter where i point the agent to get the configuration from and no matter which agent is trying to pull the config i get the same error:
Script (AgentCfg::1) execution error: syntax error, unexpected '/'

and there are no extra '/' in the config

any idea ?
10x
lindeamon
Title: Re: Agent Configuration
Post by: Victor Kirhenshtein on November 09, 2011, 03:37:15 PM
Hi!

It's error in filtering script, not a config itself. How your filtering script for config looks like?

Best regards,
Victor
Title: Re: Agent Configuration
Post by: lindeamon on November 09, 2011, 03:42:18 PM
hi victor,

i have used this template back from the days i started with version 1.0.12.
in this version the default configuration was that in the filtering section there were comments that pointed out the variables one can use in the filtering script like $1 and so.
so it looks something like this:
/////////////////////////////////
// smoething
// $1 - the ip address.....

is this the issue ? if so,we have to have the parameters mentioned anywhere otherwise, at least for me, i will not be able to remember them

Best Regards,
Lindeamon
Title: Re: Agent Configuration
Post by: Victor Kirhenshtein on November 09, 2011, 03:45:28 PM
It is ok to have comments this way in the script. The problem is probably due to either bug in NXSL interpreter, or some typo (or maybe non-printable character) in filtering script. You can also try to copy script into file and try to execute it with nxscript.

Best regards,
Victor
Title: Re: Agent Configuration
Post by: lindeamon on November 09, 2011, 03:47:04 PM
hi victor,

i have deleted everything in the filtering section and now i get unexpected $end

Best Regards,
Lindeamon
Title: Re: Agent Configuration
Post by: lindeamon on November 09, 2011, 04:16:30 PM
hi victor,

i have configured the agent configuration filter to use the $2 var and everything worked fine.
does that mean that i will always have to configure filtering ? it wasn't a requirement before.

Best Regards,
Lindeamon
Title: Re: Agent Configuration
Post by: Victor Kirhenshtein on November 09, 2011, 05:40:01 PM
Filtering script always should have a body. If you don't need filtering, just use


return true;


Best regards,
Victor
Title: Re: Agent Configuration
Post by: lindeamon on November 09, 2011, 05:45:59 PM
thank you victor,

as for now i have configured the script to filter both netxms server but it is good to know this solution.

Best Regards,
Lindeamon