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

Help with SWQL query for alert history

$
0
0

Hello Everyone, I have an SQL query that I am trying to convert to SWQL and I am getting the error "Source entity [Orion.AlertHistory] not found in catalog.  When I compare SQL studio tables to SWQL studio tables I do not see a Orion.AlertHistory table however in SQL studio the table dbo.AlertHistory does exist.  Did I miss something or shouldnt the same tables be present between the two systems?  Below is my query:

 

 

SELECT ADDDATE('HOUR',-7,AlertHistory.[TimeStamp]) as "Time"

      ,AlertObjects.EntityCaption as "Alert"

      ,AlertObjects.RelatedNodeCaption as "Node"

      ,"Details" =

      Case

      When AlertObjects.EntityType = 'Orion.APM.Application' Then 'Application is Down'

      When AlertObjects.EntityType = 'Orion.Nodes' Then 'Node did not respond to ICMP call'

      When AlertObjects.EntityType = 'Orion.NPM.Interfaces' Then 'Interface is down.'

      When AlertObjects.EntityType = 'Orion.Volumes' Then 'Volume has reached a critical threshold'

      Else  'Check Event Log for Details'

      END

  FROM [Orion].[AlertHistory]inner join [Orion].[AlertObjects] on AlertHistory.[AlertObjectID]=AlertObjects.[AlertObjectID]

   where ActionID in

  (SELECT [ActionID]

FROM [Orion].[Actions]

where Title = 'Execute program : C:\Program Files (x86)\Tools\bin\RATriggerAlarm.CMD')

  and TimeStamp > ADDDATE('HOUR',7,DATEADD(DAY,-1,GETDATE())) 

Order by  TimeStamp desc


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

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

Custom Query to display Muted Nodes with SAM 6.4

$
0
0

Hi,

I am looking to build out a custom query resource view for this.

 

Do you know which table contains the muted nodes information?  I checked the orion.mantenance table and there's no info displayed, even when I have muted the nodes. 

 

How to monitor CPU and Memory Process

$
0
0

Hi,

 

I am needing to monitor Top xx CPU and Memory application process.

 

I do see there is a view called: "Top XX Monitored Processes by CPU/Memory Load", however that will ONLY monitor the application that is being "monitored".  I need the a view to display all current process by cpu load.  I know this can be clicked with the real-time process viewer, but I need it to display without clicking.

 

Can this be done via some custom swql script?

Can any one supply a REST example of how to define a Node in Solarwinds

$
0
0

I am developing an integration agent for SolarWindws and would like to use the REST API to add nodes to SolarWindws and change the system name

REST API in PowerShell

$
0
0

I have been able to use the OrionSDK to create PowerShell scripts to help automate some processes that we have. The downside is that each team member will need to install the SDK in order to run the scripts. To try and alleviate this problem, I started looking into the REST/JSON API examples. Is my assumption that using REST will no longer require having the OrionSDK installed?

 

Has anyone been able to create any valid REST/JSON queries in PowerShell? I am having difficulty getting started. I found the PowerShell command: Invoke-RestMethod -uri https://IPAddress:17778/SolarWinds/InformationService/v3/Json/Query  but have been unable to have this appropriately connect to/authenticate with our Orion Server. Any help getting started will be much appreciated, I think figuring everything else out from there should be fairly simple.

Testing Agent with API

$
0
0

We have a lot of remote  Agent based nodes that get re-imaged and therefore we have an UP (new one) and a DOWN one. Sometimes the re-image fails to correctly install the agent I have a PowerShell script, that runs as a scheduled task, that finds Down agent polled Windows devices.

If the script finds an UP one with a matching node caption to the DOWN one, it deleted the DOWN one.

If the script finds an no UP one with a matching node caption to the DOWN one, it Unmanages the DOWN one.

 

The next challenge is to test the Unmanaged nodes to see if the agent is connectable again (the node was down, the WAN link was down, etc). I am trying to use the Orion.AgentManagement.Agent TestWithEngine verb to see if the agent is responding. Here is my code section and returns:

 

# Test Unamanaged ATMs connectability between the poller and the agent. Remanage any that have connectable agents
$agentToTest = Get-SwisData $swis 'SELECT Agent.AgentID, Agent.PollingEngineId, Agent.Node.Caption as Name, Agent.Node.NodeID FROM Orion.AgentManagement.Agent where Agent.Node.status = 9' ;

for ($i=0; $i -lt $agentToTest.Length; $i++)
{
    $testResults = Invoke-SwisVerb $swis Orion.AgentManagement.Agent TestWithEngine @($agentToTest[$i].AgentID, $agentToTest[$i].PollingEngineId)    If($testResults.'#text' -eq "True")    {        $msg+= ("{0} INFO: Remanaging ATM {1} since it is now connectable. `n" -f `        ((get-date -Format s).Replace("T", " ")), (($agentToTest[$i].name | Out-String).Replace("`n", "")) );        $node = "N:" + $agentToTest.nodeID[$i]        Invoke-SwisVerb $swis Orion.Nodes Remanage @($node)           }    else    {       $msg+= ("{0} INFO: ATM {1} agent is still unconnectable. `n" -f `        ((get-date -Format s).Replace("T", " ")), (($agentToTest[$i].name | Out-String).Replace("`n", "")) );    }
}

 

 

The first get-SwisData call returns this:

 

AgentID    PollingEngineId      Name              NodeID
76          10                  Node026A154P      9690
159         10                  Node544A013P      9092
222         10                  Node211A202P      9536
256         10                  Node086A075P      9699
259         10                  Node521A271P      9679
265         10                  Node026A154P      9690
269         10                  Node086A075P      9699
270         10                  Node544A013P      9700
276         10                  Node544A013P      9708

 

Regardless of the state of the agent, I get the same thing as a return from $testResults = Invoke-SwisVerb $swis Orion.AgentManagement.Agent TestWithEngine @($agentToTest[$i].AgentID, $agentToTest[$i].PollingEngineId)

xmlns                                                                                            #text                                                                                         
-----                                                                                            -----                                                                                         
http://schemas.datacontract.org/2004/07/SolarWinds.InformationService.Contract                   true                                                                                          

 

I thought of using the DiscoverInterfacesOnNode but agent based nodes' NodeID returns InvalidNode as the Result regardless of the Agent state.

 

Any assistance will be appreciated.

 

...


API to import and export application monitor templates

how to input 'y' or 'yes' with powershell script to NCM

$
0
0

Hello, Team

is anybody who can give me an idea how to input the 'yes' or 'y' command when waiting for the user input.

want to automate the Nexus 3048 ios upgrade process with powershell script with NCM.

 

Also, powershell script can apply for multiple devices at the same time for example upgrade 100 devices at the same time for 1 powershell script.

 

for example

Images will be upgraded according to following table:

Module             Image         Running-Version             New-Version  Upg-Required

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

     1            system             6.0(2)U1(2)             6.0(2)U3(1)           yes

     1         kickstart             6.0(2)U1(2)             6.0(2)U3(1)           yes

     1              bios      v1.2.0(08/25/2011)      v1.2.0(08/25/2011)            no

     1         power-seq                    v4.4                    v4.4            no

 

 

Switch will be reloaded for disruptive upgrade.

Do you want to continue with the installation (y/n)?  [n] y   <--- here, how to input 'y' command with powershell script ??

 

Install is in progress, please wait.

Performing runtime checks.

[####################] 100% -- SUCCESS

Setting boot variables.

[####################] 100% -- SUCCESS

Performing configuration copy.

[####################] 100% -- SUCCESS

Finishing the upgrade, switch will reboot in 10 seconds.

as20a.w40216b.x460.krccw#

Creating Dependencies through Orion SDK

$
0
0

Hello @Tdanner,

 

I'm currently using Powershell to create dependencies using groups created through REST. Are there any plans (or any other method) to allow the creation of dependencies through REST?

I prefer using REST as I get a response which is much easier to rely on from an automation standpoint. I've tried using firebug (web development tool) to watch for any HTTP POSTs going on in the background, I even tried to put the information services in debug to see what was going on behind the scenes and no dice. I did find this however:

 

2017-04-13 08:50:12,740 [45] DEBUG SolarWinds.InformationService.Core.IndicationLogger - (null) (null)  Indication System.InstanceCreated reported:

  Source instance properties:

    DependencyId = 247011

    Name = testsite(TEST) WAN Devices dependency

    ParentUri = swis://MYORIONINSTANCE/Orion/Orion.Groups/ContainerID=536

    ChildUri = swis://MYORIONINSTANCE/Orion/Orion.Groups/ContainerID=537

    AutoManaged = False

    ParentEntityType = Orion.Groups

    ParentNetObjectID = 536

    ChildEntityType = Orion.Groups

    ChildNetObjectID = 537

    InstanceType = Orion.Dependencies

    Uri = swis://MYORIONINSTANCE/Orion/Orion.Dependencies/DependencyId=247011

 

Looks similar to the values being used in powershell - wondering if I can REST as outlined in the Orion SDK "Create Request" =  https://localhost:17778/SolarWinds/InformationService/v3/Json/Create/Orion.Dependency ??

 

Thank you,

 

=swql

 

 

 

Ability to remove "unmanage" from "maintenance" tab

$
0
0

Hi,

 

I am wondering if there is a way to remove the "unmanage nodes" and only use the 'mute nodes" from the maintenance tab in SAM 6.4, or can we do any custom script to add in just the ability to "mute nodes"?

 

Also, when the account is set with the permission to "node management rights", can we disable the ability to "unmanage nodes".

 

Reason is, we don't want users to accidentally set the nodes to 'unmanage', as it will stop collecting data.

 

Thank you in advance,

Tim

documentation for SWQL for alerts?

$
0
0

Migrated to 11.5.1 and am trying really hard to embrace SWQL.  Having a tough time correlating what I need in the various tables with the documentation from SDK.

specifically, right now, I'm working on my critical alert reset criteria.  Our environment requires someone ACK the critical alert prior to it being able to clear, regardless of trigger criteria status.

before, using SQL, I joined with AlertStatus table and said acknowledged must =1 AND NOT (<trigger criteria>).

 

part of the issue is the alert can clear from the AlertActive table prior to the ACK <and add some other custom complexity> and the alert sticks around in the alertstatusview table even after finally ACK'd.

 

so...if I change my SQL to SWQL, I should be able to do something like...

where ${N=SwisEntity;M=ComponentAlert.Acknowledged}=1

or maybe ${N=Alerting;M=Acknowledged}=1

...what is the difference between {N=SwisEntity;M=ComponentAlert.<>} and ${N=Alerting;M=<>}

 

how are we supposed to know what we can tie together?  is there docs for this? am I missing it?

I see where you lay out swql for nodes and custom properties <objecttype>.CustomProperties.<propertyName>...

 

Inquiring minds want to know!!

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

how to input 'y' or 'yes' with powershell script to NCM

$
0
0

Hello, Team

is anybody who can give me an idea how to input the 'yes' or 'y' command when waiting for the user input.

want to automate the Nexus 3048 ios upgrade process with powershell script with NCM.

 

Also, powershell script can apply for multiple devices at the same time for example upgrade 100 devices at the same time for 1 powershell script.

 

for example

Images will be upgraded according to following table:

Module             Image         Running-Version             New-Version  Upg-Required

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

     1            system             6.0(2)U1(2)             6.0(2)U3(1)           yes

     1         kickstart             6.0(2)U1(2)             6.0(2)U3(1)           yes

     1              bios      v1.2.0(08/25/2011)      v1.2.0(08/25/2011)            no

     1         power-seq                    v4.4                    v4.4            no

 

 

Switch will be reloaded for disruptive upgrade.

Do you want to continue with the installation (y/n)?  [n] y   <--- here, how to input 'y' command with powershell script ??

 

Install is in progress, please wait.

Performing runtime checks.

[####################] 100% -- SUCCESS

Setting boot variables.

[####################] 100% -- SUCCESS

Performing configuration copy.

[####################] 100% -- SUCCESS

Finishing the upgrade, switch will reboot in 10 seconds.

as20a.w40216b.x460.krccw#


API Feasibility - Provisioning Ticket -> Swinds Node Data Consistency

$
0
0

Can custom node fields be updated by entering a ticking system case number, making a call to ITSM and searching for ticket and then querying mapped fields?

Can any one supply a REST example of how to define a Node in Solarwinds

$
0
0

I am developing an integration agent for SolarWindws and would like to use the REST API to add nodes to SolarWindws and change the system name

Execute external script updating ${N=Alerting;M=Notes} with results for email alerting

$
0
0

HI..  I'm new to building Alerts.  I need an alert that that executes an external script when triggered and takes the output and places it in the email that gets sent.   Is that even possible?   So far I noticed running any of the canned *.exe  out of the box (ie. APM\SolarWinds.APM.RealTimeProcessPoller.exe -n=${NodeID} -alert=${N=Alerting;M=AlertDefID} -alertId=${N=Alerting;M=AlertID})    I can find the results in  ${N=Alerting;M=Notes}  for email. 

 

I know of  OrionSDK and its ability to go into the scheme  but  I'm not sure however what objects match up at the time of the alert  (ie. NodeId  =  AlertActiveID?  or AlertObjectID?) and or how to update the Notes field..so I guess basically I'm asking if anyone's ever tried this and or if so what are the basic steps.. and what is the SWQL  query necessary to update the field.      here is what I found so far:

 

SELECT AlertObjectID, AlertID, EntityUri, EntityType, EntityCaption, EntityDetailsUrl, EntityNetObjectId, RelatedNodeUri, RelatedNodeId, RelatedNodeDetailsUrl, RelatedNodeCaption, RealEntityUri, RealEntityType, TriggeredCount, LastTriggeredDateTime, Context, AlertNote

FROM Orion.AlertObjects

Where RelatedNodeId = 14

 

 

That produced the correct host I was looking for since 'RelatedNodeId'  matches with NodeID  and I can see the 'AlertNode' field all I need to do now is place my data there..    so is it a simple query to update that field to all me to see results in ${N=Alerting;M=Notes} ?

 

Thanks much!

Tying SQL and SWQL together - help please

$
0
0

Hi there,

 

It appears that an alert has been setup that goes like this (SWQL):

 

SELECT E0.[Uri], E0.[DisplayName]

FROM Orion.VIM.Hosts AS E0

WHERE  ( E0.[MemUsageThreshold].[CurrentValue] = E0.[MemUsageThreshold].[Level2Value] )

 

I managed to expand on this, to return some more details, so now I can see the current memory utilisation and the two thresholds (critical and warning respectively): 

 

SELECT E0.Uri, e0.HostID, E0.HostName, E0.NodeID, E0.MemUsageThreshold.CurrentValue, E0.MemUsageThreshold.Level2Value, E0.MemUsageThreshold.Level1Value

FROM Orion.VIM.Hosts AS E0

 

However, someone has asked me to tweak these thresholds on a few hosts and despite several hours of investigating in VIM and in SQL with the VIM_Host* tables,I am no closer to finding where I can adjust these thresholds, in Orion or by SQL.

 

The values from E0.MemUsageThreshold.CurrentValue, E0.MemUsageThreshold.Level2Value, E0.MemUsageThreshold.Level1Value appear to be very similar to those in SWQL table VIM_HostThresholds, which uses  only one ID column, InstanceID.

 

I assumed that one of the VIM_Host* tables would tie back to the VIM_Host*Threshold tables, but these tables use an InstanceID, which I have been unable to tie back to any other table.

 

I have listed and search all table with InstanceID as a column name

 

Select table_name

From information_schema.columns

Where column_name = 'InstanceId';

 

Results in:

table_name

VIM_ClusterThresholds

VIM_ClusterCpuLoadThreshold

VIM_ClusterMemUsageThreshold

ESI_Instance

VIM_DatastoreThresholds

SNI_AlertIncidents

VIM_DatastoreIOPSTotalThreshold

VIM_DatastoreIOPSReadThreshold

VIM_DatastoreIOPSWriteThreshold

VIM_DatastoreLatencyTotalThreshold

VIM_DatastoreLatencyReadThreshold

VIM_DatastoreLatencyWriteThreshold

VIM_HostThresholds

VIM_HostCpuLoadThreshold

VIM_HostMemUsageThreshold

VIM_HostNetworkUtilizationThreshold

VIM_VirtualMachineThresholds

VIM_VirtualMachineCpuLoadThreshold

VIM_VirtualMachineMemUsageThreshold

VIM_VirtualMachineCpuReadyThreshold

VIM_VirtualMachineIOPSTotalThreshold

VIM_VirtualMachineIOPSReadThreshold

VIM_VirtualMachineIOPSWriteThreshold

VIM_VirtualMachineLatencyTotalThreshold

VIM_VirtualMachineLatencyReadThreshold

VIM_VirtualMachineLatencyWriteThreshold

VIM_VirtualMachineNetworkUsageRateThreshold

DPI_Thresholds

DPI_ApplicationsThresholds

NodesThresholds

NodesCpuLoadThreshold

NodesPercentMemoryUsedThreshold

NodesResponseTimeThreshold

NodesPercentLossThreshold

NodesForecastCapacity

NodesPercentMemoryUsedForecastCapacity

NodesCpuLoadForecastCapacity

Thresholds

WirelessHeatMap_MapPoint

ForecastCapacitySettings

WorldMapPoints

InterfacesThresholds

VolumesForecastCapacity

InterfacesInErrorsDiscards

VolumesPercentDiskUsedForecastCapacity

InterfacesOutErrorsDiscards

InterfacesInPercentUtilization

InterfacesOutPercentUtilization

InterfacesForecastCapacity

 

So far, I have found nothing in there to allow me to tie InstanceID back with a host

 

I am guessing there is a lookup table somewhere I am missing, does any one have any ideas?

Or how to avoid SQL entirely and update these thresholds using the UI?

Connection error while updating node

$
0
0

Hi,

There is a problem about updating custom property. As you see images, while updating custom property for any node, Key-value pair is "CINUM-XXXX".

 

I got this error message, "The connection was not closed. The connection's current state is open.".

 

Why got this message?

 

Platform version:

Orion Platform 2017.1.1 SP1, CloudMonitoring 1.0.0, SAM 6.4.0, DPAIM 11.0.0, NCM 7.6, VIM 7.1.0, QoE 2.3, NetPath 1.1.0, NPM 12.1

PS: We installed "Orion Platform 2017.1 - Hot Fix 1"

 

Code.png

 

Error.png

Viewing all 3719 articles
Browse latest View live


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