3 Replies Latest reply: Feb 7, 2012 10:19 AM by mkomeara RSS

Orion SDK, Add network interface and Volumes

lmas
Currently Being Moderated

Hi,

First of all, thanks for the great SDK you provide :d). I'm using the powershell api, and it works fine.

I have several questions about how to add network interface and volumes for monitoring.

My problem is how to find the network interface index and name, and how to find the volumes index and caption; Is there a way to collect them using API as in the web interface when we click on List Resources?

My second question is about when I had a volume (I get the index and the name manually) and I'm using the API (following code), i have an error on Volume Polling Details : The "Volume Polling Details " resource threw an exception..
Specified cast is not valid.

 

powershell Code:

$newVolProps = @{
 NodeID=$nodeProps["NodeID"]; # NodeID on which the interface is working on
 VolumeIndex=[int]$VolumeIndex;
 Status=0;
 Type ="Fixed Disk";
 Icon ="FixedDisk.gif";
 Caption=$VolumeCaption;
 VolumeDescription=$VolumeDescription;

 }
 $newVolUri = New-SwisObject $swis –EntityType "Orion.Volumes" –Properties $newVolProps
 $VolProps = Get-SwisObject $swis -Uri $newVolUri
 # register specific pollers for the node
 # Disk Poller
 
 $poller = @{
 PollerType="Poller_VO";
 NetObject="V:"+$VolProps["VolumeID"]
 }
 $pollerUri = New-SwisObject $swis -EntityType "Orion.Pollers" -Properties $poller

 

thanks for your help

  • Re: Orion SDK, Add network interface and Volumes
    tom.rybka
    Currently Being Moderated

    Imas,

    To your first question, we are working on a design of more comfortable API that would cover the complexity of respective use cases.

    To the second question, please try to initialize/set the RediscoveryInterval (PollInterval and StatCollection eventually, too) properties for volume entities. Although the properties are not declared in Orion.Volumes entity type, they should be recognized and this should help you.

More Like This

  • Retrieving data ...