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

Is it possible to acknowledge alerts programmically from a linux server?

$
0
0

We are using OpsGenie to aggregate all the alerts for our alerting. We'd like to integrate Solarwinds too. I was wondering if there is a way to programmically acknowledge alerts from a linux server? I was hoping there would be some sort of API for Solarwinds but it doesn’t look like that is the case. I contacted Solarwinds tech support and they pointed me here.


Has anyone found a way to pull part numbers, product descriptions and serial numbers using the SDK?

$
0
0

I have found this query "SELECT ServiceTag FROM Orion.HardwareHealth.HardwareInfo WHERE NodeID = xxx" will get the main serial number for a few types of devices, but it doesn't work for most. I have been combing thru all the options in the SolarWinds Information Service v3.0 Schema Documentation, but cannot find anything that consistently works well. I am wondering if maybe Solarwinds Orion does not pull it. I guess if I have to I will pull it via snmp from the devices themselves, but I would rather use SW as my data gathering engine. I have to think Orion is already pulling this information.

Can I have query get NPM(i.e, interface and node) related data by using queyXML()?

$
0
0

Hi ,

 

   I am trying get Network Performance related monitoring data from server using Orion SDK'squeryXML() method.

Here I have Interface, Node and InterfaceTraffic tables in Orion SDK's data base.

What are tables need to join to prepare the query to get data?.

what is the relationship between these three tables above mentioned.

 

Please help on this.  It will be  much appreciated .

 

Thanks .

New nodes added through swis do not poll

$
0
0

I added a bunch of ICMP nodes using powershell commands. The nodes appear in the Web UI and I see them in the database, but they're not actually polling. They stay as green dots even though they don't poll. These are ICMP-only nodes, and I have a large number of them, so I would really like to do this with a command and not the Web UI. I tried opening a support case for nodes not polling, but as soon as I mentioned powershell, they suggested I post here and closed the case.

 

Here is a sample command (assume already connected to swis):

 

New-SwisObject $swis -EntityType "Orion.Nodes" -Properties @{EntityType="Orion.Nodes"; IPAddress="10.0.0.120"; IPAddressGUID="7800000A-0000-0000-0000-000000000000"; Caption="Node120"; DNS="Node120";DynamicIP=$False; EngineID=1; Status=1; UnManaged=$False; Allow64BitCounters=$True; SysObjectID=""; MachineType=""; VendorIcon=""; ObjectSubType="ICMP"; }

At first I didn't include the IPAddressGUID, but I've since added it with no change. I've already tried Allow64BitCounters=$False

Setting up APIs (or SDK) for IPAM reservations

$
0
0

Hello,

 

One of our teams is trying to create an applet that will assign IP address reservations directly to the IPAM tables.  His script is as follows:


UPDATEIPAM_NodeSetStatus= 1,Description='Assigned by Automation'

WHEREIPAddress='xxx.xxx.xxx.xxx'

 

Also, the script below is designed to flag IP addresses as Avalable.

 

SELECTR.AddressasSubnetAddress,R.CIDR,R.FriendlyName,R.PercentUsed,

(SELECTTOP 1 I2.IpAddressFROMIPAM_NodeasI2WITH (NOLOCK)WHEREI2.Status=2 ANDI2.SubnetId=R.GroupID)ASFreeIpAddress

FROMIPAM_GroupasRWITH (NOLOCK)

WHERER.GroupType='8'ANDR.AddressLIKE'xxx.xxx.xxx.%'


The script seemed to work fine at first, with the required IP address showing as Used.  However, when I look at the subnet utlization, it shows 0 IP's used.  So, it seems that the there is another table that needs to be update.  Do any of you know which additional table(s) need to be updated as well?  Thanks in advance. 

"Complex" SWQL Query and Error

$
0
0

Hi all,

I'm trying to create a table resource for displaying custom poller results using swql query.

 

I've created the query in SQL, where it works without problems. When converted to SWQL though, it produces the error at the bottom of this post.

The query (already translated with SWQL v3 schema names) is:

 

select AP_Name,Switch,Port,Duplex,Speed

from

(   SELECT

    sts.RowID,sts.Status as AP_Name

    FROM

    Orion.NPM.CustomPollerStatus Sts inner join Orion.NPM.CustomPollerAssignment Ass on Sts.CustomPollerAssignmentID = Ass.CustomPollerAssignmentID

    inner join  Orion.NPM.CustomPollers CP on Ass.CustompollerID = CP.CustompollerID

    WHERE

    CP.CustompollerID like '7A4E4DAC-BF2B-4CA4-9DC3-40B6B00C5B5D')as tableAP

left join

(   SELECT

    sts.RowID,sts.Status as Switch

    FROM

    Orion.NPM.CustomPollerStatus Sts inner join Orion.NPM.CustomPollerAssignment Ass on Sts.CustomPollerAssignmentID = Ass.CustomPollerAssignmentID

    inner join  Orion.NPM.CustomPollers CP on Ass.CustompollerID = CP.CustompollerID

    WHERE

    CP.CustompollerID like 'a9f57ac8-efb6-4d8c-97ea-8de315e5c443')as tableSwitch

On tableSwitch.RowID = TableAP.RowID

left join

(   SELECT

    sts.RowID,sts.Status as Port

    FROM

    Orion.NPM.CustomPollerStatus Sts inner join Orion.NPM.CustomPollerAssignment Ass on Sts.CustomPollerAssignmentID = Ass.CustomPollerAssignmentID

    inner join  Orion.NPM.CustomPollers CP on Ass.CustompollerID = CP.CustompollerID

    WHERE

    CP.CustompollerID like '166f2b25-ed1e-41ad-a79b-94f39711753e')as tablePort

 

On TableAP.RowID = Tableport.RowID

 

Left Join

 

(   SELECT

    sts.RowID,sts.Status as Duplex

    FROM

    Orion.NPM.CustomPollerStatus Sts inner join Orion.NPM.CustomPollerAssignment Ass on Sts.CustomPollerAssignmentID = Ass.CustomPollerAssignmentID

    inner join  Orion.NPM.CustomPollers CP on Ass.CustompollerID = CP.CustompollerID

    WHERE

    CP.CustompollerID like '5504e8ad-9cf4-43a1-b2b8-7d4bdcd66c0b')as tableDuplex

 

On TableAP.RowID = TableDuplex.RowID

 

Left Join

 

(   SELECT

    sts.RowID,sts.Status as Speed

    FROM

    Orion.NPM.CustomPollerStatus Sts inner join Orion.NPM.CustomPollerAssignment Ass on Sts.CustomPollerAssignmentID = Ass.CustomPollerAssignmentID

    inner join  Orion.NPM.CustomPollers CP on Ass.CustompollerID = CP.CustompollerID

    WHERE

    CP.CustompollerID like '4d888308-c447-474a-b257-c9b210ad918b')as tableSpeed

 

On TableAP.RowID = TableSpeed.RowID

 

 

Then I will filter the results in order to have details of a single AP in the AP page, but before I would like to have it working in this way.

If I execute all single selects separately, all of them work.

If I execute just the first part (getting the AP name with the external select that gathers from the tableAP) it works.

Apparently what's not working is the join between the various "tables".

 

The error I get is this:

The communication object,

System.ServiceModel.SecuritySessionClientSettings'1+ClientSecurityDuplexSessionChannel[System.ServiceModel.Channels.IDuplexSessionChannel], cannot be used for communication because it is in the faulted state.

 

Any help will be appreciated.

 

Thanks,

Dave

 

 

PS. I also ask if is there a possibility to define a table (like With Table as ( select blablabla) ) in order to avoid multiple joins for every "column" of the query below.

Can I have query get NPM(i.e, interface and node) related data by using queyXML()?

$
0
0

Hi ,

 

   I am trying get Network Performance related monitoring data from server using Orion SDK'squeryXML() method.

Here I have Interface, Node and InterfaceTraffic tables in Orion SDK's data base.

What are tables need to join to prepare the query to get data?.

what is the relationship between these three tables above mentioned.

 

Please help on this.  It will be  much appreciated .

 

Thanks .

Orion SDK does not provoke Auditing Events?

$
0
0

I'm working on a perl library that will, among other things, slurp a family of Custom Properties out of our CRM and into SolarWinds NPM Nodes.  I'm noticing that when I use the web interface to manually edit a Custom Property, an Auditing Event appears in the Node Summary widget we have defined for 'Last 5 Audit Events', which selects from all possible event types related to the node.  When I run my perl script to edit these same Custom Properties, no Audit Events appear.

 

From playing in the Message Center, I find that if I do a search for events generated by my own username (using %jlellis% rather than the *jlelllis* I expected) then I do get my own events for actions performed through the web gui.  If I do the same search for actions taken by the account I created specifically for use by perl scripts, I get zippo.  It appears that nothing done through the perl SDK is being tracked by the Auditing system.

 

My assumption is that SWIS and/or the SDK has not been updated to automatically create the Auditing Events new in 10.4.  For security purposes, I would expect that something beyond the SDK would be responsible for tracking these events.  Are there plans to ensure SWIS/SDK operations are also generating appropriate Auditing Events without us having to generate them in our own code?

 

This seems like an Auditing hole big enough to drive a semi through.  I could write a script to destroy our tables and there would be nothing tracking it.  Tsk.


Need Help Converting SQL Report Writer Code to SWQL - Down Time Duration

$
0
0

Here is Report Writer SQL code that produces the duration of down time for a node.  I need to be able to convert this to SWQL and populate the 'hours down' time into a custom property field.  I want to use the 'hours down' time custom property field in conjunction with changing Google map Icon colors once time frame meets specified thresholds.   I'm not very savvy with SQL or coding so all suggestions are welcome.  Thanks everyone.  

 

SELECT     DATEDIFF(hh, T1.DownTime, CURRENT_TIMESTAMP) AS HoursDown, Nodes.Caption, Nodes.IP_Address,

T1.DownTime, Nodes.NodeID

FROM         (SELECT     MAX(EventTime) AS DownTime, NetObjectID, NetworkNode

                       FROM          Events

                       WHERE      (EventType = 1) AND (NetObjectType = 'N')

                       GROUP BY NetObjectID, NetworkNode) AS T1 INNER JOIN

                      Nodes ON T1.NetworkNode = Nodes.NodeID

WHERE     (Nodes.Status = '2') AND (Nodes.Owner = 'RHD')

ORDER BY HoursDown DESC, Nodes.Caption, T1.DownTime DESC, Nodes.NodeID

 

Output from this Query:

HoursDownNodeIP AddressDownTimeNode ID
139rtr.316864.ph.us.tgr.net10.165.4.111/2/2012 14:1818188
131rt2.023675.ph.us.tgr.net10.180.119.211/2/2012 22:1316384
120rt2.013146.ph.us.tgr.net10.81.4.211/3/2012 9:5615487
63rt2.013426.ph.us.tgr.net10.250.112.211/5/2012 18:1315560
42rtr.023040.ph.us.tgr.net10.80.164.111/6/2012 15:4816194
41rt2.012626.ph.us.tgr.net10.81.76.211/6/2012 16:5515348
39rt2.013236.ph.us.tgr.net10.7.34.211/6/2012 18:2215534
39rtr.023016.ph.us.tgr.net10.80.141.111/6/2012 18:0116174
36rt2.008384.ph.us.tgr.net10.74.64.211/6/2012 21:1314776
24rt2.026530.ph.us.tgr.net10.76.43.211/7/2012 9:4617140
17rt2.013122.ph.us.tgr.net10.81.94.211/7/2012 16:1115475
17rt2.013139.ph.us.tgr.net10.81.103.211/7/2012 16:1815484
16rtr.012934.ph.us.tgr.net10.82.80.111/7/2012 17:4815429
15rt2.006231.ph.us.tgr.net10.13.12.211/7/2012 18:2814567

Does EOC support SWQL Select Case?

$
0
0

I am trying to setup a case statement in EOC 1.6 using SWQL and everything I do fails.

 

Boiling it down to something simple still fails

 

SELECT
CASE WHEN a.AcknowledgedTime = '12/30/1899 8:00:00 AM' Then ''
ELSE a.AcknowledgedTime END
FROM EOC.AlertStatus a

 

 

What I am seeing is the default ack time of 12/30/1899 8:00:00 AM this is confusing users. I'd like to simple hide it from my query by using a case and then just showing blank.  I have tried using DateTime('12/30/1899 8:00:00 AM') and using other operators such as like or <>

 

Testing in SWQL Studio gives the error below:

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

SWQL Studio

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

mismatched input 'CASE' expecting '<UP>'

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

OK  

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

 

 

Testing on the web resource gives the error:

There was an error processing the request.

 

Any thoughts?


Using 12/30/1899 8:00:00 AM

Orion API via PHP

$
0
0

One of the things I have been tasked with doing is understanding the API to see if we can use it for some of our reporting. I reviewed the Orion API documentation and there aren’t any PHP examples. I also can not find any such examples in thwack. Can anyone help me with an example? I have spent some time trying to figure this out and I can’t tell if I am doing something wrong or if SWIS is even available.

Adding new tab to Orion view? Possible?

$
0
0

I wanted to ask around and see if it was possible to add a new tab to the main Orion view? For example.... I would like to add a new tab that when moused over would list out each of my real time dashboard views. Possible? Any other suggestions would be most welcomed.

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.

Is it possible to acknowledge alerts programmically from a linux server?

$
0
0

We are using OpsGenie to aggregate all the alerts for our alerting. We'd like to integrate Solarwinds too. I was wondering if there is a way to programmically acknowledge alerts from a linux server? I was hoping there would be some sort of API for Solarwinds but it doesn’t look like that is the case. I contacted Solarwinds tech support and they pointed me here.

Help with SWIS/JSON node addition

$
0
0

Hello,

 

I have just started to dabble with the Orion SDK and am looking for a way to integrate Solarwinds with some Python scripts we have to automatically provision gear, etc.

 

I followed the Python Client sample and have successfully added my nodes and assigned generic SNMP/Uptime/Interface pollers and changed custom properties.  My first problem is that these nodes never have any interfaces added.  I even tried running my nightly import job, and they didn't even show up on the scan.  Interestingly, the rediscovers look to be running, but I'm not sure why the poll is always stuck at when I added the node.  Subsequently, it never seems to discover the machine type, etc.  If I do a list resources from the GUI, I can manually add in all the interfaces.

 

In the end, I'd also like to automatically add these nodes to NCM and, if possible, set it as a device to be scanned for Layer 3 networks in the IPAM module.  I haven't found a ton of documentation on this yet....  Any help would be greatly appreciated.

 

-Scott

Polling Details

Polling IP Addressxxxxxx
Polling Enginexxxxxx
Polling MethodSNMP
Polling Interval120 seconds
Next Poll04:41 PM  (this is in the past)
Statistics Collection10 minutes
Enable 64 bit CountersYes
Rediscovery Interval30 minutes
Next Rediscovery05:59 PM
Last Database UpdateFriday, August 22, 2014 5:50 PM

Internal Server Error when unmanaging node over HTTP

$
0
0

Hi,

 

I am trying to use the Orion SDK to unmanage a node via a http request. My request is as follows:

POST https://10.13.36.29:17778/SolarWinds/InformationService/v3/Json/Invoke/Orion.Nodes/Unmanage HTTP/1.1

Content-Length: 67

Host: 10.13.36.29:17778

Authorization: Basic Q29ubmVjdDpzcG9ydGluZw==

Body:

["N:1114", "2014-03-28T11:55:00Z", "2014-03-28T12:00:00Z", "false"]

 

And the response I am getting is:

HTTP/1.1 500 Internal Server Error

Content-Length: 275

Content-Type: application/json

Server: Microsoft-HTTPAPI/2.0

Date: Fri, 28 Mar 2014 11:53:18 GMT

 

"The incoming message has an unexpected message format 'Raw'. The expected message formats for the operation are 'Xml', 'Json'. This can be because a WebContentTypeMapper has not been configured on the binding. See the documentation of WebContentTypeMapper for more details."

 

Is my request correctly formed and is there somewhere that I can take a look at what the internal server error is?

 

Thanks,

Kristian

How to access Orion REST/JSON API using Java?

$
0
0

Hi ,

 

  Please provide Java client code  to access  Orion REST/JSON API.

Setting up APIs (or SDK) for IPAM reservations

$
0
0

Hello,

 

One of our teams is trying to create an applet that will assign IP address reservations directly to the IPAM tables.  His script is as follows:


UPDATEIPAM_NodeSetStatus= 1,Description='Assigned by Automation'

WHEREIPAddress='xxx.xxx.xxx.xxx'

 

Also, the script below is designed to flag IP addresses as Avalable.

 

SELECTR.AddressasSubnetAddress,R.CIDR,R.FriendlyName,R.PercentUsed,

(SELECTTOP 1 I2.IpAddressFROMIPAM_NodeasI2WITH (NOLOCK)WHEREI2.Status=2 ANDI2.SubnetId=R.GroupID)ASFreeIpAddress

FROMIPAM_GroupasRWITH (NOLOCK)

WHERER.GroupType='8'ANDR.AddressLIKE'xxx.xxx.xxx.%'


The script seemed to work fine at first, with the required IP address showing as Used.  However, when I look at the subnet utlization, it shows 0 IP's used.  So, it seems that the there is another table that needs to be update.  Do any of you know which additional table(s) need to be updated as well?  Thanks in advance. 

Full documentation of Orion SDK verbs?

$
0
0

Hello,

 

In the latest version of the SolarWinds Technical Reference for the Orion Software Development Kit there is a section called "Some Useful Verbs".  However, by both it's own name and by how I have seen others used here on Thwack I know that this is not the full list of verbs.

 

Is there any documentation, official or otherwise, of a full list of what verbs are available and for what operations within the Orion SDK?  The Tech Ref document is lacking such a list, and even the "Some Useful Verbs" section lacks some verbs that are used elsewhere in the same document.

Is it possible to programmatically search NCM configs using SWIS API?

$
0
0

I would like to grep config archives using script since that provides me with far more flexibility. Any pointers in the right direction?

Viewing all 3719 articles
Browse latest View live


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