4 Replies Latest reply on Aug 6, 2012 10:39 AM by tdanner

    Addnode problems

    chertkowrb

      Hey, I just tried to use the Perl SDK to create a new node, and the discovered node is never rediscovered, nor does it ever act like a normal node. Here's the code I used:

       

      print $swis->Create('Orion.Nodes',

      {

        'EntityType'=>'Orion.Nodes',

        'IP_Address'=>'10.215.255.236',

        'IPAddressGUID'=>'ECFFD70A-0000-0000-0000-000000000000',

        'SNMPVersion'=>'2',

        'Community'=>'public',

        'Caption'=>'RDCASANTAC-B',

        'DNS'=>'rdcasantac-b.oneabbott.com',

        'SysObjectID'=>'1.3.6.1.4.1.9.1.543',

        'SysName'=>'RDCASANTAC-B.oneabbott.com',

        'Location'=>'',

        'Contact'=>'',

        'DynamicIP'=>0,

        'EngineID'=>2,

        'Status'=>1,

        'UnManaged'=>0,

        'Allow64BitCounters'=>1

         

      });

       

      The SysObjectID and GUID are correct because they are taken directly from the DisocveredNodes table. Thing is, I ran this 5 days ago, and while it created the node, it never rediscovers it, and never fills in the details like system description and Machine Type. In fact, below, I've copied the Polling details section below. As you can see, the database update is as of today (8/3/2012) but the next rediscovery is listed as 7/30/2012 11:22 AM.

       

      This is reproducible, repeatedly, and happens no matter what I put in the code. Thing is, if I go through the frontend and go off of the discovered entry in the discovery profile, it works fine. So there's nothing wrong with this particular router node as far as managability, and the values that I used in the addnode code above are identical to what gets added to the nodes table after I go through the frontend.

       

      I think that there's something wrong with the SDK itself, rather than the code, since there's nothing special about what I'm doing here.

       

      Ideas?

       

      Node Details

      Management Edit Node  List Resources  Unmanage  Remanage  Pollers  Poll Now  Rediscover
      Node StatusNode status is Up.Node is Up.
      IP Address 10.215.255.236
      Dynamic IP No
      Machine TypeUnknown
      DNS rdcasantac-b.oneabbott.com
      System Name RDCASANTAC-B.oneabbott.com
      Description
      Location
      Contact
      SysObjectID 1.3.6.1.4.1.9.1.543
      Last Boot
      Operating System
      IOS Image Unknown
      Hardware Physical
      No of CPUs 0
      Telnet telnet://10.215.255.236 Web Browse http://10.215.255.236

       

      Polling Details

      Polling EngineWT00056D (10.228.157.77)
      Polling MethodSNMP
      Polling Interval120 seconds
      Next Poll01:44 PM
      Statistics Collection10 minutes
      Enable 64 bit CountersYes
      Rediscovery Interval30 minutes
      Next Rediscovery7/30/2012 11:22 AM
      Last Database Update8/3/2012 01:42 PM
        • Re: Addnode problems
          tdanner

          Did you add the pollers (Orion.Pollers entries) for the node? If you got the node info from Orion.DiscoveredNodes, then you can look at Orion.DiscoveredPollers to see what pollers to add.

          1 of 1 people found this helpful
            • Re: Addnode problems
              chertkowrb

              Thanks. I'll try that out.

              • Re: Addnode problems
                chertkowrb

                That was exactly the problem. I was able to pick up the 7 pollers from DiscoveredPollers to do this and then it went fine.

                 

                So I can tell that I'm going to end up building a perl module that allows me to handle all of the key basics that I would do to add a new node, which is, from what I can tell:

                 

                1. Add the node (using the data from DiscoveredNodes) Pull the new NodeID.

                2. Add the pollers for the node (using the data from DiscoveredPollers as they relate to the nodeid of the discoverednode).

                -Add the nodes as type N and attach to the nodeID from 1.

                3. Add the Interfaces to the node based on DiscoveredInterfaces for the ones that you want to monitor. Get the new InterfaceID

                4. Add the pollers found in DiscoveredPollers associated with the discovered interfaceID.

                -Add the nodes as type I and attach to the interfaceID from 3.

                 

                Assuming that I'm not misunderstanding, all of this is what's needed to do a basic add of the system to the node table to mimic the frontend in a script.

                1 of 1 people found this helpful