2 Replies Latest reply on Jul 13, 2017 3:05 PM by ekis

    PowerShell - SAM/Orion SDK - Display LED Status for Custom Properties for a node being monitored via ICMP

    zeenyc

      Orion Experts,

      I am trying to add Custom Properties to a node that is being monitored via ICMP. 

       

      $Ndata = Get-OrionNode -IPAddress  OrionServerIP -SwisConnection $swis

      $nodeId = $Ndata.NodeID

      $customProps= @{

          NodeID =$nodeId;  # NodeID where the interface appears

          CPUStatus = 0;  

          RAMStatus = 0;

          DiskspaceStatus = 0;

             }

      Set-SwisObject $swis -Uri $uri -Properties $customProps

      # build the interface URI

      $uri = "swis://OrionServerFQDN/Orion.Nodes/NodeID=$($nodeId)/CustomPropery";

      Set-SwisObject $swis -Uri $uri -Properties $customProps

       

      When trying the above code I am getting following error.

       

      Set-SwisObject : Invalid SWIS uri at character 72: Filter property name not specified for primary filter.

      Parameter name: uri

      At line:10 char:1

      + Set-SwisObject $swis -Uri $uri -Properties $customProps

       

      As end results I want to have LED Status for each property from one of the following.

       

      Green = OK , Orange = Warning, RED = Critical. 

       

      NodeName = LED Green if UP (This is already done via ICMP) I can see that orion is using “UP.GIF” to display the status. 

      CPU Status = (Green/ Orange/RED)

      RAM Status = (Green/Orange/RED)

      DiskSpaceStatus  = (Green /Orange/RED)