Forum Discussion

Miguel_DeCamps's avatar
3 years ago

configsource multi-instance does the collector attribute code run 1 time per instance?

For configsources does the collector attribute groovy script section run at a per-instance level ? 

I am porting the cisco config source to be used with our Adtran devices I created a multi-instance configsource where Discovery discovers the individual config instances Example ['running-config', 'startup-config', 'version'] in my mind I thought in the collector attribute portion of a configsource where I paste the portion of my groovy script that pulls the data for the instance and prints it to standard out that I could simply in the same execution piece together and print all three outputs of the instances (what ends up happening is that all three outputs get combined into one).

 I ended up changing my code to essentially now run on a per instance level which I believe in effect will connect to the device 3 different times to gather the data for each of the instances (this works). Figured I would ask.

Thanks for your help!