cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 7

problem to add a node from a perl script

Hi,

I was able to delete a node, but I was not able to add a node.  I really don't know what wrong with my perl script is.

Please help.

Thanks in advance.

The script printed out "done", but I don't see the new node in NCM.

use SW::InformationService;

use SW::Orion;

use SOAP::Lite;

my $hostname = "localhost"; # fill in a hostname

my $username = "admin";

my $password = "abc";

my $endpoint = "https://$hostname:17778/SolarWinds/InformationService/v3/OrionBasic";

my $swis = SW::InformationService->new();

$swis->outputxml("true");

$swis->proxy($endpoint);

$swis->proxy->ssl_opts(verify_hostname => 0);

$swis->proxy->http_request->authorization_basic($username, $password);

my $ip = '10.10.10.10';

my $node_name='ten';

my $False='false';

my $True='true';

my $AddedNode = $swis->Create('Orion.Nodes',

    {

    IPAddress=> $ip,

    IPAddressGUID=>ip2guid($ip),

    EntityType=>'Orion.Nodes',

    Caption=>$node_name,

    DynamicIP=>$False,

    EngineID=>$True,

    Status=>$True,

    UnManaged=>$False,

    Allow64BitCounters=>$True,

    External=>$False,

    ObjectSubType=>"SNMP",

    Community=>"public",

    SNMPVersion=>2,

    Comments=>"added by script",

    });

print "\n done \n";

0 Kudos
0 Replies