Issue with auto apply/remove template
-
Hello team,
I have configured a simple script which work as a DCI in NetXMS. The script and the DCI works perfect, but the devices on which i need the script are a lot and i have configured auto apply on a template, which seemed to be working fine.
The auto apply script is really simple, it check if the device have a specific Custom Attribute and if it is router or switch:
if ((GetCustomAttribute($node, "RANCID_ENABLED") ~= "1") && ($node->isRouter ~= "1") || ($node->isBridge ~= "1"))
{ return true;
} else {
return false;
}Yesterday for some reason auto apply set devices under the template which doesn't really apply to the filter. This resulted in false positive alarms. The strange thing is when i initiate configuration poll the DCI is not removed. If removed manually it does not apply again (just tried to reproduce the issue). Is there a problem with automatically removing DCI when they no longer passes though the filter?
Configuration poll with debug level 6 from problematic device attached (nothing happens).
-
We have not faced any issues with auto remove.
Please verify, that "Remove this template automatically when node no longer passes through filter" option is selected for the template on "Automatic Apply Rules" property page.Also in your script:
Template will be applied to all routers with custom attribute or to bridges(with or without custom attributes). If you want to check custom attributes for bot is should look like:if ((GetCustomAttribute($node, "RANCID_ENABLED") ~= "1") && (($node->isRouter ~= "1") || ($node->isBridge ~= "1")))
{ return true;
} else {
return false;
} -
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