Changing Template - reapply

Started by curruscanis, June 25, 2015, 07:03:20 PM

Previous topic - Next topic

curruscanis

I am starting to use templates in my install to make mass changes easier.  I have a template for windows systems to apply various data collection parameters.  I have applied the template to various systems across several containers.  I have made changes to the template but have noticed that these changes are not applied to the nodes automatically without manually re-applying the template.

I see that the template configuration has a "Automatic Apply Rules", so I entered the following script:

sub main() {
   return $node->isAgent;
}

I am not seeing the changed template "automaticly" applied to the existing nodes.  Am I missing something?

Also I would really like to only apply this to "Windows" agents not all agents but I am not familiar with how to script this.

Please help if you can, and thank you.



Victor Kirhenshtein

Hi,

you do not need auto-apply script to propagate changes on nodes where template already applied. Changes in template will be propagated on all related nodes as soon as you close data collection editor for template.

Best regards,
Victor

curruscanis

How long does this take, I have changed my template several times and it does not change the given DCI values on the nodes that it has been applied to.

Victor Kirhenshtein

Change should be instant. Another issue could be opened data collection editors for nodes - while data collection for node is open, server will not apply template changes. If this is not the case, then there is serious bug that needs additional debug.

Best regards,
Victor

joni

Also I got this problemon the M5 version. Have been disabled two DCI on Template, and then activate them - all node's have disabled DCI. I tried to repeat the same thing, after restarting the server, so that no server has not been is locked for editing.

Marco Incalcaterra

Quote from: joni on July 06, 2015, 01:32:30 PM
Also I got this problemon the M5 version. Have been disabled two DCI on Template, and then activate them - all node's have disabled DCI. I tried to repeat the same thing, after restarting the server, so that no server has not been is locked for editing.

For M5 sounds like the caching problem:

https://www.netxms.org/forum/announcements/netxms-2-0-m5-released/msg17129/#msg17129

Best regards,
Marco

joni


nxdbmgr get DefaultAgentCacheMode
NetXMS Database Manager Version 2.0-M5 Build 8027
2

joni

Disabling DCI is working, but enabling is not working from template.

Victor Kirhenshtein

Hi,

templates may be configured not override "disabled" flag on node DCIs. This is done to allow to disable unsupported/unwanted items on some nodes and not re-disable them after each template change. You can turn this off by setting ApplyDCIFromTemplateToDisabledDCI to 1.

Best regards,
Victor