When importing your nodes and you wish to change the credentials to SNMPv3, you will need to modify the import_nodes.pl file with the following configuration changes.
Info | ||
---|---|---|
| ||
The sample CSV looks like this: --sample-- name,host,group,role,community,username,authprotocol,authpassword,privprotocol,privpassword import_test1,127.0.0.1,Branches,core,nmisGig8,nmis,md5,nmisGig8,aes,nmisGig8 import_test2,127.0.0.1,Sales,core,nmisGig8,nmis,md5,nmisGig8,aes,nmisGig8 import_test3,127.0.0.1,DataCenter,core,nmisGig8,nmis,md5,nmisGig8,aes,nmisGig8 --sample-- |
here.
Info |
---|
if ( $newNodes{$node}{name} ne "" and $newNodes{$node}{host} ne "" and $newNodes{$node}{role} ne "" and $newNodes{$node}{community} ne "" and $newNodes{$node}{username} ne "" and $newNodes{$node}{authprotocol} ne "" and $newNodes{$node}{authpassword} ne "" and $newNodes{$node}{privprotocol} ne "" and $newNodes{$node}{privpassword} ne "" ) |
and here
Info | ||
---|---|---|
| ||
$LNT->{$nodekey}{name} = $newNodes{$node}{name}; $LNT->{$nodekey}{host} = $newNodes{$node}{host} || $newNodes{$node}{name}; $LNT->{$nodekey}{group} = $newNodes{$node}{group} || "NMIS8"; $LNT->{$nodekey}{roleType} = $newNodes{$node}{role} || "access"; $LNT->{$nodekey}{community} = $newNodes{$node}{community} || "public"; $LNT->{$nodekey}{username} = $newNodes{$node}{username} || $newNodes{$node}{username}; $LNT->{$nodekey}{authprotocol} = $newNodes{$node}{authprotocol} || $newNodes{$node}{authprotocol}; $LNT->{$nodekey}{authpassword} = $newNodes{$node}{authpassword} || $newNodes{$node}{authpassword}; $LNT->{$nodekey}{privprotocol} = $newNodes{$node}{privprotocol} || $newNodes{$node}{privprotocol}; $LNT->{$nodekey}{privpassword} = $newNodes{$node}{privpassword} || $newNodes{$node}{privpassword}; |
This will configure the nodes to import the credentials for SNMPv3. This will not change the SNMP version from v2 to v3. If you wish to change the version, change the following from this.
Info |
---|
$LNT->{$nodekey}{version} = $newNodes{$node}{version} || 'snmpv2c'; |
to this:
Info |
---|
$LNT->{$nodekey}{version} = $newNodes{$node}{version} || 'snmpv3'; |
You can then change your .csv file to add the new content fields as seen in the sample at the top of the page.