Quantcast
Channel: THWACK: Message List
Viewing all articles
Browse latest Browse all 20396

Re: Node Details blank when adding node Via Perl SDK

$
0
0

Hi,

 

I tried the below script and it worked (I tried with different similar IP.) I see all the details populated in node details. There should be no much change from yours, try updating this script with your values and let me know the result.

 

my @pollers = (

    'I.Status.SNMP.IfTable',

    'I.Rediscovery.SNMP.IfTable',

    'N.Details.SNMP.Generic',

    'N.Uptime.SNMP.Generic',

    'N.Cpu.SNMP.NetSnmpSystemStats',

    'N.Memory.SNMP.NetSnmpReal',

    'N.Status.ICMP.Native',

    'N.ResponseTime.ICMP.Native',

    'N.Topology_Layer3.SNMP.ipNetToMedia',

    'N.Topology_Layer3_IpRouting.SNMP.rolesRouter',

    'N.Topology_Layer3_IpRouting.SNMP.ipCidrRouter',

    'N.ResponseTime.SNMP.Native',

    'N.Status.SNMP.Native',

    'N.Routing.SNMP.Ipv4CidrRoutingTable',

    'N.AssetInventory.Snmp.Generic',

    'N.Cpu.SNMP.HrProcessorLoad',

);

# Changed Community

my $resp = $swis->Create(

    'Orion.Nodes',

    {

        'Contact'               => 'DGATES',

        'Location'               => 'owb.1145.01.02',

        'Caption'              => 'apitest3',

        'IPAddress'            => '192.168.143.232',

        'IPAddressGUID'        => ip2guid('192.168.143.232'),

        'NodeDescription'       => 'API Test #3',

        'SysName'               => 'apitest3',

        'DynamicIP'            => 'false',

        'EngineID'             => 1,

        'Status'               => 1,

        'Allow64BitCounters'   => 'true',

        'ObjectSubType'        => 'SNMP',

        'EntityType'           => 'Orion.Nodes',

        'SNMPVersion'          => 2,

        'Community'            => 'tnci991145',

        'MachineType'          => 'net-snmp - Linux',

        'SysObjectID'          => '1.3.6.1.4.1.8072.3.2.10',

        'UnManaged'            => 'false',

        'Vendor'               => 'net-snmp',

        'VendorIcon'           => '8072.gif',

        'BufferNoMemThisHour'  => -2,

        'BufferNoMemToday'     => -2,

        'BufferSmMissThisHour' => -2,

        'BufferSmMissToday'    => -2,

        'BufferMdMissThisHour' => -2,

        'BufferMdMissToday'    => -2,

        'BufferBgMissThisHour' => -2,

        'BufferBgMissToday'    => -2,

        'BufferLgMissThisHour' => -2,

        'BufferLgMissToday'    => -2,

        'BufferHgMissThisHour' => -2,

        'BufferHgMissToday'    => -2,

        'PercentMemoryUsed'    => -2,

        'TotalMemory'          => -2,

        'SNMPV2Only'           => 0,

        'External'             => 'false',

        'DNS'                  => '',

        'IOSImage'             => '',

        'IOSVersion'           => '',

        'RediscoveryInterval'  => 60,

        'PollInterval'         => 180,

        'StatCollection'       => 5,

    }

);

 

$resp =~ /NodeID=(\d+)\</;

my $nid = $1;

print "New node id is $nid\n";

 

foreach my $poller (@pollers) {

    print "Adding $poller to NodeID $nid\n";

    $swis->Create(

        "Orion.Pollers",

        {

            'PollerType'    => $poller,

            'NetObject'     => "N:$nid",

            'NetObjectType' => 'N',

            'NetObjectID'   => $nid

        }

    );

}


Viewing all articles
Browse latest Browse all 20396

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>