new nodes search function [SOLVED]
-
Hello,
I have Infrastructure Services structure built up (for dependency script, info on hierarchy in messages and to help build up network maps). And I was wondering if there is anything I can do to check if there are new nodes that need to be "bound" to the structure.
I was thinking of building a script that gets node on a discovery poll and compares if it is somewhere in Infrastructure Services. If not, add it to some temporary folder in the infrastructure (so it is "found" on the next poll, and highlighted as "new").
Problems I can see are load it could make on every poll, but more importantly - I don't have idea how to check the infrastructure to compare it. The node can be anywhere deep in the infrastructure, how would you solve such check ?Script that does it once per request might be even better and this has led me to another question - is there some kind of parameter in database that might say there is a link and the node has been "bound" somewhere ?
For start it would be sufficient to run a query against the DB to check if nodes are "not bound anywhere".
Have not found suitable parameter though.With regards,
M.Sperl
-
I have this solved like this: I have a Container in "Infrastructure Services" named "!Unassigned". This Container has an autobind script:
parents = GetNodeParents($node); foreach(p : parents) { if ((p->type != 1) && (p->name != "!Unassigned")) { return false; } } return true;Please note you have to have "CheckTrustedNodes" set to 0 for this script to work.
For a further explanation of what this script does, see this thread:
https://www.netxms.org/forum/general-support/bound-unbound-nodes/ -
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