Port Negotiation Template
-
Hello,
I'm trying to setup a template that collects port negotiation rates on Mikrotik devices. I get the info that I want on physical ports, but I get 0 results on virtual interfaces. I would like to filter out virtual interfaces so DCIs are not being created.
transport = CreateSNMPTransport($node);
if (transport == null)
return false;
// get the interface name to return as instance-name
vb = SNMPGet(transport, ".1.3.6.1.2.1.31.1.1.1.1." .. $1);
if (vb == null) or (vb == 0)
return false;
// filter out loopback
if (vb.value == "lo")
return false;
return %(true, $1, vb.value);I've tried using contains(vb.value, "vlan") on the bottom statement, but that just breaks the script.
-
-
Thanks tolimanjo. That limited it, but it seems that I can't call the variable interface.name for the display name.
-
Not sure about the absent interface.name - possibly a version issue?
I've attached screenshots of an example similar to your approach. It worked for me on server version 5.2.x (Debian) against a 6-port MikroTik.



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