On a separate note, but related, One other thing that I've noticed is that my Nodes and Interfaces get added, but they just hang out there without being polled. I set my rediscovery and next poll 5 minutes into the future, and have verified that the pollers get created.
The only way I have been able to get this to work is to manually restart the Orion services, and then poll/rediscover via the web interface. This gets the CPU and interface data updated, but the node details remains empty.
My functions for Node and Interfaces are as follows:
function ImportSNMPNode ($IPAddress, $NodeCaption, $SNMPCommunity, $Rediscover )
{
# add a node
$newNodeProps = @{
EntityType="Orion.Nodes";
IPAddress=$IPAddress;
Caption=$NodeCaption;
DynamicIP=$False;
EngineID=4;
Status=1;
UnManaged=$False;
Allow64BitCounters=$False;
ObjectSubType="SNMP";
SysObjectID="";
MachineType="";
VendorIcon="";
SNMPVersion="2";
Community=$SNMPCommunity;
RediscoveryInterval=30;
PollInterval=120;
StatCollection=10;
NextRediscovery=[DateTime]$Rediscover;
NextPoll=[DateTime]$Rediscover;
}
$newNodeUri = New-SwisObject $swis -EntityType "Orion.Nodes" -Properties $newNodeProps
$nodeProps = Get-SwisObject $swis -Uri $newNodeUri
$importPollers = @(Import-CSV $importFile) |
Where { $_.IP -eq $IPAddress } |
Where { $_.EntityType -eq "NodePoller"}
FOREACH ( $NodePoller in $importPollers )
{
$PollerType = $NodePoller.Caption
$Enabled = $NodePoller.Property
$poller = @{
PollerType="$PollerType";
NetObject="N:"+$nodeProps["NodeID"];
NetObjectType="N";
NetObjectID=$nodeProps["NodeID"];
Enabled=$Enabled;
}
$pollerUri = New-SwisObject $swis -EntityType "Orion.Pollers" -Properties $poller
}
$pollThisNow = Invoke-SwisVerb $swis Orion.Nodes PollNow @("N:" + $nodeProps["NodeID"])
}
function ImportInterface ($NodeID, $IntSNMPIndex, $IntCaption, $IPAddress, $Rediscover)
{
$newIntProperties = @{
NodeID=[INT]$NodeID;
InterfaceName= $IntCaption;
IfName=$IntCaption;
Caption=$IntCaption;
InterfaceIndex=[INT]$IntSNMPIndex;
ObjectSubType="SNMP";
Status=1;
StatusLED="Up.gif";
AdminStatus=1;
AdminStatusLED="Up.gif";
OperStatus=1;
OperStatusLED="Up.gif";
CollectAvailability=1;
RediscoveryInterval=5;
PollInterval=120;
StatCollection=9;
NextRediscovery=[DateTime]$Rediscover;
}
$newIntUri = New-SwisObject $swis –EntityType "Orion.NPM.interfaces" –Properties $newIntProperties
$IntProps = Get-SwisObject $swis -Uri $newIntUri
$importPollers = @(Import-CSV $importFile) |
Where { $_.IP -eq $IPAddress } |
Where { $_.SNMPIndex -eq $IntSNMPIndex } |
Where { $_.EntityType -eq "InterfacePoller"}
FOREACH ( $IntPoller in $importPollers )
{
$PollerType = $IntPoller.Caption
$poller = @{
PollerType=$PollerType;
NetObject="I:"+$IntProps["InterfaceID"];
NetObjectType="I";
NetObjectID=$IntProps["InterfaceID"];
}
$pollerUri = New-SwisObject $swis -EntityType "Orion.Pollers" -Properties $poller
}
Write-Host "Interface: NodeId " + $NodeId + ", InterfaceIndex " + $IntSNMPIndex + ", Caption " + $IntCaption +" imported"
}
Any ideas? I notice that the node details resource remains empty, and if you monitor the dbo.Nodes, nothing gets updated. The NextPoll and Rediscovery periods don't ever get updated.