Quantcast
Viewing all 2677 articles
Browse latest View live

Testing Agent with API

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.

 

...


Ability to remove "unmanage" from "maintenance" tab

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

Image may be NSFW.
Clik here to view.

Definition of "Status" field in "Orion.Nodes" table


Dear Sir or Madam -

 

Would you please document the possible values that may appear in the  "Status"  field of the  "Orion.Nodes"  table ?

 

I know that value "1"  means "up"  and value  "2"  means  "down".   What other values may appear and what do they mean ?

 

Thank you.

 

James Troy

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

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

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?

python/sql variables

Was hoping someone had some experience pulling a single field out of a query and assigning it to a variable inside a python script.

 

Use Case: I want to pull the interfaceName field and assign a variable to that specific field that i can use in my python script. I understand how to query the database through the swisclient python module, but am having a hard time finding any documentation on how to assign a variable based on the output. Of course if there is a smarter way I should be looking at this i'm open to new ideas.

Hello all! I am looking to use the Orion SDK to build a Dashboard.

That shows information and data from my organizations network and servers. I am planning on using Golang to build the dashboard. Does anyone know of a example of someone doing something similar with GO or just any examples at all of someone creating a custom dashboard with the Orion SDK. Any help is much appreciated as i am new to programming and trying to find as many resources as possible. Thanks so much.

Connection error while updating node

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"

 

Image may be NSFW.
Clik here to view.
Code.png

 

Image may be NSFW.
Clik here to view.
Error.png


How to Query Netflow Sources via Curl / Json

SWQL query to populate alert definition and (send-email) email address

Hi,

 

I am looking for a way to run a swql query to get the Alerts definition plus the email address (triggered action).

 

I have looked under all of the orion.alert* tables and do not see any correlation to the triggered action to show the email address being used (send-email).

 

Can you point me to the right direction or right table.


Thank you in advance!

SWIS - Encryption over TCP 17777 - EOC > Remote Orion instances.

Hey all,

 

Been trawling through the SDK info in GitHub, trying to work out the encryption method used by SWIS, when EOC gathers information from remote Orion instances. Try as I might, I can't find a single entry which explains it in enough detail for me to put in a security statement.

 

Does anyone have any information that could help me answer this question properly?

Verbs and their parameters for IPAM.IPNode in addition to 'UpdateManyStatus'??

PREFACE:

  1. I'll be referring to the blog: How to use the IPAM API and get "Free IP Address" specifically a post by mtokarz on June 12, 2014 2:35PM in response to jgovednik
  2. I am also aware of and have voted for the feature request: Add SWIS features to IPAM
  3. I have also referred to this question post: Re: Full documentation of Orion SDK verbs? to see if any verbs exist for IPAM.IPNode, but none that I can find.

 

Following the post mentioned in #1, I am able to successfully find the next free ip address and update the status of an IP address in Solarwinds using Powershell:

 

Pre-reqs: Download the Orion SDK: solarwinds/OrionSDK · GitHub

 

Getting a Free IP Address:

# START Connect to SWIS

Add-PSSnapin SwisSnapin

$hostname = "mysolarwinds"

$username = "myuser"

$password = ConvertTo-SecureString -String "mypassword" -asplaintext -force

$creds = New-Object -TypeName System.Management.Automation.PSCredential -Argumentlist $username, $password

$swis = Connect-Swis -host $hostname -Credential $creds

# END Connect to SWIS


Function SWOIPAM-GetFreeIpAddress($subnetAddress)

{

  $ipaddress = Get-SwisData $swis 'SELECT TOP 1 I.DisplayName FROM IPAM.IPNode I WHERE Status=2 AND I.Subnet.Address=@subnetAddress AND I.DnsBackward IS NULL' @{subnetAddress = $subnetAddress}

  return $ipaddress

}


$subnetProvision = 'X.X.X.X'

SWOIPAM-GetFreeIpAddress($subnetProvision)

 

Where:

  • $subnetProvision = Desired subnet to get next available IP Address from

 

Updating the Free IP Address' status from 'Available' to 'Used':

$postParams = @{__EVENTTARGET='ctl00$BodyContent$ctl05';__EVENTARGUMENT='';'ctl00$BodyContent$Username'='admin';'ctl00$BodyContent$Password'='password'}

Invoke-WebRequest -Uri http://mysolarwinds:8787/Orion/Login.aspx?autologin=no -Method POST -SessionVariable s -Body $postParams

$postParams =  @{'entity'='IPAM.IPNode';'verb'='UpdateManyStatus';'ObjectId'='129';'ipstatus'='1';'ids'='4'}

Invoke-WebRequest -Uri http://mysolarwinds:8787/Orion/IPAM/ExtCmdProvider.ashx -Method POST -WebSession $s -Body $postParams

 

Where:

  • ObjectID : type = number => SubnetId from IPAM.IPNode
    • One can obtain the SubnetId with the query: SELECT SubnetId, Address, FriendlyName, VLAN FROM IPAM.Subnet
  • ipstatus : type = number => where 1 (Used), 2 (Available), 4 (Reserved)
  • ids : type = number => the 4th octet of the IP Address you want to update in the specified subnet

 

THE QUESTION:

If the verb 'UpdateManyStatus' (with the params of ObjectID, ipstatus and ids) exist for IPAM.IPNode to update a particular IP address' status,

(@{'entity'='IPAM.IPNode';'verb'='UpdateManyStatus';'ObjectId'='129';'ipstatus'='1';'ids'='4'}),

are there any other verbs or documentation of verbs with necessary parameters for IPAM.IPNode that will update the DnsBackward (hostname), Comments and SkipScan fields for a particular IP Address??


If I can find out the verbs and their necessary parameters, then I would be able to update via the same method used for updating an IP Address' status in Powershell.

 

Thank you

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

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

NPM Agent and SCCM

  We can successfully deploy the agent for Agent Initiated monitoring with SCCM using an MSI and MST, but it fails to create the SolarWinds node object.

The service runs, but never makes the node.

if you go into Control Panel and enter a valid set of SolarWinds credentials...

magic, it works:

Image may be NSFW.
Clik here to view.

How do we either set the credentials in the MST or programmatically update the User/PW?
We have 500 ATMs, 1500 servers and 5000+ laptops and desktops to bring in. Going one by one is NOT an option.

 

Thanks

Image may be NSFW.
Clik here to view.

Orion SDK 2.2 released

Orion SDK 2.2 has been released. The main feature in this release is smart autocomplete in SWQL Studio, but there are also various minor bugfixes and improvements.

 

You can download the installer from GitHub: Release v2.2.54 · solarwinds/OrionSDK · GitHub

You can also install it from Chocolatey (Chocolatey Gallery | SolarWinds Orion SDK 2.2.54 ) using "choco install orionsdk"

 

Documentation is on the GitHub wiki: Home · solarwinds/OrionSDK Wiki · GitHub

 

These tools are compatible with all of the same SolarWinds products that the previous release was, so you should have no fear of upgrading. On the other side, Orion SDK 2.1 and several previous releases are compatible with the latest 2017 SolarWinds products, so don't feel like you need to upgrade the Orion SDK just for compatibility.

 

As always, you can ask your Orion SDK questions in this forum. If you see a bug in the SDK tools, feel free to open an issue on the GitHub project: Issues · solarwinds/OrionSDK · GitHub.


Unmanage a container

Is it possible to unmanage a container or group?

 

In SWQL Studio, I look in Orion.Container and see columns for UnManaged, UnManageFrom, and UnManageUntil, similar to Orion.Nodes. Unlike Orion.Nodes, there are no swis verbs for To Unmanage or Remanage a container.

 

The closest I have come is to use the UpdateContainer verb to disable polling. This works, but I have to build my own scheduling and there's no indication in the web front end that polling is disabled.

 

In case there is any confusion, I am trying to unmanage the container itself, not the nodes and applications within the container.

Image may be NSFW.
Clik here to view.

How to Query Netflow Sources via Curl / Json

Add node with snmpv3 credentials

Hi

 

We have just moved one of our rigs to NPM 12 and it looks like it has broken some of our SDK automation while we can add devices that use SNMPv2 those with SNMPv3 (which as it turns out is all our new devices) fail to add giving the below error.

 

New-SwisObject : Invalid column name 'SNMPV3PrivKeyIsPwd'.

Invalid column name 'SNMPV3AuthKey'.

Invalid column name 'SNMPV3PrivMethod'.

Invalid column name 'SNMPV3AuthMethod'.

Invalid column name 'SNMPV3PrivKey'.

Invalid column name 'SNMPv3Username'.

Invalid column name 'SNMPV3Context'.

Invalid column name 'SNMPV3AuthKeyIsPwd'.

 

I suspect something has moved around in the schema and this now needs creating in a different way but there is nothing obvious around how to make the necessary changes.

 

We have SDK v2.1.13 in place

 

JonG

Image may be NSFW.
Clik here to view.

Understanding links and the green objects shown in SWQL Studio

Hi

 

I am trying to understand the what the links shown in any table represent in swql studio. In the following snapshot the link with Storage Array makes sense to me as there is Storage Array ID object in the table linking this table to storage array table. The other link is Orion.srm.pools, not sure how this is linked. There are some pool capacity objects but there is no object for pool id in this table. Also i wondering what does the green objects represent?

 

Image may be NSFW.
Clik here to view.

 

Image may be NSFW.
Clik here to view.

Image may be NSFW.
Clik here to view.

 

Regards

Ahmee

Alert Suppression Question

I was wondering if the new Orion.AlertSuppression.SuppressAlerts allow for custom Date time?

 

 

Orion.AlertSuppression.SuppressAlerts

entityUris

 

System.String[]

suppressFrom

 

System.Nullable`1[[System.DateTime, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]

suppressUntil

 

System.Nullable`1[[System.DateTime, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]

Viewing all 2677 articles
Browse latest View live


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