I just noticed that my Auto-Apply scripts are non-functional. All of them. Did something change in v4 about the way these are run? Here's a basic script I have on a template that we apply to all devices:
if (classof($object) != "Node")
return false;
return true;
I just added 6 nodes and none of them came up with this template.
Hi,
what exact server version you are using? There was a bug in auto-apply functionality, but it should be fixed in latest patch release.
Best regards,
Victor
This is what's installed:
netxms-agent/bullseye,now 4.0.2157-1 amd64 [installed,automatic]
netxms-base-dbg/bullseye,now 4.0.2157-1 amd64 [installed,automatic]
netxms-base/bullseye,now 4.0.2157-1 amd64 [installed,automatic]
netxms-dbdrv-mariadb-dbg/bullseye,now 4.0.2157-1 amd64 [installed]
netxms-dbdrv-mariadb/bullseye,now 4.0.2157-1 amd64 [installed,automatic]
netxms-dbdrv-sqlite3/bullseye,now 4.0.2157-1 amd64 [installed,automatic]
netxms-server-dbg/bullseye,now 4.0.2157-1 amd64 [installed]
netxms-server/bullseye,now 4.0.2157-1 amd64 [installed]
If I apt-update, I have no new packages to be installed.
This looks to be the most recent version.
What's the value of Objects.AutobindPollingInterval in Configuration -> Server configuration?
Note that now there's poll on templates themselves, what happens if you right-click a template and select Poll -> Automatic bind?
Try adding
trace(0, "some text");
to your auto-bind script. When you do automatic bind poll, does this "some text" appear in server log?
Hi Filip,
I just checked the devices I added on Monday and the templates have been applied. I was just used to the templates being applied automatically when a device was added. The Objects.AutobindPollingInterval is 3600 (default) so likely the templates were applied within an hour of adding the devices.
Thanks for the help!
In 4.0 auto-apply was reworked so that it happens from template/container side. But the case when a new node is added was kinda forgotten. Will discuss that internally with developers.
I had to alter the server config for trusted nodes back to 1
It seemed to turn off.
Doing this and server restart and they are working again!
Quote from: Filipp Sudanov on March 03, 2022, 01:44:17 PM
In 4.0 auto-apply was reworked so that it happens from template/container side. But the case when a new node is added was kinda forgotten. Will discuss that internally with developers.
Thanks, we would greatly appreciate this! We are adding nodes every day, and being able to see values straight away is helpful.