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. hook::CreateInterface After adding script, interface name become unknown

hook::CreateInterface After adding script, interface name become unknown

Scheduled Pinned Locked Moved Support
5 Posts 2 Posters 33.3k 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.
  • H
    H
    hmjvaline
    wrote on last edited by
    #1

    i use netxms server 4.4.2
    after hook::CreateInterface add below script ,interface name and descript become unknown. why? 

    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;
    }

    1 Reply Last reply
    0
    • F
      F
      Filipp Sudanov
      wrote on last edited by
      #2

      Can you show a screenshot how these "unknown" name and description look like?
      Is it so for all interfaces that are being created or for some (agent, snmp, with specific name?)
      What if you try a simpler regex, without alternatives, would it change anything?

      1 Reply Last reply
      0
      • H
        H
        hmjvaline
        wrote on last edited by
        #3
        [color=#202124][size=5][font=Verdana, Arial, Helvetica, sans-serif]In the attached file, I have attached normal and abnormal screenshots.[/font][/size][/color]
        
        [pre][color=#202124][size=5][font=Verdana, Arial, Helvetica, sans-serif]the normal interface display after I remove the script.[/font][/size][/color]
        
        [color=#202124][size=5][font=Verdana, Arial, Helvetica, sans-serif]I only use the simplest snmp polling and agent. Before adding this script to the hook,
        interface name and description was normal without using any regular expressions.[/font][/size][/color]
        

        [/pre]


        abnormal.PNG

        normal.PNG

        1 Reply Last reply
        0
        • H
          H
          hmjvaline
          wrote on last edited by
          #4

          I'm sorry. I found that some interface names appear unknown not because of the hook script but because there is no appropriate snmp mib and agent installation. If the interface is only obtained through icmp and arp, it seems that only the unknown name can be obtained.

          1 Reply Last reply
          0
          • F
            F
            Filipp Sudanov
            wrote on last edited by
            #5

            Yes, that's exactly how it works. If at some point server would be able to get info about interfaces from agent, this interface will be recreated with proper name.

            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