Quantcast
Channel: THWACK: All Content - Orion SDK
Viewing all 2677 articles
Browse latest View live

Network Discoveries

$
0
0

I have about 150-200 new scan jobs I need to create.  Does anyone have experience using the API to create the jobs ?  I know there is a sample out there somewhere but was curious if anyone had any advice prior to starting. 


vRealize: vRO Workflow

$
0
0

As part of one of our projects, we deployed vRealize on one of our servers (Server 1). We also have in our infrastructure, a PowerShell Server (Server 2) and a Solarwinds Server (Server 3).

What we would like to implement is a vRO workflow that runs on Server 1 and calls the PowerShell script on Server 2. The PowerShell script needs to connect to Solarwinds and run a query. For connecting to Solarwinds, we are using Orion SDK.

The PowerShell script connects to Solarwinds using the following command:

#Connect to the SolarWinds Server

$Swis=Connect-Swis–V2-Trusted-Hostname$Server 

 

#build the SWQL query

$Query="SELECT R.Address as SubnetAddress, R.CIDR, R.FriendlyName, R.PercentUsed, (SELECT TOP 1 I2.IpAddress FROM IPAM.IPNode as I2 WHERE I2.Status=$($IPStatusAvailable) AND I2.SubnetId = R.GroupID) AS FreeIpAddress FROM IPAM.GroupReport as R WHERE R.CIDR='$($CIDR)' AND SubnetAddress = '$($Network)'";

 

#retrieve the IP

$AddressesWithSubnets=Get-SwisData$Swis$Query;

 

There are two scenarios we tested:

• Someone connected using Remote Desktop on the PowerShell server and executed the PowerShell script. Everything went well, and the script returned the results we were expecting.

• Someone executed the VRA workflow (which connects to the PowerShell server and runs the script).

ServerConfiguration.PNG

The script fails with the following error:

  1. System.ServiceModel.CommunicationException: The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:00:59.9530496'. ---> System.IO.IOException: The write operation failed, see inner exception. ---> System.ServiceModel.CommunicationException: The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:00:59.9530496'. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host

   at System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)

   at System.ServiceModel.Channels.SocketConnection.Write(Byte[] buffer, Int32 offset, Int32 size, Boolean immediate, TimeSpan timeout)

   --- End of inner exception stack trace ---

   at System.ServiceModel.Channels.SocketConnection.Write(Byte[] buffer, Int32 offset, Int32 size, Boolean immediate, TimeSpan timeout)

   at System.ServiceModel.Channels.BufferedConnection.WriteNow(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, BufferManager bufferManager)

   at System.ServiceModel.Channels.BufferedConnection.Write(Byte[] buffer, Int32 offset, Int32 size, Boolean immediate, TimeSpan timeout)

   at System.ServiceModel.Channels.ConnectionStream.Write(Byte[] buffer, Int32 offset, Int32 count)

   at System.Net.Security.NegotiateStream.StartWriting(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)

   at System.Net.Security.NegotiateStream.ProcessWrite(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)

   --- End of inner exception stack trace ---

   at System.Net.Security.NegotiateStream.ProcessWrite(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)

   at System.Net.Security.NegotiateStream.Write(Byte[] buffer, Int32 offset, Int32 count)

   at System.ServiceModel.Channels.StreamConnection.Write(Byte[] buffer, Int32 offset, Int32 size, Boolean immediate, TimeSpan timeout)

   --- End of inner exception stack trace ---

 

Some things we did to troubleshot the error:

• Ensure the users have access on Solarwinds

• Configured WINRS

• Opened all the port on Solarwinds server

 

Our investigation revealed that Solarwinds resets the connection for some reason.

Could you please help us troubleshoot this problem?

SWQL works in studio but not in Website

$
0
0

After migrating to NPM 12.1 I've decided to update my SQL queries to SWQL queries since row limit started to bother me and searchable textbox seems to be legit.

 

My swql query looks like:

 

select
case when ccs.Availability=1 then 'Up' else 'Down' end as STATUS,
'/NetPerfmon/images/Small-' + case when ccs.Availability=1 then 'Up' else 'Down' end + '.gif' as _IconFor_STATUS,
n.Caption, c.Name,
ccs.TimeStamp,
ccs.LastTimeUp,
ccs.ErrorMessage
from
Orion.Nodes n, Orion.APM.Component c, Orion.APM.Application a, Orion.APM.CurrentComponentStatus ccs
where
n.NodeID=a.NodeID and
ccs.ApplicationID=a.ID and
ccs.ComponentID=c.ComponentID and
a.Name like 'Windows %' and
c.Name <> 'Task Scheduler' and
(c.Status=1 or c.Status=2) and
a.Unmanaged=0

 

It works perfectly on swql studio but not on custom query on website. Any comments?

 

Thanks.

Invoke-SwisVerb and how to find all the verbs and options available

$
0
0

Hi there,

 

I have spent the afternoon playing with Invoke-SwisVerb $swis "Orion.Discovery", and a rather enjoyable one it has been at that.

I have a few questions, around this, namely are there other verbs to play with?

 

I would love to be able to list the known Discovery Profiles, and even remove profiles (instead of creating duplicates), do such options exist?

Can anyone assist in shedding some light, or pointing out a decent document or post please?

(I have the Discovery · solarwinds/OrionSDK Wiki · GitHub link.)

 

 

 

Many thanks in advance,

Rich

(aka yaquaholic)

Bit of help pls?

$
0
0

I am using vRealize and Azure to build Windows servers for my company.  After these boxes are built our help desk would like to have the new servers managed in Orion automatically.  Is there a simple way to add these servers to Orion with a powershell script?  I apologize but I have also never used Orion either. 

 

Thanks

- Bill

REST - HTTP Post - SWIS Invoke Orion.Container/CreateContainer Issue

$
0
0

Hello All,

 

I'm trying to do a http post to create a container and I can't seem to get the syntax right.

I've tried almost every possible combination for the memberDefinition section and nothing seems to work...

 

URL:

https://localhost:17778/SolarWinds/InformationService/v3/Json/Invoke/Orion.Container/CreateContainer

 

POST DATA:

{"name":"Orion123","owner":"Core","frequency":60,"statusCalculator":0,"description":"testing container creation","pollingEnabled":"true","memberDefinitions":[<ArrayOfMemberDefinitionInfo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.solarwinds.com/2008/Orion"><MemberDefinitionInfo><Name>Testy123</Name><Definition>filter:/Orion.Nodes[CustomProperties.IT_Service='WAN' AND CustomProperties.Site_Code='USA']</Definition></MemberDefinitionInfo></ArrayOfMemberDefinitionInfo>]}

 

from SWQL Studio if I populate the values through the Invoke function (right click on the CreateContainer option) I have no issue, so I'm assuming there must be some error with my JSON formatting.

 

The above example is using the following format:

"memberDefinitions":[%data%]

 

I've also tried using another example found on thwack as well:

 

{"name":"Orion123","owner":"Core","frequency":"60","statusCalculator":"0","description":"hello","pollingEnabled":"true","memberDefinitions":["name":"Test1234","definition":"filter:/Orion.Nodes[CustomProperties.IT_Service='WAN' AND CustomProperties.Site_Code='USA']"]}

 

If anyone can assist with this, it would be greatly appreciated... trying to automate container creation, and hopefully group dependencies after -

 

Help me DTANNER AND THWACK COMMUNITY, you're my only hope

Joining Node Data to Conversation Query

$
0
0

I'm attempting to grab a snapshot of conversation data in SWQL Studio and am having some problems linking the data back to a node (so I can run the query on a per-customer basis).  Here's what I have so far:

 

SELECT ConversationID, IPSort1, IPAddress1, HostName1, IPSort2, IPAddress2, HostName2, NodeID, InterfaceID, TotalBytes, TotalPackets, TotalBytesIngress, TotalPacketsIngress, Conv.OrionSite.Uri

FROM Orion.NetFlow.ConversationsTop(Filter='NSF:TD:2013-10-16T09:00:00~2018-10-16T10:00:00,1,True,True', Limit=500, TopKey='') AS Conv

ORDER BY HostName2

 

Unfortunately, the NodeID always returns null, so I can't join on that, and I don't see anywhere else that identifies which node is providing the conversation data.  Any help would be appreciated.

Remove-SwisObject : mismatched input 'False' expecting 'Identifier' in Select clause - Is this a bug?

$
0
0

Trying to script delete of nodes. Works in the QA environment and fails in PRD.

 

Get the URI here:

if (-not (Get-PSSnapin | where {$_.Name -eq "SwisSnapin"}))
{    Add-PSSnapin "SwisSnapin";
}
$swis = Connect-Swis -host SolarWindsOrionServer -UserName 'REDACTED' -Password 'ALSO_REDACTED'
$a = Get-SwisData $swis 'SELECT Uri FROM Orion.nodes where caption = @host' @{host = 'Test123456'}
Remove-SwisObject -SwisConnection $swis -Uri $a

 

This returns the following:

Remove-SwisObject : mismatched input 'False' expecting 'Identifier' in Select clause

At line:1 char:1

+ Remove-SwisObject -SwisConnection $swis -Uri ([string]$a)

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : InvalidOperation: (:) [Remove-SwisObject], FaultException`1

    + FullyQualifiedErrorId : SwisError,SwisPowerShell.RemoveSwisObject

 

$a.getType() returns that it is a string

 

I have tried several formats including using the literal URI string:

Remove-SwisObject -SwisConnection $swis -Uri 'swis://FCDARSVRMSQ23P.fcb.com/Orion/Orion.Nodes/n:9608'

 

What am I missing?

We're running the following:

PRD on Win 2008 R2

Orion Platform 2015.1.3, NCM 7.4.1, SRM 6.2.1, WPM 2.2.1, DPA 10.0.1, NPM 11.5.3, IVIM 2.1.1, QoE 2.0, SAM 6.2.3, NTA 4.1.2

 

QA on Win 2012 R2

Orion Platform 2015.1.3, NCM 7.4.1, SRM 6.2.1, WPM 2.2.0, DPA 10.0.1, NPM 11.5.3, IVIM 2.1.1, SAM 6.2.3, NTA 4.1.2

 

Attached is the tail end of C:\ProgramData\Solarwinds\InformationService\v3.0\Orion.InformationService.log that has the failure. The last attempt is as close to 2017-03-21 15:18:00 as I could manage.


Disabling Hardware Health Sensors

$
0
0

tdanner et. al;

 

Can anyone identify what the "DisableSensors" verb is looking for in Orion.HardwareHealth.HardwareItem ?

 

Trying the ID is coming back with an error in PowerShell:

 

Script:

 

# Clear PowerShell and add the SwisSnapin
Clear-Host

if (-not (Get-PSSnapin | Where-Object { $_.Name -eq 'SwisSnapin' })) {
    Add-PSSnapin 'SwisSnapin'
}

# Connect to SWIS using AD pass-through
$hostname = 'SolarWindsPoller'
$swis = Connect-Swis -Hostname $hostname -Trusted

# Query SWIS to get an array of Sensor IDs to disable
$query = "SELECT ID, FullyQualifiedName FROM Orion.HardwareHealth.HardwareItem WHERE Name LIKE 'System Memory'"
$results = Get-SwisData $swis $query

#  Loop through the array to disable the sensors
Foreach($sensor in $results){    Invoke-SwisVerb $swis Orion.HardwareHealth.HardwareItem DisableSensors $($sensor[0].ID)    Write-Host "Disabling Hardware Sensor On: $($sensor[0].FullyQualifiedName)"
}

 

 

This is an example of what is being passed (adding a Write-Host to the front of the Invoke)

 

Invoke-SwisVerb SolarWinds.InformationService.Contract2.InfoServiceProxy Orion.HardwareHealth.HardwareItem DisableSensors 136

Disabling Hardware Sensor On: System Memory on hostname.domain.local

 

 

And this is the error:

 

Invoke-SwisVerb : Verb Orion.HardwareHealth.HardwareItem.DisableSensors cannot unpackage parameter 0 of type System.Collections.Generic.IEnumerable`1[SolarWinds.HardwareHealth.Common.Models.HardwareHealth.HardwareHealthItemKey]

At line:36 char:2

+     Invoke-SwisVerb $swis Orion.HardwareHealth.HardwareItem DisableSe ...

+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : InvalidOperation: (:) [Invoke-SwisVerb], FaultException`1

    + FullyQualifiedErrorId : SwisError,SwisPowerShell.InvokeSwisVerb

 

 

Any and all help is appreciated!

Orion Discovery API, errors when not using primary poller

$
0
0

I have two nearly identical discovery profiles, one works fine and the other returns error:

 

The difference between them is that the one that works is on the primary poller and the other is on our second poller, defined within  <EngineId>$EngineID</EngineId> of the Discovery config.

With $EngineID =2 (our HA Orion server) or $EngineID = 3 (1st APE)

I have also just tested this against $EngineID = 4  (2nd APE), which also fails with the same error.

 

I found this log entry in OrionDiscoveryJob.log

 

2017-03-23 14:54:37,454 [STP SmartThreadPool Thread #0] ERROR OrionDiscoveryJob - Unable to deserialize job description.

System.Runtime.Serialization.SerializationException: Error in line 0 position 0. Element 'http://schemas.datacontract.org/2004/07/SolarWinds.Orion.Core.Models.Discovery:DiscoveryPluginJobDescriptionBase' contains data from a type that maps to the name 'http://schemas.solarwinds.com/2008/DeviceStudio:DeviceStudioDiscoveryPluginJobDescription'. The deserializer has no knowledge of any type that maps to this name. Consider using a DataContractResolver if you are using DataContractSerializer or add the type corresponding to 'DeviceStudioDiscoveryPluginJobDescription' to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding it to the list of known types passed to the serializer.

 

It matches time and date, but not really the problem.

 

Any ideas as to why, or how to fix it?

We installed APEs to take the polling load off our Orion server(s) and this is creating a backward step in automating the discovery process.

SWIS REST/JSON API

$
0
0

Starting with NPM 10.4, SWIS now supports a REST/JSON API in addition to the existing SOAP API. The operations supported by each API are identical: the six basic operations of Query, Invoke, Create, Read, Update, and Delete; and the data you can access through each API is the same. The difference is that the REST/JSON API avoids the complexities of XML and SOAP, though it gives up the ability to have a client wrapper generated from WSDL.

 

Both APIs will be supported by the product indefinitely - the SOAP API is not deprecated or replaced by the REST API.

 

Request and Response Formats

Query

Request

GET https://localhost:17778/SolarWinds/InformationService/v3/Json/Query?query=SELECT+Uri+FROM+Orion.Pollers+ORDER+BY+PollerID+WITH+ROWS+1+TO+3+WITH+TOTALROWS HTTP/1.1
Authorization: Basic YWRtaW46
User-Agent: curl/7.20.0 (i386-pc-win32) libcurl/7.20.0 OpenSSL/0.9.8l zlib/1.2.3
Host: localhost:17778
Accept: */*

Response

HTTP/1.1 200 OK
Content-Length: 244
Content-Type: application/json
Server: Microsoft-HTTPAPI/2.0
Date: Fri, 27 Jul 2012 19:38:52 GMT
{"totalRows":13,"results":[{"Uri":"swis://tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=4"},{"Uri":"swis://tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=6"},{"Uri":"swis://tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=7"}]}

 

Body reformatted for easier reading
{

 

    "totalRows": 13,

    "results": [

        { "Uri": "swis://tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=4"},

        { "Uri": "swis://tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=6"},

        { "Uri": "swis://tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=7"}

    ]

}

Query with Parameters

Request

POST https://localhost:17778/SolarWinds/InformationService/v3/Json/Query HTTP/1.1
Authorization: Basic YWRtaW46
User-Agent: curl/7.20.0 (i386-pc-win32) libcurl/7.20.0 OpenSSL/0.9.8l zlib/1.2.3
Host: localhost:17778
Accept: */*
Content-Type: application/json
Content-Length: 130
{"query":"SELECT Uri FROM Orion.Pollers WHERE PollerID=@p ORDER BY PollerID WITH ROWS 1 TO 3 WITH TOTALROWS","parameters":{"p":9}}

 

Response

HTTP/1.1 200 OK
Content-Length: 99
Content-Type: application/json
Server: Microsoft-HTTPAPI/2.0
Date: Tue, 07 Aug 2012 17:36:27 GMT
{"totalRows":1,"results":[{"Uri":"swis://tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=9"}]}

Invoke

Request

POST https://localhost:17778/SolarWinds/InformationService/v3/Json/Invoke/Metadata.Entity/GetAliases HTTP/1.1
Authorization: Basic YWRtaW46
User-Agent: curl/7.20.0 (i386-pc-win32) libcurl/7.20.0 OpenSSL/0.9.8l zlib/1.2.3
Host: localhost:17778
Accept: */*
Content-Type: application/json
Content-Length: 39
["SELECT B.Caption FROM Orion.Nodes B"]

Response

HTTP/1.1 200 OK
Content-Length: 19
Content-Type: application/json
Server: Microsoft-HTTPAPI/2.0
Date: Fri, 27 Jul 2012 19:23:27 GMT
{"B":"Orion.Nodes"}

The Metadata.GetAliases verb takes one string argument and returns a PropertyBag.

Create

Request

POST https://localhost:17778/SolarWinds/InformationService/v3/Json/Create/Orion.Pollers HTTP/1.1
Authorization: Basic YWRtaW46
User-Agent: curl/7.20.0 (i386-pc-win32) libcurl/7.20.0 OpenSSL/0.9.8l zlib/1.2.3
Host: localhost:17778
Accept: */*
Content-Type: application/json
Content-Length: 92
{"PollerType":"hi from curl 2", "NetObject":"N:123", "NetObjectType":"N", "NetObjectID":123}

Response

HTTP/1.1 200 OK
Content-Length: 69
Content-Type: application/json; charset=utf-8
Server: Microsoft-HTTPAPI/2.0
Date: Fri, 27 Jul 2012 19:27:11 GMT
"swis:\/\/tdanner-dev.swdev.local\/Orion\/Orion.Pollers\/PollerID=19"

Read

Request

GET https://localhost:17778/SolarWinds/InformationService/v3/Json/swis://tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=6 HTTP/1.1
Authorization: Basic YWRtaW46
User-Agent: curl/7.20.0 (i386-pc-win32) libcurl/7.20.0 OpenSSL/0.9.8l zlib/1.2.3
Host: localhost:17778
Accept: */*

Response

HTTP/1.1 200 OK
Content-Length: 245
Content-Type: application/json
Server: Microsoft-HTTPAPI/2.0
Date: Fri, 27 Jul 2012 19:30:02 GMT
{"PollerID":6,"PollerType":"V.Details.SNMP.Generic","NetObject":"V:1","NetObjectType":"V","NetObjectID":1,"DisplayName":null,"Description":null,"InstanceType":"Orion.Pollers","Uri":"swis://tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=6"}

Update

Request

POST https://localhost:17778/SolarWinds/InformationService/v3/Json/swis://tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=6 HTTP/1.1
Authorization: Basic YWRtaW46
User-Agent: curl/7.20.0 (i386-pc-win32) libcurl/7.20.0 OpenSSL/0.9.8l zlib/1.2.3
Host: localhost:17778
Accept: */*
Content-Type: application/json
Content-Length: 29
{"PollerType":"hi from curl"}

Response

HTTP/1.1 200 OK
Content-Length: 0
Server: Microsoft-HTTPAPI/2.0
Date: Fri, 27 Jul 2012 19:32:06 GMT

Delete

Request

DELETE https://localhost:17778/SolarWinds/InformationService/v3/Json/swis://tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=16 HTTP/1.1
Authorization: Basic YWRtaW46
User-Agent: curl/7.20.0 (i386-pc-win32) libcurl/7.20.0 OpenSSL/0.9.8l zlib/1.2.3
Host: localhost:17778
Accept: */*

Response

HTTP/1.1 200 OK
Content-Length: 0
Server: Microsoft-HTTPAPI/2.0
Date: Fri, 27 Jul 2012 19:37:33 GMT

Unmanage All Nodes with a Specified Custom Property Value

Is there a way to integrate or pull creditials from Cyberark to Solarwinds?

$
0
0

My company uses Cyberark and when talking with the Solarwinds Engineers, they seem unsure of how to pull credentials from Cyberark and create them in Solarwinds. This is sort of a deal breaker for us and I REALLY want to switch off of our current solution to Solarwinds.

SNMP Port setting ignored in Node Discovery via SWIS

$
0
0

I've encountered an issue when adding nodes via SWIS. I have two equal devices one of which is configured to respond to SNMP requests on port 161 and another which listens on port 61161. The latter device cannot be discovered as an SNMP node directly using the web interface. Instead it has to be added as an ICMP-only node after which it must be changed to SNMP and port 61161 manually. The former node on the other hand gets discovered correctly and from the start gets added as an SNMP device.

Using the SolarWinds SDK it's possible to add nodes too. In addition to this, it's possible to control which SNMP port the Network Discovery should use for polling. Please see the below link: https://github.com/solarwinds/OrionSDK/wiki/Discovery In the code example right below the headline, "Building the discovery context from the plugin configurations", there's a field in the XML text, <SnmpPort>161</SnmpPort>, which obviously offers a way to control the SNMP port and yet SolarWinds NPM seems to ignore this field. I've run the same discovery script written in Powershell on both nodes with the SNMP Port field set to <SnmpPort>61161</SnmpPort>.

The problem is that the node which is configured to listen to port 161 gets added incorrectly and the other node which listens on port 61161, incorrectly does not get added using the same Powershell script. I therefore believe there's a bug in the SolarWinds SDK regarding the SNMP Port field.

 

Does anybody have any idea how I can perform a Network Discovery on a custom SNMP port i.e. other than port 161?

 

Thanks for reading this far,

Tobias

[Q] Batch Editing Custom Properties w/ Powershell

$
0
0

We are trying to utilize Powershell to be able to update multiple custom properties of a specific subnet of machines. We have used the guidance found on the Github regarding most of the syntax, but we are still getting an error message when we run the entire sequence.

 

Here is the body of the script; I have redacted some things for obvious reasons:

 

#Intialization
Add-PSSNapin SwisSnapin

 

# Connect to SWIS
$hostname = "xxx.xxx.xxx.xxx"
$username = "UserName"
$password = get-content C:\Path\To\PWinfo.txt | convertto-securestring
$cred = New-Object -typename System.Management.Automation.PSCredential -argumentlist $username, $password
$swis = Connect-Swis -host $hostname -cred $cred

 

$NodeID="SELECT NodeID FROM Orion.Nodes WHERE IP_Address LIKE 'xxx.xxx.xxx.%'" # NodeID of a node which custom properties you want to change

 

# prepare a custom property value
$customProps = @{
  Comments="TEST comment - Delete Me";
  SecondarySiteEmail="test.email@testemail.com"
  ESN="TEST - numbers"
}

 

# build the node URI
$uri = "swis://localhost/Orion/Orion.Nodes/NodeID=$nodeId/CustomProperties";
# set the custom property
$NodeID2="SELECT NodeID FROM Orion.Nodes WHERE IP_Address LIKE '10.98.108.%'" | Set-SwisObject $swis -Uri $uri -Properties $customProps

 

However, the error message we are getting is this: "The input object cannot be bound to any parameters for the command either because the command does not take pipeline input or the input and its properties do not match any of the parameters that take pipeline input."

 

We were under the assumption that piping this was necessary, but we are re-thinking this. Any suggestions on what we are missing here?


Get node managed / unmanaged status

$
0
0

I would like to craft a SWIS query that will tell me whether or not a node is currently managed or unmanaged. So far I've found GroupStatus and StatusIcon in the Orion.Nodes table. These seem to show values of "Unmanaged.gif" if the node is unmanaged. But is there a more direct method? I expect there is an actual status value somewhere rather than the name of an icon.

Custom queries not working normally after upgrade from IPAM 4.3 to 4.3.2

$
0
0

Hi all,

 

I have a question on the custom queries. Seems like the custom queries are not working normally after the IPAM upgrade. Did anyone encounter similar issue? I have attached the screenshots on the issue.

 

The custom queries will time out and not show the results. Capture1 show that the queries are not working, capture2 is the SQL query.

 

Thank you

Auto Ignoring Discovered Volumes and Discovered Interfaces

$
0
0

Very soon I will have thousands and thousands of interfaces and volumes that need ignoring.  I do not have the patience or time to mark each of these as "ignored"

 

I had success in my QA environment implementing the queries found here Re: Automatically ignore volume/interface types that are discovered via Network Sonar Discovery.   After speaking with some SR Thwack members it was determined that this was not optimal and the API should be used. 

 

To keep things simple, I want to focus on loopback interfaces.   We have no need for them, therefore auto-ignoring makes sense.   Within SWQL Studio, I noticed that the Orion.NPM.DiscoveredInterfaces does not have a Uri value.  I was hoping this would be as simple as selecting the URI and setting a ignore value to true.  This is not the case, and I cannot determine how an interface goes from discovered to ignored.  Below I have the script returning the DiscoveredInterfaceID, and the InterfaceName.  The script returns the expected objects, just not sure how to get these objects added to the Orion.DiscoveryIgnoredInterfaces table...

 

$ErrorActionPreference = 'Stop'

Add-PSSnapin SwisSnapin

$hostname = 'X'
$username = 'X'
$password = 'X'

$swis = Connect-Swis -Hostname $hostname -Username $username -Password $password

$uris = Get-SwisData $swis "SELECT DiscoveredInterfaceID, InterfaceName FROM Orion.NPM.DiscoveredInterfaces DI WHERE DI.InterfaceName LIKE '%lo%'"

$Uris

 

-------------------------Return Values------------------------------

 

DiscoveredInterfaceID InterfaceName                                                                                                             

                                                                                                       --------------------- -------------                                                                                                             

                                                                                                                          14 lo                                                                                                                        

                                                                                                                          16 lo                                                                                                                        

                                                                                                                          18 lo                                                                                                                        

                                                                                                                          20 lo                                                                                                                        

                                                                                                                          22 lo  

 

I would have to imagine that anyone with a decent sized environment would need something like this working.   When I say I have thousands of interfaces, I am talking about 5000+ interfaces

Given sysuptime in seconds, how are you doing date math to display days/hours/mins/seconds?

$
0
0

I was hoping to do the following:

 

SELECT top 10 NodeID, IPAddress, DNS, LastBoot, (SystemUpTime / 86400) as Days, ((SystemUpTime / 3600 ) % 24) as Hours, ((SystemUpTime / 60 ) % 60) as Mins, (SystemUpTime % 60) as Secs

FROM Orion.Nodes

 

I get the error:

The data types real and int are incompatible in the modulo operator.

 

Suggestions?

 

Thanks

After upgrade to SAM 6.4 node status names have changed

$
0
0

Hi guys,

 

I have enabled some Slack integration with my Solarwinds alerts and it has work perfectly up until i upgraded to SAM 6.4. My slack alerts get colorized and a special emoji according to the node status. However, after the upgrade they have removed the node status "Error" and replaced it with "Major Failure". But, since I'm using powershell (not really that good at it) i can't seem to get my head around how I'm now supposed to address this string as there is a space in the status message.

 

example of the old working code:

switch ($ORIONNODESTATE)
{
OK {$emoji = ":white_check_mark:"; $MessageFormat="Up";$color="good" }
Error {$emoji = ":x:";$color="danger" }
}

New non-working code:

switch ($ORIONNODESTATE)
{
OK {$emoji = ":white_check_mark:"; $MessageFormat="Up";$color="good" }
#Example below is not allowed as there is a space between "Major" and "Failure". What is the new code for "Major Failures"?
Major Failure {$emoji = ":x:";$color="danger" }
}

 

I can't find documentation for this change and SW support could not help me out because of this being an SDK issue :/

 

So, hopefully someone here in Thwack can help me out

Viewing all 2677 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>