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

SQL - Bulk update Interface Statistics interval

$
0
0

Hey Guys,

 

I have a requirement to change interface statistics collection to a non global setting based on a custom property on the node level. I have the query where I pull the NodeID that match the criteria and I know the Interface properties to key on, (these are backup interfaces so we don't need the frequency of stats that are global default)

 

I want to know if its simply changing the column value StatCollection in the Orion.NPM.Interfaces table.

 

Something along the lines of

 

update Orion.NPM.Interfaces

set StatCollection = '30'

where NodeID = 'XYZ'


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

How to average detailed data into hourly averages with SWQL?

$
0
0

Hello all,

I am trying to create a report that documents the hourly average and max of VPNs that are up across my remote sites over the last week.  I have the query mostly working but the I can't figure out how to get SWQL to actually calculate the aggregate functions for my data.  Right now it is just truncating the datetime field to the hour, but it is still giving me mulitple records per system, per hour.  Can anyone point out what I am missing?  Thank you for your help!

 

SELECT

 

N.Caption,

CP.City,

CPA.AssignmentName,

AVG(CPS.RawStatus) AS AVG_VPNs,

MAX(CPS.RawStatus) AS MAX_VPNs,

DateTrunc('hour', CPS.DateTime) AS Date

 

FROM  Orion.Nodes N

INNER JOIN Orion.NPM.CustomPollerAssignment CPA ON N.NodeID=CPA.NodeID

FULL JOIN  Orion.NPM.CustomPollerStatistics CPS ON CPS.CustomPollerAssignmentID=CPA.CustomPollerAssignmentID

INNER JOIN Orion.NodesCustomProperties CP ON CP.NodeID= N.NodeID

WHERE N.MachineType LIKE '%ASA%' AND AssignmentName LIKE '%Tunnels%' AND CP.City NOT LIKE '%HQ%'

AND DateTime > GetDAte()-7

GROUP BY N.Caption , CP.City, CPS.Datetime, CPA.AssignmentNAme

ORDER BY CP.City ASC

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!

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. 

Perl SDK - Start Discovery - PluginConfigurations

$
0
0

How can I find what is the least amount of XML to pass to PluginConfigurations?

 

Here is what I pass: and I get a bad_request error. Basically what I need to know is the bare min, I want to pass a IP address to StartDiscovery and then point it to an already existing Discovery Profile, do not want to create one.

 

  my $discoveryProfileXml = <<"END";

<CorePluginConfigurationContext xmlns:i='http://www.w3.org/2001/XMLSchema-instance' xmlns='http://schemas.solarwinds.com/2012/Orion/Core'>

         <BulkList>

         <string>$ipAddress</string>

         </BulkList>

        <IpRanges />

        <Subnets />

        <Credentials />

        <WmiRetriesCount>0</WmiRetriesCount>

        <WmiRetryIntervalMiliseconds>0</WmiRetryIntervalMiliseconds>

    </CorePluginConfigurationContext>

END

 

*****************************************

my @pluginConfigurationItems = ({ PluginConfigurationItem => "$discoveryProfileXml" });

 

            my %startDiscoveryConfiguration = (

                    Name => 'Production Profile 1' ,

                    EngineID => $engineID,

                    JobTimeoutSeconds => 3600,

                    SearchTimeoutMiliseconds => 2000,

                    SnmpTimeoutMiliseconds => 3000,

                SnmpRetries => 1,

                RepeatIntervalMiliseconds => 1800,

                SnmpPort => 161,

                HopCount => 0,

                PreferredSnmpVersion => 'SNMP2c',

                DisableIcmp => 0,

                AllowDuplicateNodes => 1,

                IsAutoImport => 1,

                IsHidden => 0,

                PluginConfigurations => \@pluginConfigurationItems

            );

 

            my @verbArguments = (\%startDiscoveryConfiguration);

            my $SWServer = $self->{engineconfig}->{OrionConfig}->{"$Region"};

            my $swhostname = $SWServer->{OrionServer}; # fill in a hostname

            my $swport = $SWServer->{JSONPort};

            my $swprotocol = $SWServer->{Protocol};

            my $SWCredentials = $self->get_credentials($SWServer->{CredentialSetName});

            my $username = $SWCredentials->{username};

            my $password = $self->decrypt_password($SWCredentials->{password});

 

            my $uri = "https://$swhostname:$swport/SolarWinds/InformationService/v3/Json/Invoke/Orion.Discovery/StartDiscovery";

            my $rest = REST::Client->new();

            $rest->getUseragent()->proxy(['https']);

            $rest->getUseragent()->ssl_opts(verify_hostname => 0);

            my $headers = {

                Authorization => 'Basic ' . MIME::Base64::encode_base64($username . ':' . $password),

                'Content-Type' => 'application/json'

            };

            my $json = JSON->new->allow_nonref->utf8;

             my $json_text = $json->space_after->encode(\@verbArguments);

 

            #print "$json_text\n";

            my $response = $rest->POST($uri, $json_text, $headers);

            print Dumper $response;

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

WMI Discovery Volumes Problem

$
0
0

Hi folks,

 

I am implementing an integration with our CMDB. Trying to discover new server nodes added on CMDB. Nightly the my perl script is connecting to CMDB and Solarwinds DB, finding differences, if needed updates some custom properties or discovers new nodes.

 

Everything is going as it was planned with snmp devices (AIX and Linux ones). However i wanted to extend the script for wmi devices. Discovery finishes successfully everytime.

 

Volumes are listed on GUI but not monitored. For snmp i did not need to add related pollers. For wmi, i added polers for cpu and memory by hand and tried to add pollers for volumes as well, but even the api successfully returns there is no pollers for related volumes on DB.

 

Any comment is appreciated.

 

Thanks.

 

Orion Platform 2015.1.3, NPM 11.5.3


What are the right set of master tables while using query over REST API?

$
0
0

Hi,

 

We are trying to pull in data from Solarwinds into external reporting application where we will be bringing other set of monitoring data to have a 360 view dashboard for higher management.

 

We are able to query using REST API but i could not figure out the right set of tables to start pulling out all details...

Ideally we want to pull all targets monitored in Solarwinds and grab details around each target like cpu usage, temp%, memory, disk, etc. to construct our 360 view dashboard.

 

So i was thinking there is a master or set of master tables which will act as the starting point to query a target and then child or related tables for each target to store additional attributes.

 

Please excuse me if my questions sound silly, as i am working with Solarwinds only from the API development perspective and not well versed with Soloarwinds Application per se.

 

Thanks.

Is it Possible?

$
0
0

First of all, I am no programmer and do not pretend to be one.

 

Management is wanting my team to build "application" views.  It was proposed to use our CMDB feed to populate the custom properties with the application name.

 

So, my question is.  Is this something that is possible using SWIS?  What I'm thinking is, have it do an initial population and a daily update to look for any changes.

 

Before I go down the route of finding someone to build the integration, has anyone tried this or something similar?  If successfully building the integration, any tips / suggestions?

SDK - NTA 4.0 relative time query format

$
0
0

I am trying to figure out how to query against any Orion.Netflow.Flows for last x days. The wiki on github does have a page for the 4.0 entity model but only lists how to do absolute time periods. There is an old thread that lists the 3.8 way to do it but I'm trying to do this in 4.0+.

 

Thanks.

SWIS Self-Signed Certificate

$
0
0

Hello,

I am attempting to interact with Orion's API and I am having trouble because of the self-signed certificate. The system I attempting to perform a POST from cannot take cURL options, so the POST operation fails due to an invalid CA. I did some searching and I found this post, but it's from 5 years ago, so I was wondering if it's still a valid solution for using an actual certificate for the SWIS API:

 

Orion SDK & Java

 

If someone from SW could please verify that this is still valid, I would very much appreciate it. I have been pulling my hair out all day trying to find a way around this self-signed certificate issue and I'd like to get it resolved.

Query nodes based on custom property

$
0
0

Hello,

 

Is there any way to query the Orion nodes with all the custom properties?

 

Thanks.

CluM09

REST HTTP Post SWIS Invoke Orion.NodesCustomProperties/ModifyCustomProperty Syntax

$
0
0

Hello Thwack Community,

 

Trying to create automation to keep our custom properties in sync across multiple instances of Orion.

I am attempting to do so using a HTTP Post to utilize REST with INVOKE function - Getting 500 Error which is likely related to the syntax of my JSON array/post data being incorrect.

Can someone please advise how to properly set the json array for the "Values" verbargument? I've been able to do this successfully in Powershell, but the same format doesn't work..

 

tdanner - I tried to use the same formatting using the json array you referenced in a previous post - but I know I'm missing something (big or small).

Thanks for the help again btw, I was able to work several other verbs into my automation(like auto-alert acknowledgement with ticket update in alert notes) due to your assistance.

 

URL:

 

https://localhost:17778/SolarWinds/InformationService/v3/Json/Invoke/Orion.NodesCustomProperties/ModifyCustomProperty

 

POST DATA:

 

[

    "Site_Code",

    "3 character site code identifier",

    4000,

    [

    {"value" =  "Site_Code_Value_1"},

    {"value" =  "Site_Code_Value_2"},

    {"value" =  "Site_Code_Value_3"},

    {"value" =  "Site_Code_Value_4"},

    {"value" =  "Site_Code_Value_5"}

    ]

]

 

I've also tried:

 

[

    "Site_Code",

    "3 character site code identifier",

    4000,

  [

    {"values[0]" =  "Site_Code_Value_1"},

    {"values[1]" =  "Site_Code_Value_2"},

    {"values[2]" =  "Site_Code_Value_3"},

    {"values[3]" =  "Site_Code_Value_4"},

    {"values[4]" =  "Site_Code_Value_5"}

   ]

]

 

 

Thank you,

 

=SWQL

What are the right set of master tables while using query over REST API?

$
0
0

Hi,

 

We are trying to pull in data from Solarwinds into external reporting application where we will be bringing other set of monitoring data to have a 360 view dashboard for higher management.

 

We are able to query using REST API but i could not figure out the right set of tables to start pulling out all details...

Ideally we want to pull all targets monitored in Solarwinds and grab details around each target like cpu usage, temp%, memory, disk, etc. to construct our 360 view dashboard.

 

So i was thinking there is a master or set of master tables which will act as the starting point to query a target and then child or related tables for each target to store additional attributes.

 

Please excuse me if my questions sound silly, as i am working with Solarwinds only from the API development perspective and not well versed with Soloarwinds Application per se.

 

Thanks.


WMI Discovery Volumes Problem

$
0
0

Hi folks,

 

I am implementing an integration with our CMDB. Trying to discover new server nodes added on CMDB. Nightly the my perl script is connecting to CMDB and Solarwinds DB, finding differences, if needed updates some custom properties or discovers new nodes.

 

Everything is going as it was planned with snmp devices (AIX and Linux ones). However i wanted to extend the script for wmi devices. Discovery finishes successfully everytime.

 

Volumes are listed on GUI but not monitored. For snmp i did not need to add related pollers. For wmi, i added polers for cpu and memory by hand and tried to add pollers for volumes as well, but even the api successfully returns there is no pollers for related volumes on DB.

 

Any comment is appreciated.

 

Thanks.

 

Orion Platform 2015.1.3, NPM 11.5.3

SDK - NTA 4.0 relative time query format

$
0
0

I am trying to figure out how to query against any Orion.Netflow.Flows for last x days. The wiki on github does have a page for the 4.0 entity model but only lists how to do absolute time periods. There is an old thread that lists the 3.8 way to do it but I'm trying to do this in 4.0+.

 

Thanks.

SWQL Timeout issue

$
0
0

Hi,

 

We have an NTA report based on processing the amount of traffic transferred in a period of time (1 calendar month) and as this is a very large data set, we often hit timeout issues where the query exceeds the 2 minute timeout value.

 

Is there a configuration setting that allows this timeout to be adjusted, as I do not feel we are able to optimise the query any more, as we need Interface name filters and a SUM on a sub query.

 

Capture.PNG

 

The NTA flow storage server is pretty powerful with lots of RAM and Raided SSD storage.

Odd Query behavoir - long execution and tempdb fills

$
0
0

Posted in General DB but got no responses so I will try here.

 

The query is basically pulling all of our custom poller stats for customer reporting requirements.

 

 

Here is the query:

 

 

SELECT DATEADD (hour, DATEDIFF (hour, 0, CustomPollerStatistics.DateTime), 0)

          AS DateTime,

       MIN (CustomPollerStatistics.MinRate) AS MinRate,

       AVG (CustomPollerStatistics.AvgRate) AS AvgRate,

       MAX (CustomPollerStatistics.MaxRate) AS MaxRate,

       SUM (CustomPollerStatistics.Total) AS Total,

       MIN (CustomPollerStatistics.RawStatus) as RawStatus,

       MIN (CustomPollerStatistics.Status) as Status,

 

CustomPollerAssignment.NodeID,

CustomPollerAssignment.InterfaceID,

       CustomPollers.UniqueName,

       CustomPollers.Description

  FROM (SolarWindsOrion.dbo.CustomPollerAssignment CustomPollerAssignment

        INNER JOIN SolarWindsOrion.dbo.CustomPollers CustomPollers

           ON (CustomPollerAssignment.CustomPollerID =

CustomPollers.CustomPollerID))

       INNER JOIN SolarWindsOrion.dbo.CustomPollerStatistics CustomPollerStatistics

          ON (CustomPollerStatistics.CustomPollerAssignmentID =

CustomPollerAssignment.CustomPollerAssignmentID)

WHERE     (DATEADD (hour,

DATEDIFF (hour, 0, CustomPollerStatistics.DateTime),

0) >= GETDATE () - 30)

       AND CustomPollers.UniqueName IN

('gprsAttached',

'gprsNetworkTechnology',

'gprsRegistered',

'gprsSignalStrength')

GROUP BY CustomPollerAssignment.NodeID,

         CustomPollerAssignment.InterfaceID,

CustomPollers.UniqueName,

CustomPollers.Description,

         DATEADD (hour,

DATEDIFF (hour, 0, CustomPollerStatistics.DateTime),

0)

Add pollers and interfaces via SDK

$
0
0

Howdy,

 

  When we add a node manually via the Orion GUI, setting the interfaces and pollers are steps in the process.

I have been able to script adding nodes, but must then go in to set the poller and interfaces via the GUI.

 

Can someone let me know what to send in order to add these two configurations after adding a new node?

 

 

Please advise,

Kev!

Viewing all 3719 articles
Browse latest View live


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