Auto-Apply Template Not Working after Upgrade
-
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.
-
-
@filipp-sudanov said in Auto-Apply Template Not Working after Upgrade:
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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login