Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support
  3. NetXMS deletes interface and recreates it and sends notifications

NetXMS deletes interface and recreates it and sends notifications

Scheduled Pinned Locked Moved Support
5 Posts 3 Posters 18.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I
    I
    johnny
    wrote on last edited by
    #1

    Hello all,
    I'm facing a problem, on a pc that has tunnel interfaces for VPN connections. After the interface get up/down then it deletes the interface and recreates it, and it also gives it an expected state up so I get notifications and email warnings.
    I've done delete the interface, obviously doesn't helped. On interfaces I've done unmanage and exclude this interface from network topology with expected state ignore. Nothing of that helps.
    Is there another way to disable all other interfaces except the ethernet interface, or at least make for that specific node(pc) default expected state for new interfaces to be ignonre?
    here is a part of event log of that node:

    ID		Time		Source	DCI	Event				Sevirety	Message								Root ID
    591861	06.11.2018 12:25:32	PC	0	SYS_IF_UP			Normal	Interface "tun1" changed state to UP (IP Addr: 10.0.1.6/32)		0
    591895	06.11.2018 13:15:34	PC	0	SYS_IF_DOWN			Minor	Interface "tun1" changed state to DOWN (IP Addr: 10.0.1.6/32)		0
    591916	06.11.2018 13:24:17	PC	0	SYS_IF_ADDED			Normal	Interface "tun1" added (IP Addr: 10.0.1.6/32, IfIndex: 36)		0
    591915	06.11.2018 13:24:17	PC	0	SYS_IF_DELETED			Normal	Interface "tun1" deleted (IP Addr: 10.0.1.6/32, IfIndex: 35)		0
    591917	06.11.2018 13:24:47	PC	0	SYS_IF_EXPECTED_STATE_UP	Normal	Expected state for interface "tun1" set to UP				0
    591918	06.11.2018 13:25:52	PC	0	SYS_IF_UP			Normal	Interface "tun1" changed state to UP (IP Addr: 10.0.1.6/32)		0
    592005	06.11.2018 14:54:23	PC	0	SYS_IF_EXPECTED_STATE_IGNORE	Normal	Expected state for interface "tun1" set to IGNORE			0
    592078	06.11.2018 16:24:32	PC	0	SYS_IF_ADDED			Normal	Interface "tun1" added (IP Addr: 10.0.1.6/32, IfIndex: 37)		0
    592079	06.11.2018 16:24:42	PC	0	SYS_IF_EXPECTED_STATE_UP	Normal	Expected state for interface "tun1" set to UP				0
    592080	06.11.2018 16:25:47	PC	0	SYS_IF_UP			Normal	Interface "tun1" changed state to UP (IP Addr: 10.0.1.6/32)		0
    
    1 Reply Last reply
    0
    • T
      T
      Tursiops
      wrote on last edited by
      #2

      You can write a Hook:CreateInterface script to prevent interfaces from being created that you don't care about.
      You can also create a Hook:ConfigurationPoll script to automatically check all node interfaces, then set the interface expected state to IGNORE on interfaces you don't want to be alerted on. I wouldn't think you can do that inside the CreateInterface Hook, as the interface doesn't get created until after the script has run, but I could be wrong.

      For example the following Hook:ConfigurationPoll will set any network interface on a device detected as a printer to Ignore:

      interfaces = GetNodeInterfaces($node);
      foreach (interface : interfaces)
      {
      	if ( $node->isPrinter == TRUE ) SetInterfaceExpectedState(interface, "IGNORE");
      }
      

      Hope that helps.

      1 Reply Last reply
      0
      • G
        G
        gdodd
        wrote on last edited by
        #3

        Here is the Hook:CreateInterface script in the script library that I use to give you an idea:

        if ($1->name ~= "(?i).*Teredo.*|.*isatap.*|.*Loopback.*|.*Bluetooth.*|Local Area Connection\* 12|Local Area Connection\* 11|Local Area Connection\* 9|Local Area Connection\* 8|Local Area Connection\* 2|6TO4 Adapter|sit0") {
           return false;
        } else {
           return true;
        }
        

        You could add in tun1 to that list or whatever names you do not want to create.

        1 Reply Last reply
        0
        • I
          I
          johnny
          wrote on last edited by
          #4

          Great thank you guys.
          I got it working very helpful information.
          I also filter the nodes with $node variable.

          but why is it that when interface is down and do a status poll it says cannot poll from that interface, and when interface is back on it still says it cannot poll data from that interface?
          also if I do a configuration poll when interface is down (even restart the interface) netxms deletes that interface.

          1 Reply Last reply
          0
          • I
            I
            johnny
            wrote on last edited by
            #5

            Finally I've done it with Hook:ConfigurationPoll and I check for both "node name" and "Interface name" as well.
            If it matches both of them then I set Interface Expected State to Ignore

            interfaces = GetNodeInterfaces($node);
            foreach (interface : interfaces)
            {
            	if ( $node->name ~="(?i)Node1Name" && interface->name ~= "(?i)tun.*" ){
            	SetInterfaceExpectedState(interface, "IGNORE");
            	}else if ( $node->name ~="(?i)Node2Name" && interface->name ~= "(?i)tun.*|vmnet.*|docker.*|docker_gwbridge|vboxnet.*" ){
            	SetInterfaceExpectedState(interface, "IGNORE");}
            }
            
            1 Reply Last reply
            0

            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
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            Powered by NodeBB Contributors
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups