Quantcast
Channel: THWACK: Popular Discussions - Orion SDK
Viewing all 3719 articles
Browse latest View live

NTA Report with automatic date range

$
0
0

Hi all,

 

We are building up a historic monthly NTA report, where custom SWQL query is the way to go here.

Since the ${FromTime} and ${ToTime} variables do not work with custom SWQL reports we need to determine a way to auto select the 1st day of the previous month to the last day of the previous month for the TimeStamp Column

 

At the moment the WHERE clause looks like this:

 

WHERE TimeStamp>='2016/10/01 00:00:00'
AND TimeStamp<'2016/11/01 00:00:00'

which works OK, but clearly needs manual editing every month.

I've been trying to use some SWQL functions but they always result in a report timeout message:

 

WHERE TimeStamp>=AddMonth(-1,DateTrunc('month', GetDate()))
AND TimeStamp<DateTrunc('month', GetDate())

 

Am I missing something or is there a better way to do the above?

 

Many thanks!

Antonis Athanasiou

Prosperon - UK SolarWinds Partners

Installation | Consultancy | Training | Licenses

facebook_icon.jpglinkedin.pngblogger.pngtwitter-icon.jpg


Lab 39 PowerShell Connection Issue

$
0
0

Hi all, I am trying to follow along with SLW Lab #39 where a powershell query was ran

 

Select IPaddress, nodeid, caption

From orion.nodes

 

I seem to be having an issue when being asked for SwisConnection details.  I am getting the error below

 

 

If I run the command shown below, it does seem to indicate I do connect  I am running this locally on a development application server instance

 

Great lab video by the way, looking forward to another API lab hopefully.  Thanks!

Adding Nodes

$
0
0

Hi Guys

 

New to SDK

 

I've got the script below which I attempt to run it via PS to add a new node however i get nothing after hitting go no error I just get >> any help would be appreciated thanks in advance

No entry for imports generated in DiscoveryLogs when using Invoke/Orion.Discovery/ImportDiscoveryResults

$
0
0

Hello Thwack Community,

 

Before you read on, my apologies for the extremely long title for this post.

 

I'm quite happy to say that I have finally successfully set up automation to run discoveries/imports using REST exclusively with the following verbs:

 

Invoke/Orion.Discovery/CreateCorePluginConfiguration

Invoke/Orion.NPM.Interfaces/CreateInterfacesPluginConfiguration

 

and then building/running discovery via :

Invoke/Orion.Discovery/StartDiscovery

 

In the config of Invoke/Orion.Discovery/StartDiscovery - I have set "IsAutoImport" to "False" -

I'm doing some provisioning of imported items (removal of key nodes/interfaces/volumes) prior to importing discovery results.

 

At that point, I capture the NodeIDs (for Example 1-10) from the "DiscoveredNodes" table (using SQL or SWIS) matching my ProfileID.

 

I then run the import using:

Invoke/Orion.Discovery/ImportDiscoveryResults

 

The issue, however, is that after running the import, I don't see an entry for the import in the  "DiscoveryLogs" table (using SQL or SWIS).

I know that I should have an entry for that import, along with an appropriate BatchID as when this is done manually through the UI, an entry is generated.

This allows me to do a table join via BatchID on the "DiscoveryLogItems"(joining with DiscoveryLogs)  table in order to capture the actual NodeID values for the nodes being imported, as well as track progress of the import.

Is there a property I need to set in order for this to get generated, or some other verb that needs to be called to have the Import job show up in the DiscoveryLogs table?

Any help with this would greatly be appreciated.

 

Thank you,

 

=SWQL

SolarWinds to Service-Now Integration

$
0
0

SolarWinds & Service-Now

=====================

We’re trying to do the following (option 1 is our preferred while option 2 is a fallback):

1)

A) SolarWinds generates alert

B) SolarWinds uses a “webservice/api/sdk/other tool” to “communicate with/connect to” with the appropriate information so ServiceNow can open a ticket with the appropriate categorization, priority, whether it is internally or externally managed (ticket assignment changes depending), etc.

C) ServiceNow will communicate to the “response team” that there is a new ticket that must be addressed

D) ServiceNow will “communicate with/connect to” SolarWinds to acknowledge the alert and to record the ServiceNow ticket in to the acknowledgement notes

E) SolarWinds will register alert and set alert to acknowledged status and will include the ServiceNow ticket number

*END*

 

2)

A) SolarWinds generates alert

B) SolarWinds sends email notification to ServiceNow – email will need to be in appropriate form to be “absorbed”

C) ServiceNow “absorbs” email and generates a ticket with the appropriate categorization, priority, whether it is internally or externally managed (ticket assignment changes depending), etc.

D) ServiceNow “responds” to email with acknowledgement and ticket number

E) SolarWinds registers the response and sets the alert to acknowledged status and will include the ServiceNow ticket number

*END*

 

At this time, we’re looking for foundational materials to help us get started and determine the easiest/best way to perform one of these options and we’re hoping SolarWinds support can give us some pointers on where to researching documentation and what documentation may exist. Our hope is this is a relatively straight forward activity since it seems like it would be fairly standard that companies would want their monitoring and ticketing systems to interact. We have been rather ineffectually researching SolarWinds documentation and Thwack for roughly a week and have been unable to find the “start here” materials. We understand that the referenced SDK is not supported and we will have to use Thwack as support, however, at this point, we don’t have enough information to understand whether the SDK is our best/only option. We see in the release notes that there is the VBClient, etc. however it is unclear if this is the proscribed technique or just *A* technique.

 

Thanks in advance for your feedback and guidance!

Reset an alert via Powershell/SWIS

$
0
0

Hi,

 

Is it possible to reset an alert via a powershell command?

 

I would like to trigger a reset of an Orion alert when an associated incident is marked as resolved in a Service Desk application.

 

Thanks,

Andrew

 

tdanner I believe you are the guru when it comes to this

Example Add Node with Custom Properties and Pollers in C#

$
0
0

Does anyone have an example already on how to create a custom node with Custom Properties and Pollers using C#? The example in SDK only shows query

 

Any help would be appreciated

Is there a method to Change the Health Monitor

$
0
0

Is there a method to Change the Health Monitor when adding a new Node with SKD for example HardwareHealth.PreferredCiscoMIB


List Resources By C# Orion SDK?

$
0
0

For example in NMS web console:

1. Go Under Node Management.

2. Click List Resources to get a checklist of interfaces.

 

Can I have same operation from C#?

 

Regards

Using Powershell to add nodes with Custom Properties for Device Type

$
0
0

Hello,
Running Orion NPM 10.6.0 and SDK 1.7 on Win2k8R2

 

Can anyone help with adding devices into Orion using Powershell?

 

To complete via NPM Web console, select Management, Edit Node.
Select groups, break down the group to a specific node.
Choose node properties, then edit node.
Custom properties show Device_Type:

12-4-2013 3-35-46 PM.png

 

Sample script adding a server fails for the custom properties:
---------------

Add-PSSnapin SwisSnapin

# initialize SWIS connection
$swis = Connect-Swis -Certificate

# add a node
$newNodeProps = @
{
EntityType="Orion.NodesCustomProperties";
DisplayName="servername_here";
Device_Type="Server_Windows";
}

$newNodeUri = New-SwisObject $swis –EntityType "Orion.NodesCustomProperties" –Properties $newNodeProps

$nodeProps = Get-SwisObject $swis -Uri $newNodeUri Orion.Nodes

Output:
PS C:\> $newNodeUri = New-SwisObject $swis -EntityType "Orion.NodesCustomProperties" -Properties $newNodeProps
New-SwisObject : Cannot bind argument to parameter 'Properties' because it is null.
At line:1 char:89
+ $newNodeUri = New-SwisObject $swis -EntityType "Orion.NodesCustomProperties" -Properties <<<<  $newNodeProps
    + CategoryInfo          : InvalidData: (:) [New-SwisObject], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,SwisPowerShell.NewSwisObject

PS C:\>


Similar blog = http://thwack.solarwinds.com/message/163190#163190

SWQL Queries - Merging two tables

$
0
0

Hi all,

I have difficulty in using SWQL (since i don't have any background in SQL at all ).

 

I would like to merge two different table,where there is one common column (InterfaceID), but the queries have to display InterfaceID which only have Comments "WAN vrf" on the second table..

Found some similar topic in google but for SQL, so i try below syntax :

 

SELECT NodeID, InterfaceID, Caption, FullName, Alias, IfName

FROM Orion.NPM.Interfaces

 

UNION SELECT InterfaceID, Comments

FROM Orion.NPM.InterfacesCustomProperties

WHERE Comments='WAN vrf'

 

however when i try above, it return with mismatched input 'SELECT' expectin '('

 

I'm not really sure how to correct the syntax. Appreciate much for any help here.

 

Thanks and regards

Adi

Orion SDK with PowerShell - manage/unmanage multiple nodes

$
0
0

I've been able to script unmanaging and managing nodes in powershell. However, for 400+ nodes, this ends up taking quite a while. Via script, it takes about 7 minutes to unmanage the nodes and over 10 minutes to remanage them. Doing this from the website takes about 25 seconds and no more than a minute, respectively. My guess is that the website somehow group updates the database instead of doing it one at a time. Anyone else seen this or have any idea how to do more than one node at a time? Below is sample code for how I am unmanaging a single node:

 

Invoke-SwisVerb $swis Orion.Nodes Unmanage @("N:$nodeid",$start,$end,"false")

 

Thanks for any advice you have!

Reset an alert via Powershell/SWIS

$
0
0

Hi,

 

Is it possible to reset an alert via a powershell command?

 

I would like to trigger a reset of an Orion alert when an associated incident is marked as resolved in a Service Desk application.

 

Thanks,

Andrew

 

tdanner I believe you are the guru when it comes to this

Question about Orion.Sites SWQL table

$
0
0

I see the SWQL table "Orion.Sites" joined to by a lot of queries when looking in the OrionWeb.log files and the SWIS log files.  I don't really understand what this table does, so I guess that is my first question.  What is the point of the "Orion.Sites" table?  What is a "Site" in the context of the Orion SWQL schema?

 

Since we have 3 distinct Orion environments right now, I can compare the Orion.Sites table in each to try and figure out something about it.  However, I'm now more confused. 

 

Two of our environments have 7 Additional Pollers (APE's) and one has 2 APE's.  In each of all three environments the Orion.Sites table only has one entry in it.  In two of those three environments, the only entry in their sites table is the last polling engine in that environment.  The 3rd environment shows the primary server as the only entry...  Even though the third environment shows the Primary poller instead of an APE, the "Website" field is still NULL which seems weird since this one does at least have the website on it.  See the screenshots below to see the table contents for each environment.

 

1 Primary and 7 APE environment 1:

 

1 Primary and 2 APE environment:

 

1 Primary and 7 APE environment 2 (This is the one that has the Primary server as it's only entry):

 

I'm sure this is probably completely normal but since I don't understand this table and its purpose, it just seems really odd to me the way it functions, so I was hoping somebody with knowledge of the schema can explain it to me.  I'm thinking Sites has something to do with the new High Availability feature since I can't recall seeing this table until relatively recently.  That still doesn't explain why sometimes it seems to pick the last APE in the environment to be its only entry and other times it picks the Primary Polling engine to be its only entry.  Very curious indeed...

Invoke-SwisVerb: Access to Orion.Nodes.Unmanage verb denied.

$
0
0

I am working on a script that I can fee a list of servers to and unmanage the servers.

 

I can get all the moving parts to work, but when it comes to the actual invoke-swisverb the script tanks.

 

Here is what I have:

 

$FilePath = Read-Host -Prompt "Input file path to list"

$silenceTime = Read-Host -Prompt "Enter time to silence Servers"

 

 

ForEach ($nodename in (Get-Content -Path $filePath)){

     Write-Host $nodename

     $swis = Connect-Swis -Credential $cred -host $orionservername

     $nodeid = Get-SwisData $swis "SELECT NodeID FROM Orion.Nodes WHERE SysName LIKE '$nodename%'"

     $now =[DateTime]::UtcNow

     $later =$now.AddMinutes($silenceTime)

     Invoke-SwisVerb $swis Orion.Nodes Unmanage @("$nodeid", $now ,$later, "false")

     }


PowerShell or Python ?

$
0
0

Ive taken a few python classes at school a while back and while I enjoyed it I never used it too much in the real world. From doing research and reading various posts I seem to have this feeling that knowing powershell vs python would put me in a much better position to excel as a SolarWinds admin.  Curious on Tdanners and others thoughts. 

NPM World Map updates via API

$
0
0

I wrote a python script with a function, that uses the Solarwinds API,  to grab  latitude and longitude for each of our sites from a database and  update two Solarwinds custom properties (Called Latitude and Longitude). This works great.

 

I then set the World Map to do automatic geolocation and after about 90 minutes I still had no markers on the map. I waited a while longer and still no markers. So after some research I found that the World Map us two properties called Latitude (World Map) and Longitude (World Map), not my custom Latitude and Longitude properties.

 

Can you update the Latitude (World Map) and Longitude (World Map) via the API? I looked at the API documentation and source code on github, however I have not figured out a way to do it yet.

 

My current  update line looks like this:  swis.update(uri + '/CustomProperties', Latitude = var2)

 

Any help is appreciated. Thank you,

-Matt

Updating Orion.WorldMap.Point via the Perl SDK

$
0
0

I've been playing with the new world maps with doing the creating, updating and deletion of points via the Perl Orion SDK. I've had success with creating points with the following:

my $data = $self->{_swis}->Create("Orion.WorldMap.Point", {Instance => 'Orion.Nodes', InstanceID => $node_id, Latitude => $lat, Longitude => $long} );

 

 

 

 

 

However not having much success with with updates or deletions as both of the following:

my $data = $self->{_swis}->Update($self->{_swis_url} . "/Orion.WorldMap.Point/PointId=$point_id", {Latitude => $lat, Longitude => $long} );

 

 

my $data = $self->{_swis}->Delete("swis://localhost/Orion/Orion.WorldMap.Point/Instance=Orion.Nodes,PointId=$point_id");

 

produce the following error:

Invalid key properties specified for entity Orion.WorldMap.Point.&#xD;

Anyone got any pointers? I've got quite a large amount of location data to import and then allow updates to be carried out from our CMDB. And I also notice it's create multiple pointers for the same node.

 

Cheers,

 

Jon

Invoke-SwisVerb: Access to Orion.Nodes.Unmanage verb denied.

$
0
0

I am working on a script that I can fee a list of servers to and unmanage the servers.

 

I can get all the moving parts to work, but when it comes to the actual invoke-swisverb the script tanks.

 

Here is what I have:

 

$FilePath = Read-Host -Prompt "Input file path to list"

$silenceTime = Read-Host -Prompt "Enter time to silence Servers"

 

 

ForEach ($nodename in (Get-Content -Path $filePath)){

     Write-Host $nodename

     $swis = Connect-Swis -Credential $cred -host $orionservername

     $nodeid = Get-SwisData $swis "SELECT NodeID FROM Orion.Nodes WHERE SysName LIKE '$nodename%'"

     $now =[DateTime]::UtcNow

     $later =$now.AddMinutes($silenceTime)

     Invoke-SwisVerb $swis Orion.Nodes Unmanage @("$nodeid", $now ,$later, "false")

     }

SDK Admin Manual

$
0
0

I have just downloaded OrionSDK-1.9.zip and extracted the msi, but there is no trace of pdf file for the documentation.

After installing the msi , I found it in C:\Program Files (x86)\SolarWinds\Orion SDK\Documentation as Orion SDK.pdf.

Just in case anybody is wondering about that.

Viewing all 3719 articles
Browse latest View live


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