node discovery poll
-
would it be possible to add a manual discovery poll on a subnet? similar to a manual node poll?
i.e. (EntireNetwork->(zoneUIN)->subnet/mask) rightclick -> poll -> discoveryAlong with a Hook::DiscoveryPoll script that could be called even if no new nodes are added. This way a subnet-customattribute could be updated with a last run date/time similar to Alex's configuration poll example.
Thx.
-
All polls run on a node level. It is possible to add discovery poll menu on subnet object, but all it can do is to start discovery polls on each node within subnet.
When exactly you want discovery poll hook to be called?Best regards,
Victor -
Since the subnet doesn't show up unless there is a node in it, that means there is a node to do the discovery on. I assume it then looks at the arp table , fdb, cdp, or lldp, of the existing nodes for new nodes.
As to when to do the hook, either at the beginning of the process or the end, i guess it doesn't matter. what i would be looking to do is set a custom attribute with a last run date/time, whether or not it found anything new.
-
I'm a bit lost - are we talking about hook script or about manually starting discovery poll? Hook script already exist - you can use it to update attributes on all subnets where current node belongs.
Best regards,
Victor -
Manually Starting a Discovery Poll on a subnet.
As far as existing hook scripts ...I don't see one that would have access to the subnet object (at least not in the comments).
-
This is simple hook script that sets attribute "lastDiscoveryPoll" to current time for all node's subnets:
for(o : GetObjectParents($node)) { if (o->type == 1) { SetCustomAttribute(o, "lastDiscoveryPoll", time()); } }Best regards,
Victor -
Thx.
I maybe a little thick......would i create a new script called Hook::DiscoveryPoll or add that into one of the existing Hook:: scripts?
I currently have:
11 - Hook::StatusPoil
12 - Hook::ConfigurationPoll
13 - Hook::InstancePoll
15 - Hook::CreateInterface
16 - Hook::AcceptNewNode -
Actually, I made a mistake here. There are hook for topology poll (it's not created by default for some reason, should be called Hook::TopologyPoll), but not for discovery poll. I'll add discovery poll hook in next release.
Best regards,
Victor -
Just added new hook "DiscoveryPoll" - it will be available in 2.2.8.
Best regards,
Victor
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