Quantcast
Channel: THWACK: All Content - Orion SDK
Viewing all 2677 articles
Browse latest View live

Python SDK - Unmanage/Remanage a node

$
0
0

Hi everyone,

 

We have a process for deploying code to web servers.  When we put the web server into 'maintenance' mode to do the code deploy, we'd also like to unmanage the node in SolarWinds as well.  I'm not sure if I've run into a bug or if I'm simply doing something wrong.  Anyway I hope some of the great folks on the formus can see what's going on.

 

I'm using v1.10 of the SDK and Python 2.7.something

 

As you'll see in the end, the error I'm getting is, "TypeError: unbound method _json_serial() must be called with SwisClient instance as first argument (got datetime instance instead)".

 

 

Here's the very basic script, it's mainly from the SwisClient.py example

import requests

import json

from getpass import getpass

from datetime import datetime, timedelta

import SwisClient

 

npm_server = "myOrionServer.local"

username = raw_input("Username: ")

password = getpass("Password: ")

swis = SwisClient(npm_server,username,password)

node = 'myNode.local'

results = swis.query("SELECT NodeID from Orion.Nodes WHERE NodeName='" + node + "'")

interfaceId = results["results"][0]["NodeID"]

netObjectId = "N:{}".format(interfaceId)

now = datetime.utcnow()

tomorrow = now + timedelta(days=1)

swis.invoke("Orion.Nodes", "Unmanage", netObjectId, now, tomorrow, False)

 

Here's the obvsucated values for results, interfaceId, netObjectId, now, tomorrow:

 

In [261]: results

Out[261]: {u'results': [{u'NodeID': 4526}]}

 

In [262]: interfaceId

Out[262]: 4526

 

In [263]: netObjectId

Out[263]: 'N:4526'

 

In [265]: now

Out[265]: datetime.datetime(2015, 6, 10, 20, 34, 46, 345759)

 

In [266]: tomorrow

Out[266]: datetime.datetime(2015, 6, 11, 20, 34, 46, 345759)

 

-=-=-=-=-=-  So everything looks good so far -=-=-=-=-=-

 

Here's where I get an error

In [267]: swis.invoke("Orion.Nodes", "Unmanage", netObjectId, now, tomorrow, False)

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

TypeError                                 Traceback (most recent call last)

<ipython-input-267-70d4084b09c9> in <module>()

----> 1 swis.invoke("Orion.Nodes", "Unmanage", netObjectId, now, tomorrow, False)

 

<ipython-input-5-0266593e63b0> in invoke(self, entity, verb, *args)

      8

      9     def invoke(self, entity, verb, *args):

---> 10         return self._req("POST", "Invoke/%s/%s" % (entity, verb), args).json()

     11

     12     def create(self, entity, **properties):

 

<ipython-input-5-0266593e63b0> in _req(self, method, frag, data)

     31     def _req(self, method, frag, data=None):

     32         return requests.request(method, self.url + frag,

---> 33             data=json.dumps(data, default=SwisClient._json_serial),

     34             verify=False,

     35             auth=self.credentials,

 

/usr/lib/python2.7/json/__init__.pyc in dumps(obj, skipkeys, ensure_ascii, check_circular, allow_nan, cls, indent, separators, encoding, default, sort_keys, **kw)

    248         check_circular=check_circular, allow_nan=allow_nan, indent=indent,

    249         separators=separators, encoding=encoding, default=default,

--> 250         sort_keys=sort_keys, **kw).encode(obj)

    251

    252

 

/usr/lib/python2.7/json/encoder.pyc in encode(self, o)

    205         # exceptions aren't as detailed.  The list call should be roughly

    206         # equivalent to the PySequence_Fast that ''.join() would do.

--> 207         chunks = self.iterencode(o, _one_shot=True)

    208         if not isinstance(chunks, (list, tuple)):

    209             chunks = list(chunks)

 

/usr/lib/python2.7/json/encoder.pyc in iterencode(self, o, _one_shot)

    268                 self.key_separator, self.item_separator, self.sort_keys,

    269                 self.skipkeys, _one_shot)

--> 270         return _iterencode(o, 0)

    271

    272 def _make_iterencode(markers, _default, _encoder, _indent, _floatstr,

 

TypeError: unbound method _json_serial() must be called with SwisClient instance as first argument (got datetime instance instead)

 

 

 

Sooooo, I'm not awesome at Python, but it seems like I maybe should have the Node's Uri in there somewhere?  I don't know, this is my first time writing for SolarWinds in Python, I'd much prefer to use PowerShell, but the 'calling server' is Linux. 

 

 

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

On a side note, a dictionary containing a list of dictionaries.. that's just plain evil.. I still can't wrap my head around the 'pythonic' way to get at the key, values pairs for the dictionary contained in the list.

 

 

 

 

Thanks,

Jim


Can you add nodes to NPM using Python or another language?

$
0
0

I'm automating provisioning/configuring Linux boxes using Ansible. I just finished automating the SNMP install/config, and I'd like to add steps that would add the linux server as a node to Solarwindws. Is this possbile? Or is SWIS only for queries?

Unsupported operand type(s) for +: 'dict' and 'str'

$
0
0

I am currently testing the capability of OrionSDK. Now, I got an issue updating a custom property to number of nodes..

 

 

import requests

from orionsdk import SwisClient



defmain():

  npm_server = '<ipaddress>'

  username = 'admin'

  password = '********'


  swis = SwisClient(npm_server, username, password)

   print("Custom Property Update Test:")

 

  results = swis.query("SELECT N.Uri FROM Orion.Nodes N INNER JOIN Orion.NodesCustomProperties AS I ON N.NodeID = I.NodeID WHERE I.Department=@department", department='IT'# set valid NodeID!

   #print(results)

 

   for key in (results['results']):

   print("{Uri}".format(**key))

   #uri = "[{Uri}]"

  swis.update(key + '/CustomProperties', Department='Accounting')

  obj = swis.read(key + '/CustomProperties')

   print(obj.format(**key))

 

requests.packages.urllib3.disable_warnings()



if__name__ == '__main__':

  main()

 

 

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

Hoping to receive feedback

How would I get the alert configurations and thresholds via the python API?

$
0
0

I have been reading the schema (http://solarwinds.github.io/OrionSDK/schema) and have found AlertDefinitions, AlertConfigurations, and AlertConfigurationsCustomProperties schemas.  I am able to find names and descriptions reliably, but I have not been able to find where the actual threshold for a CPU alert (for example).  Is that possible to get via the API?

python/sql variables

$
0
0

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.

Information on SDK- new to this one...

$
0
0

Hi All, Very new to this SDK part. Would like to know if this API's available, are only with respect to NPM? Or it applied to all plugins?

And any kind of docs available?

 

We are getting some requirements to integrate to other tools like Operations Manager etc.. so need to understand what Solarwinds can offer..

error when powershell connect to Orion

$
0
0

Hi! I need use Orion SDK to do an automatization in powershell. I already installed orion SDK and PowerOrion in powershell but when I run my script to connect with Orion fail.

 

the error is:

Connect-Swis : El término 'Connect-Swis' no se reconoce como nombre de un cmdlet, función, archivo de script o programa ejecutable.  Compruebe si escribió correctamente el nombre o, si incluyó una ruta de acceso, compruebe que dicha ruta es correcta e inténtelo de  nuevo. En C:\Users\carballe\Desktop\Orion SDK\script\AgregaNodoCajero_v1.ps1: 14 Carácter: 9 + $swis = Connect-Swis -host $hostname -cred $creds +         ~~~~~~~~~~~~     + CategoryInfo          : ObjectNotFound: (Connect-Swis:String) [], CommandNotFoundException     + FullyQualifiedErrorId : CommandNotFoundException   Get-SwisData : El término 'Get-SwisData' no se reconoce como nombre de un cmdlet, función, archivo de script o programa ejecutable.  Compruebe si escribió correctamente el nombre o, si incluyó una ruta de acceso, compruebe que dicha ruta es correcta e inténtelo de  nuevo. En C:\Users\carballe\Desktop\Orion SDK\script\AgregaNodoCajero_v1.ps1: 18 Carácter: 11 + $nodeIp = Get-SwisData $swis "SELECT IP_address FROM nodesdata" +           ~~~~~~~~~~~~     + CategoryInfo          : ObjectNotFound: (Get-SwisData:String) [], CommandNotFoundException     + FullyQualifiedErrorId : CommandNotFoundException

Add node with an existing poller python sdk

$
0
0

Buenos días, estoy realizando un script con el sdk de orion para python para agregar nodos en Orion. Los nodos utilizan 2 pollers que ya existen. Mi duda es, como hago para especificar en el script que se debe usar un poller ya existente en lugar de crear uno nuevo.

 

Gracias


How add a new orion node and setting it into existing polling engine

$
0
0

Hi! i'm automating the process to add new nodes into orion with python SDK. My problem is that i don't know how setting the new node into an existing polling engine. In my work they have two polling engines and they seting new nodes them.

SWQL Functions Feeback... Enhancments?

$
0
0

Having worked with the SDK (namely SWQL) nearly since its release to the public I have say that I find the SDK/API feature rich, extraordinarily reliable and key path to a Solarwinds installation that meets the unique needs of each environment I've worked with it.

 

However, there are a few things I would like to mention that I feel are unfortunate oversights or omissions from the SWQL language.

 

  1. SWQL has no CHARINDEX() type function.
    1. This is a frustrating short coming of the query language. Unless I want an extraordinarily large list of custom properties, one for each value pair, there is no way to parse a custom property value based on a know string.
      Also, let's be honest with ourselves, the array functions require manual delimination and string entry... unless someone knows something I don't... which is completely possible.
  2. CONCAT() can not be used in the 2nd argument of SUBSTRING() (more specifically a varchar(max))
    1. This is almost as frustrating as #1 and some days even more so. If it was possible to use CONCAT() in the 2nd argument it would alleviate some of the frustration and lack of functionality created by the complete absence of a CHARINDEX() type function.
  3. SWQL has no REPLACE() type function.
    1. This is another frustrating handicap of the SWQL language. REPLACE() is another mainstay in the string manipulation family of functions that is sadly absent from the SWQL function library.

 

I can live without the ability to use the local variables, temporary tables, the inability to CAST() a datetime and the advanced string by type parsing that SQL offers. These 3 issues have me, more often then not, using SQL queries rather than SWQL queries. It's unfortunate as I prefer to use the native query language when ever possible.

 

My hats off to the developers and maintainers of the SDK. It's a heck of thing you've got there.

SWIS REST/JSON API

$
0
0

Starting with NPM 10.4, SWIS now supports a REST/JSON API in addition to the existing SOAP API. The operations supported by each API are identical: the six basic operations of Query, Invoke, Create, Read, Update, and Delete; and the data you can access through each API is the same. The difference is that the REST/JSON API avoids the complexities of XML and SOAP, though it gives up the ability to have a client wrapper generated from WSDL.

 

Both APIs will be supported by the product indefinitely - the SOAP API is not deprecated or replaced by the REST API.

 

Request and Response Formats

Query

Request

GET https://localhost:17778/SolarWinds/InformationService/v3/Json/Query?query=SELECT+Uri+FROM+Orion.Pollers+ORDER+BY+PollerID+WITH+ROWS+1+TO+3+WITH+TOTALROWS HTTP/1.1
Authorization: Basic YWRtaW46
User-Agent: curl/7.20.0 (i386-pc-win32) libcurl/7.20.0 OpenSSL/0.9.8l zlib/1.2.3
Host: localhost:17778
Accept: */*

Response

HTTP/1.1 200 OK
Content-Length: 244
Content-Type: application/json
Server: Microsoft-HTTPAPI/2.0
Date: Fri, 27 Jul 2012 19:38:52 GMT
{"totalRows":13,"results":[{"Uri":"swis://tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=4"},{"Uri":"swis://tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=6"},{"Uri":"swis://tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=7"}]}

 

Body reformatted for easier reading
{

 

    "totalRows": 13,

    "results": [

        { "Uri": "swis://tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=4"},

        { "Uri": "swis://tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=6"},

        { "Uri": "swis://tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=7"}

    ]

}

Query with Parameters

Request

POST https://localhost:17778/SolarWinds/InformationService/v3/Json/Query HTTP/1.1
Authorization: Basic YWRtaW46
User-Agent: curl/7.20.0 (i386-pc-win32) libcurl/7.20.0 OpenSSL/0.9.8l zlib/1.2.3
Host: localhost:17778
Accept: */*
Content-Type: application/json
Content-Length: 130
{"query":"SELECT Uri FROM Orion.Pollers WHERE PollerID=@p ORDER BY PollerID WITH ROWS 1 TO 3 WITH TOTALROWS","parameters":{"p":9}}

 

Response

HTTP/1.1 200 OK
Content-Length: 99
Content-Type: application/json
Server: Microsoft-HTTPAPI/2.0
Date: Tue, 07 Aug 2012 17:36:27 GMT
{"totalRows":1,"results":[{"Uri":"swis://tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=9"}]}

Invoke

Request

POST https://localhost:17778/SolarWinds/InformationService/v3/Json/Invoke/Metadata.Entity/GetAliases HTTP/1.1
Authorization: Basic YWRtaW46
User-Agent: curl/7.20.0 (i386-pc-win32) libcurl/7.20.0 OpenSSL/0.9.8l zlib/1.2.3
Host: localhost:17778
Accept: */*
Content-Type: application/json
Content-Length: 39
["SELECT B.Caption FROM Orion.Nodes B"]

Response

HTTP/1.1 200 OK
Content-Length: 19
Content-Type: application/json
Server: Microsoft-HTTPAPI/2.0
Date: Fri, 27 Jul 2012 19:23:27 GMT
{"B":"Orion.Nodes"}

The Metadata.GetAliases verb takes one string argument and returns a PropertyBag.

Create

Request

POST https://localhost:17778/SolarWinds/InformationService/v3/Json/Create/Orion.Pollers HTTP/1.1
Authorization: Basic YWRtaW46
User-Agent: curl/7.20.0 (i386-pc-win32) libcurl/7.20.0 OpenSSL/0.9.8l zlib/1.2.3
Host: localhost:17778
Accept: */*
Content-Type: application/json
Content-Length: 92
{"PollerType":"hi from curl 2", "NetObject":"N:123", "NetObjectType":"N", "NetObjectID":123}

Response

HTTP/1.1 200 OK
Content-Length: 69
Content-Type: application/json; charset=utf-8
Server: Microsoft-HTTPAPI/2.0
Date: Fri, 27 Jul 2012 19:27:11 GMT
"swis:\/\/tdanner-dev.swdev.local\/Orion\/Orion.Pollers\/PollerID=19"

Read

Request

GET https://localhost:17778/SolarWinds/InformationService/v3/Json/swis://tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=6 HTTP/1.1
Authorization: Basic YWRtaW46
User-Agent: curl/7.20.0 (i386-pc-win32) libcurl/7.20.0 OpenSSL/0.9.8l zlib/1.2.3
Host: localhost:17778
Accept: */*

Response

HTTP/1.1 200 OK
Content-Length: 245
Content-Type: application/json
Server: Microsoft-HTTPAPI/2.0
Date: Fri, 27 Jul 2012 19:30:02 GMT
{"PollerID":6,"PollerType":"V.Details.SNMP.Generic","NetObject":"V:1","NetObjectType":"V","NetObjectID":1,"DisplayName":null,"Description":null,"InstanceType":"Orion.Pollers","Uri":"swis://tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=6"}

Update

Request

POST https://localhost:17778/SolarWinds/InformationService/v3/Json/swis://tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=6 HTTP/1.1
Authorization: Basic YWRtaW46
User-Agent: curl/7.20.0 (i386-pc-win32) libcurl/7.20.0 OpenSSL/0.9.8l zlib/1.2.3
Host: localhost:17778
Accept: */*
Content-Type: application/json
Content-Length: 29
{"PollerType":"hi from curl"}

Response

HTTP/1.1 200 OK
Content-Length: 0
Server: Microsoft-HTTPAPI/2.0
Date: Fri, 27 Jul 2012 19:32:06 GMT

Delete

Request

DELETE https://localhost:17778/SolarWinds/InformationService/v3/Json/swis://tdanner-dev.swdev.local/Orion/Orion.Pollers/PollerID=16 HTTP/1.1
Authorization: Basic YWRtaW46
User-Agent: curl/7.20.0 (i386-pc-win32) libcurl/7.20.0 OpenSSL/0.9.8l zlib/1.2.3
Host: localhost:17778
Accept: */*

Response

HTTP/1.1 200 OK
Content-Length: 0
Server: Microsoft-HTTPAPI/2.0
Date: Fri, 27 Jul 2012 19:37:33 GMT

Trigger NCM configuration download from SDK

$
0
0

Is there any way with the SDK to start a configuration download?

 

For some reason my nightly backup of configs runs into some issues, but when I manually download from node details, it always works fine.

 

So, I take my email report, put it in a text box in vb, parse it and get the few that had errors.  Would like to be able to take that and click 'try again on all' kind of thing.

IPAM API Bug?

$
0
0

When adding IPAddresses to a subnet by using the followind inside a loop :

 

$IPProperties = @{

    SubnetId=$SubnetId;

    IPAddress=$Current_ip   

  }

New-SwisObject $IPAMswis -EntityType "IPAM.IPNode" -Properties $IPProperties

 

you only see the first page of IP addresses populated in the GUI. However if you query the DB they are all there.

The reason behind this is that the column IPOrdinal in the IPAM_GroupNodetable does not get automatically populated and is left out as NULL. The fix that I found was manually inserting values (0 - [IP_Count]) into the table via SQL (the field is not editable via the API).

 

Anyone else encounter this bug?

SwisPowerShell module released

$
0
0

You can now use a PowerShell module to access Orion and SWIS. To install it from the PowerShell Gallery, run this command:

 

Install-Module SwisPowerShell

 

To load it into the current PowerShell session, run this command:

 

Import-Module SwisPowerShell

 

Documentation for this module is provided on GitHub: https://github.com/solarwinds/OrionSDK/wiki/PowerShell

 

This module provides the same cmdlets as the old PowerShell snapin, SwisSnapin. Existing scripts will work with the module with no changes other than replacing "Add-PSSnapin SwisSnapin" with "Import-Module SwisPowerShell". The OrionSDK.msi installer still provides SwisSnapin for compatibility.

Check the status of an IP address using Powershell API

$
0
0

Hello everyone,

 

I'd like to check if an IP is in use using the 'swissnapin', and I can't find a command to do it. Could someone please point me in the right direction?

 

Something like:

 

Invoke-SwisVerb $swis IPAM.SubnetManagement GetIPStatus  @('192.168.1.1')

 

and then have it return 'available', 'used', 'reserved'.

 

The above does not work. It's an example of what I'd like to do.


Solarwinds Database Manager - Trying to find email addresses alerts are sent to

$
0
0

We are moving our Solarwinds Orion and SQL servers to more robust servers to handle them and need to figure out who is receiving email alerts out of Solarwinds.  If I run the query for Alert Configurations it will list all of the alerts enabled or not - is there someway to only have this report the enabled alerts so I can let end users know that Solarwinds will be down?  Thanks!

Python API add node?

$
0
0

Is it possible to add a node using the python api? I have been trying and have been unsuccessful. Here are the requests I've tried to perform:

 

Using API:

r = swis.create(Orion.Nodes, {"IPAddress = " + ip + "; EngineID = 1; ObjectSubType = " + objsubtype+ "; Caption = " + caption + ";"})

 

Using requests:

r = requests.request("POST", "https://solarwinds:17778/SolarWinds/InformationService/v3/Json/Create/Orion.Nodes", data=json.dumps("Orion.Nodes", {"IPAddress = " + ip + "; EngineID = 1; ObjectSubType = " + objsubtype+ "; Caption = " + caption + ";"}), verify=False, auth=(username, password), headers={'Content-Type': 'application/json'})

 

Unfortunately, all I have been able to get is a 500 response.Can anybody help?

REST API - Network Sonar Discovery Gets Created, but fails to complete

$
0
0

Hello Orion SDK Community,

 

I have automation in place that is working to create discoveries, run the discovery, and complete the import - I have this working fine in multiple instances of solarwinds.

However in one specific instance (which is on the same version of NPM and all other modules) I'm getting a few random errors. Any help would be greatly appreciated.

 

One set of weird errors:

2017-08-22 15:58:54,105 [85] ERROR SolarWinds.Orion.Core.SharedCredentials.CredentialDAL - (null) (null)     Unable to find credential with ID = 3, owner =  and credentialType = SolarWinds.Orion.Core.SharedCredentials.Credentials.UsernamePasswordCredential

2017-08-22 15:59:35,215 [17] ERROR SolarWinds.InformationService.Core.InformationService - (null) (null)     Exception for Operation: <root type="array">

  <item type="number">18</item>

</root>

 

I should note that CredentialID 3 is type: SolarWinds.Orion.Core.Models.Credentials.SnmpCredentialsV2 NOT SolarWinds.Orion.Core.SharedCredentials.Credentials.UsernamePasswordCredential,

so I'm wondering why it is being interpreted as a different type.

 

Here is the statusdescription as reported by Orion.DiscoveryProfiles - I'm not suer why it is referencing "DeviceStudioDiscoveryPluginJobDescription" when I only am using the Core, Interface, and VIM Plugins....

 

Network Discovery job has failed to complete.\r\nState: Failed\r\nProfile id: 28.\r\nThe Job Scheduler is reporting the following error:\r\nSolarWinds.JobEngine.WorkerProcess.JobExecutionException: System.Exception: Unable to deserialize job description. ---> System.Runtime.Serialization.SerializationException: Error in line 0 position 0. Element 'http://schemas.datacontract.org/2004/07/SolarWinds.Orion.Core.Models.Discovery:DiscoveryPluginJobDescriptionBase' contains data from a type that maps to the name 'http://schemas.solarwinds.com/2008/DeviceStudio:DeviceStudioDiscoveryPluginJobDescription'. The deserializer has no knowledge of any type that maps to this name. Consider using a DataContractResolver if you are using DataContractSerializer or add the type corresponding to 'DeviceStudioDiscoveryPluginJobDescription' to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding it to the list of known types passed to the serializer.

   at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator reader, String name, String ns, Type declaredType, DataContract& dataContract)

   at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator xmlReader, Int32 id, RuntimeTypeHandle declaredTypeHandle, String name, String ns)

   at ReadArrayOfDiscoveryPluginJobDescriptionBaseFromXml(XmlReaderDelegator , XmlObjectSerializerReadContext , XmlDictionaryString , XmlDictionaryString , CollectionDataContract )

   at System.Runtime.Serialization.CollectionDataContract.ReadXmlValue(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context)

   at System.Runtime.Serialization.XmlObjectSerializerReadContext.ReadDataContractValue(DataContract dataContract, XmlReaderDelegator reader)

   at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator reader, String name, String ns, Type declaredType, DataContract& dataContract)

   at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator xmlReader, Int32 id, RuntimeTypeHandle declaredTypeHandle, String name, String ns)

   at ReadDiscoveryJobDescriptionFromXml(XmlReaderDelegator , XmlObjectSerializerReadContext , XmlDictionaryString[] , XmlDictionaryString[] )

   at System.Runtime.Serialization.ClassDataContract.ReadXmlValue(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context)

   at System.Runtime.Serialization.XmlObjectSerializerReadContext.ReadDataContractValue(DataContract dataContract, XmlReaderDelegator reader)

   at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator reader, String name, String ns, Type declaredType, DataContract& dataContract)

   at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator xmlReader, Type declaredType, DataContract dataContract, String name, String ns)

   at System.Runtime.Serialization.DataContractSerializer.InternalReadObject(XmlReaderDelegator xmlReader, Boolean verifyObjectName, DataContractResolver dataContractResolver)

   at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver)

   at System.Runtime.Serialization.DataContractSerializer.ReadObject(XmlReader reader, Boolean verifyObjectName)

   at SolarWinds.Orion.Common.SerializationHelper.FromXmlReader[T](XmlReader reader, Boolean verifyObjectName, IEnumerable`1 knownTypes)

   at SolarWinds.Orion.Common.SerializationHelper.FromXmlReader[T](XmlReader reader, IEnumerable`1 knownTypes)

   at SolarWinds.Orion.Discovery.Job.OrionDiscoveryJob.GetDiscoveryJobContext(String jobDetailConfiguration, IDiscoveryPluginFactory pluginFactory, List`1& plugins)

   --- End of inner exception stack trace ---

   at SolarWinds.Orion.Discovery.Job.OrionDiscoveryJob.GetDiscoveryJobContext(String jobDetailConfiguration, IDiscoveryPluginFactory pluginFactory, List`1& plugins)

   at SolarWinds.Orion.Discovery.Job.OrionDiscoveryJob.ConfigureJobContext()

   at SolarWinds.Orion.Discovery.Job.OrionDiscoveryJob.Execute(IJobExecutionHost host)

   at SolarWinds.JobEngine.WorkerProcess.Job2Adapter.Execute(IInternalJobExecutionHost host)

   at SolarWinds.JobEngine.WorkerProcess.Job2Adapter.Execute(IInternalJobExecutionHost host)

   at SolarWinds.JobEngine.WorkerProcess.JobDecorator.Execute(IInternalJobExecutionHost host)

   at SolarWinds.JobEngine.WorkerProcess.AgentDispatcher.ExecuteJobSynchronously(ActiveJob activeJob)

   at SolarWinds.JobEngine.WorkerProcess.AgentDispatcher.ExecuteJob(ActiveJob activeJob)

   at SolarWinds.JobEngine.WorkerProcess.AgentDispatcher.WorkItemDispatched(Object state)

   at SolarWinds.JobEngine.WorkerProcess.Job2Adapter.Execute(IInternalJobExecutionHost host)

   at SolarWinds.JobEngine.WorkerProcess.JobDecorator.Execute(IInternalJobExecutionHost host)

   at SolarWinds.JobEngine.WorkerProcess.AgentDispatcher.ExecuteJobSynchronously(ActiveJob activeJob)

   at SolarWinds.JobEngine.WorkerProcess.AgentDispatcher.ExecuteJob(ActiveJob activeJob)

   at SolarWinds.JobEngine.WorkerProcess.AgentDispatcher.WorkItemDispatched(Object state)

 

Lastly, here is my discovery context:

[

  "Name": "AutoDiscovery_08222017035855", 

  "EngineID":5, 

  "JobTimeoutSeconds": 3600, 

  "SearchTimeoutMiliseconds": 3000, 

  "SnmpTimeoutMiliseconds": 2000, 

  "SnmpRetries": 1, 

  "RepeatIntervalMiliseconds": 1800, 

  "SnmpPort": 161, 

  "HopCount": 0, 

  "PreferredSnmpVersion": "SNMP2c", 

  "DisableIcmp": "False", 

  "AllowDuplicateNodes": "True", 

  "IsAutoImport": "False", 

  "IsHidden": "False", 

  "PluginConfigurations":

       {"PluginConfigurationItem": "<?xml version=\"1.0\" encoding=\"utf-16\"?><PluginItems><knownTypes><ArrayOfstring xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\"><string>SolarWinds.Orion.Core.Models.Discovery.CoreDiscoveryPluginConfiguration,SolarWinds.Orion.Core.Models</string></ArrayOfstring></knownTypes><pluginItem><ArrayOfDiscoveryPluginConfigurationBase xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.datacontract.org/2004/07/SolarWinds.Orion.Core.Models.Discovery\"><DiscoveryPluginConfigurationBase xmlns:d2p1=\"http://schemas.solarwinds.com/2008/Orion\" i:type=\"d2p1:CoreDiscoveryPluginConfiguration\"><d2p1:ActiveDirectoryList /><d2p1:AddressRange /><d2p1:AgentsAddresses xmlns:d3p1=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\" /><d2p1:AutoImportVolumeTypes xmlns:d3p1=\"http://schemas.datacontract.org/2004/07/SolarWinds.Common.Snmp\" i:nil=\"true\" /><d2p1:BulkList xmlns:d3p1=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\"><d3p1:string>10.75.146.120</d3p1:string><d3p1:string>10.75.146.121</d3p1:string><d3p1:string>10.75.146.122</d3p1:string></d2p1:BulkList><d2p1:Credentials><d2p1:credentials><knownTypes><ArrayOfstring xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\" /></knownTypes><pluginItem><d2p1:ArrayOfCredential xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" /></pluginItem></d2p1:credentials></d2p1:Credentials><d2p1:DiscoverAgentNodes>false</d2p1:DiscoverAgentNodes><d2p1:PreferredPollingMethod>SNMP</d2p1:PreferredPollingMethod><d2p1:SharedCredentials xmlns:d3p1=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\"><d3p1:KeyValueOfintint><d3p1:Key>1</d3p1:Key><d3p1:Value>3</d3p1:Value></d3p1:KeyValueOfintint></d2p1:SharedCredentials><d2p1:SubnetList /><d2p1:WMICredentials /><d2p1:WmiRetries>1</d2p1:WmiRetries><d2p1:WmiRetryInterval>PT1.5S</d2p1:WmiRetryInterval></DiscoveryPluginConfigurationBase></ArrayOfDiscoveryPluginConfigurationBase></pluginItem></PluginItems>"}, 

       {"PluginConfigurationItem": "<?xml version=\"1.0\" encoding=\"utf-16\"?><PluginItems><knownTypes><ArrayOfstring xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\"><string>SolarWinds.Interfaces.Common.Models.Discovery.InterfacesDiscoveryPluginConfiguration,SolarWinds.Interfaces.Common</string></ArrayOfstring></knownTypes><pluginItem><ArrayOfDiscoveryPluginConfigurationBase xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.datacontract.org/2004/07/SolarWinds.Orion.Core.Models.Discovery\"><DiscoveryPluginConfigurationBase xmlns:d2p1=\"http://schemas.solarwinds.com/2008/Interfaces\" i:type=\"d2p1:InterfacesDiscoveryPluginConfiguration\"><d2p1:AutoImportExpressionFilter xmlns:d3p1=\"http://schemas.datacontract.org/2004/07/\" /><d2p1:AutoImportStatus xmlns:d3p1=\"http://schemas.datacontract.org/2004/07/SolarWinds.Interfaces.Common.Enums\"><d3p1:IfAutoImportStatus>Up</d3p1:IfAutoImportStatus></d2p1:AutoImportStatus><d2p1:AutoImportVirtualTypes xmlns:d3p1=\"http://schemas.datacontract.org/2004/07/System\"><d3p1:boolean>false</d3p1:boolean></d2p1:AutoImportVirtualTypes><d2p1:AutoImportVlanPortTypes xmlns:d3p1=\"http://schemas.datacontract.org/2004/07/SolarWinds.Orion.Core.Models.Enums\" /><d2p1:DiscoverVLANs>false</d2p1:DiscoverVLANs></DiscoveryPluginConfigurationBase></ArrayOfDiscoveryPluginConfigurationBase></pluginItem></PluginItems>"},

       {"PluginConfigurationItem": "<?xml version=\"1.0\" encoding=\"utf-16\"?><PluginItems><knownTypes><ArrayOfstring xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\"><string>SolarWinds.VIM.Common.Configuration.VimDiscoveryPluginConfiguration,SolarWinds.VIM.Common</string><string>SolarWinds.VIM.Common.Configuration.HyperVDiscoveryPluginConfiguration,SolarWinds.VIM.Common</string></ArrayOfstring></knownTypes><pluginItem><ArrayOfDiscoveryPluginConfigurationBase xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.datacontract.org/2004/07/SolarWinds.Orion.Core.Models.Discovery\"><DiscoveryPluginConfigurationBase xmlns:d2p1=\"http://schemas.solarwinds.com/2008/Virtualization\" i:type=\"d2p1:VimDiscoveryPluginConfiguration\"><d2p1:IsDiscoveryForVimEnabled>true</d2p1:IsDiscoveryForVimEnabled><d2p1:SelectedVmWareCredentials xmlns:d3p1=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\" /></DiscoveryPluginConfigurationBase><DiscoveryPluginConfigurationBase xmlns:d2p1=\"http://schemas.solarwinds.com/2008/Virtualization\" i:type=\"d2p1:HyperVDiscoveryPluginConfiguration\" /></ArrayOfDiscoveryPluginConfigurationBase></pluginItem></PluginItems>"}

 

}

]

 

Thank you,


=SWQL

 

 

api

$
0
0

We are new to SolarWinds SDK and we’re looking at the API to integrate with a custom help desk ticketing system. 

 

Our question has to do with polling NPM for alerts.  We want near real time alerts without risking “over polling” the API to the point that NPM performance could be degraded.  We’re specifically looking for an event-based alert option, such that when an alert is triggered a process can be launched to push a notification to our ticketing system to auto create tickets?  Our help desk system has its own API that we would like to call rather than having to poll the Orion API or deal with the complications of ingesting and parsing SMTP messages.

 

We can’t find a method for this in the SDK and we want to verify if this is possible.

 

On a related note, we see that Orion can send SNMP traps.  It seems that this is based on events regarding the health and status of Orion modules, and not necessarily based on alerts triggered by systems being monitored by Orion modules.  Is that correct or is it possible to do event-based alerts of monitored systems using SNMP?

 

Again we are new to SolarWinds and we’re building out a platform to monitor over 20K elements so we really want to build the most efficient system possible.

method to call external api or other real time integration?

$
0
0

We are new to SolarWinds SDK and we’re looking at the API to integrate with a custom help desk ticketing system. 

 

Our question has to do with polling NPM for alerts.  We want near real time alerts without risking “over polling” the API to the point that NPM performance could be degraded.  We’re specifically looking for an event-based alert option, such that when an alert is triggered a process can be launched to push a notification to our ticketing system to auto create tickets?  Our help desk system has its own API that we would like to call rather than having to poll the Orion API or deal with the complications of ingesting and parsing SMTP messages.

 

We can’t find a method for this in the SDK and we want to verify if this is possible.

 

On a related note, we see that Orion can send SNMP traps.  It seems that this is based on events regarding the health and status of Orion modules, and not necessarily based on alerts triggered by systems being monitored by Orion modules.  Is that correct or is it possible to do event-based alerts of monitored systems using SNMP?

 

Again we are new to SolarWinds and we’re building out a platform to monitor over 20K elements so we really want to build the most efficient system possible.

Viewing all 2677 articles
Browse latest View live


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