NetXMS Support Forum

English Support => General Support => Topic started by: technikcst on August 04, 2015, 09:51:53 AM

Title: Mikrotik PPP Interfaces
Post by: technikcst on August 04, 2015, 09:51:53 AM
Hi,

I am monitoring many wireless sectors - with many pppoe interfaces. The problem is: once a client disconnects the pppoe interface gets deleted and if he reconnects the interface has a new id. So there are many false alerts on interface down as the "expected interface state" gets always reset to "up".

So my question is: is there a way to either set the default interface expected state of newly created interfaces to ignore, or change the way that netxms detects ppp interfaces?

Regards,
Christoph
Title: Re: Mikrotik PPP Interfaces
Post by: tomaskir on August 04, 2015, 11:51:13 AM
You can do all of these in a configuration poll hook.

This is an example to just delete dynamic interfaces, so NetXMS doesnt even know about them:

1) Create a script in script library called "Hook::ConfigurationPoll"
2) Here is the code:

// if this is a MikroTik device
if ($node->snmpOID == ".1.3.6.1.4.1.14988.1")
{
  intArray = GetNodeInterfaces($node);
 
  foreach (int : intArray)
  {
    // if the interface is dynamic
    if ((left(int->name, 1) == "<") && (right(int->name, 1) == ">"))
    {
      // delete the interface
      DeleteObject(int);
    }
  }
}

Title: Re: Mikrotik PPP Interfaces
Post by: technikcst on August 04, 2015, 10:02:14 PM
Thanks for this easy solution =)
Title: Re: Mikrotik PPP Interfaces
Post by: letabawireless on January 10, 2017, 08:01:49 AM
Hi there

I am a bit of a newbie on NetXMS - do I have to apply the script somehow to a template, or does it automatically consider the script for all nodes ?

Thank you
Title: Re: Mikrotik PPP Interfaces
Post by: Victor Kirhenshtein on January 10, 2017, 11:14:51 AM
Hi,

if script has name Hook::ConfigurationPoll then it will be called automatically for each node at each configuration poll run.

Best regards,
Victor
Title: Re: Mikrotik PPP Interfaces
Post by: letabawireless on January 12, 2017, 07:24:02 AM
Hi

Thank you Victor - that sorted it !
Title: Re: Mikrotik PPP Interfaces
Post by: kiki on January 17, 2017, 06:50:41 PM
Other Solution:
In mikrotik create PPPoE Server Binding.

Go to PPP>Interface>Add PPPoE Server Binding

User should be same as radius login name.