Config Poll Hook script error help
-
I am using the following script to rename the node to the discovered snmp name
9 if (($node.snmpSysName != "") and ($node.snmpSysName !=null))
10 {
11 return $object.rename($node->snmpSysName);
12 }I always get this error and Im not sure why as it compiles and runs without issue
Script (Hook::ConfigurationPoll) execution error: Error 14 in line 9: Function or operation argument is not an object -
This hook is not limited to Nodes, so $node can be null while $object is set.
If you are interested in nodes only, just check for $node:if ($node and not $node.snmpSysName.isEmpty()) { $node.rename($node.snmpSysName); } -
-
Objects.Nodes.ResolveNames - this works only when node is created.
There's Objects.Nodes.SyncNamesWithDNS, but this one is taking names from DNS only (also not that activating this parameter currently requires server restart which contradicts with what UI is saying - it's a bug)
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