Triggering configuration poll/template deployment by NXSL

Started by Benjamin Dill, November 07, 2023, 05:18:11 PM

Previous topic - Next topic

Benjamin Dill

Following situation: We have nodes which are only a few minutes online every day, used for running a few scripts. These scripts are deployed by templates in NetXMS and are updated from time to time, but as these nodes are virtually never online for a configuration poll and updated files from the templates get never deployed.

Is there a way to trigger a configuration poll of these nodes by script, using one of the hooks? I studied the NXSL reference but I found nothing helpful.

Thank you!

Filipp Sudanov

Configuration polls are executed periodically on their own schedule (previously it was so that configuration poll was executed only if status poll detected node up situation, but that had issued - e.g. SNMP community string changed and that required conf poll to find the correct one).

For tunnel nodes, however, conf poll should be scheduled right after tunnel is established, so you can try that.

There is no way to force a poll from NXSL, I've created an issue so at some moment of time this could be added: https://track.radensolutions.com/issue/NX-2480

A bit crazy approach which might currently work - we have an option to redefine poll intervals using custom attributes, e.g:
SysConfig:Objects.ConfigurationPollingIntervalso status poll hook can detect that node comes up and set such custom interval (with value say 60) and conf poll hook would delete this custom attribute.

Benjamin Dill

Wow, thanks, that will work: These nodes are up for about 15 minutes. If I set the custom attribute to 10 minutes every node should get one poll per uptime  :)