Forum Discussion
I don't understand the specific error message but using '##token##' thing is more for powershell. For Groovy you would use something like bandwidth = hostProps.get("system.aws.bandwidth") instead (see https://www.logicmonitor.com/support/logicmodules/datasources/datapoints/complex-datapoints#groovy). Also is that an LM Cloud device? I'm not sure if you can use groovy with a LM cloud collector.
Yes, I tried to use both - hostProps and token. This is LM Cloud so I might need to check with the vendor probably.
- Mike_Moniz6 days ago
Professor
I would try as a test just "return 10" to see if even that works. If it does then perhaps try rebuilding your script in steps, like do the hostprops assignment and just return 10, then add one if statement, etc. See what exact line it's complaining about.
- Egis6 days ago
Neophyte
Thanks for advice. Unfortunately, the same error appears.
- Mike_Rodrigues5 days ago
Product Manager
I'd guess it has something to do with it being LM Cloud.
Is there a collector assigned to that resource? If not, the Groovy CDP won't have a place to run.
##TOKENS## should work in Groovy or Powershell, it's just string replace. hostProps, taskProps, instanceProps are preferred (and more performant, as the script can avoid recompilation for different values)
Related Content
- 2 months ago
- 9 months ago
- 10 months ago