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

Setting NCM Global Connection Profile in script

$
0
0

Hello,

 

I've found that this will set my node properties to "Yes" for "Manage node(s) with NCM":

    Invoke-SwisVerb$swisCirrus.NodesAddNodeToNCM @($NodeId)

 

 

But I'm unable to find a way to set the Global Connection Profile.

 

I assume it's another verb(?), but I can't seem to put it together.

 

I can get the profiles and select the ID for the one I want:

     $ConnectionProfiles=Invoke-SwisVerb$swisCirrus.NodesGetAllConnectionProfiles

     $NCMConnectionProfileId= ($ConnectionProfiles.ConnectionProfile.Name |? {$_.'#text'-eq$NCMProfileName}).Id

 

But I'm not sure how to get that associated with the node from there.

 

TIA

    

 

 


Create/Update operations are not working for Orion.Accounts through SolarWinds Rest API

$
0
0

We are trying to create Accounts in Solar winds system through Rest API URI: https://<HOST>:17778/SolarWinds/InformationService/v3/Json/Create/Orion.Accounts but, we are getting following error message in the API response.

SolarWinds.Data.AccessDeniedException: Operation not supported on Orion.Accounts\u000d\u000a at SolarWinds.InformationService.Core.CrudProcessor.CreateAccessDeniedException(String message)

 

We have provide the admin access to the API login, Can you please let us know if Create/update operations are supported on Orion.Accounts object through Restful API?. If not, Can you please suggest any alternative APIs available in Solarwinds to achieve this reuirement?.

How to Query Netflow Sources via Curl / Json

How to add only UP interfaces using Python/Orion sdk

$
0
0

I can add the nodes and interfaces using the Python script. I used the DiscoverInterfaceOnNode to add the new interfaces and specify the specific interfaces as well. Up to this point everything is good.

 

The issue is it will add that type of interfaces(E.G Gig,eth etc) either that is UP or Down. My goal is to add only UP interfaces. Can someone please put me in a right direction or share any example to help me fix this.

how to use curl to update properties?

$
0
0

i know how to use curl to do a query to retrieve records but how do i then update said records using curl?

 

i've searched the forums and havent found any posts on this.

Orion Default Thresholds Bulk Change?

$
0
0

I'm currently trying to figure out how to update 1000 nodes default threshold via the API.  I found a post regarding changing volume capacity but it says to change the forecastcapacitysetting, I've made the change to the settings I want manually and it is changing the ForecastCapacity table instead.  Does anyone have any suggestions on how to bulk change these settings?

 

I would do this via node management but these nodes all have different polling methods.

 

Thanks for any input

Convert ICMP nodes to SNMP with Network Discovery and (re)Import

$
0
0

We have a bunch of nodes that are currently ICMP nodes. Most of them have been reconfigured to allow SNMP and we want to convert them to SNMP, via Network Discovery. So our discovery would find all the new interfaces and good stuff we need to monitor. It seems this can only work if the polling engine is kept the same. We have multiple polling engines so this would be challenging.

 

Am I correct with the assumption that it will work if the polling engine is kept the same? And is there any way around this? I can discover and auto import via API (this is how we add most new nodes).

 

Thanks in advance!!

SDK verb to unmonitor aws cloud instance?

$
0
0

We have an issue where cloud instances are reverting to an unknown state instead of terminating- looking for a swis verb to call to accomplish the same result as going into the Choose Instances/VM's under cloud setting and choosing do not monitor for some nodes.


Node Resource Discovery Via JSON API

$
0
0

So the configuration seems to be properly set.

 

The community is being properly set and I get a completed discovery profile status but the polling and interface discovery isnt automatically working using the JSON api.

 

It will only work if I manually click in the UI to poll and list resources, then it will find everything.

 

CONFIG DATA

 

[{"Name": "app1.phx1", 

   "EngineID": 1, 

   "JobTimeoutSeconds": 3600, 

   "SearchTimeoutMiliseconds": 2000, 

   "SnmpTimeoutMiliseconds": 2000, 

   "SnmpRetries": 3, 

   "RepeatIntervalMiliseconds": 1500, 

   "SnmpPort": 161, 

   "HopCount": 0, 

   "PreferredSnmpVersion": "SNMP2c", 

   "DisableIcmp": "false", 

   "AllowDuplicateNodes": "false", 

   "IsAutoImport": "true", 

   "IsHidden": "true", 

   "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>IP_HIDDEN</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>2</d2p1:WmiRetries><d2p1:WmiRetryInterval>PT1S</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/' i:nil='true' /><d2p1:AutoImportStatus xmlns:d3p1='http://schemas.datacontract.org/2004/07/SolarWinds.Interfaces.Common.Enums'><d3p1:IfAutoImportStatus>Up</d3p1:IfAutoImportStatus><d3p1:IfAutoImportStatus>Down</d3p1:IfAutoImportStatus><d3p1:IfAutoImportStatus>Shutdown</d3p1:IfAutoImportStatus></d2p1:AutoImportStatus><d2p1:AutoImportVirtualTypes xmlns:d3p1='http://schemas.datacontract.org/2004/07/System'><d3p1:boolean>true</d3p1:boolean><d3p1:boolean>false</d3p1:boolean></d2p1:AutoImportVirtualTypes><d2p1:AutoImportVlanPortTypes xmlns:d3p1='http://schemas.datacontract.org/2004/07/SolarWinds.Orion.Core.Models.Enums'><d3p1:VlanPortType>Trunk</d3p1:VlanPortType><d3p1:VlanPortType>Access</d3p1:VlanPortType><d3p1:VlanPortType>Unknown</d3p1:VlanPortType></d2p1:AutoImportVlanPortTypes><d2p1:DiscoverVLANs>false</d2p1:DiscoverVLANs></DiscoveryPluginConfigurationBase></ArrayOfDiscoveryPluginConfigurationBase></pluginItem></PluginItems>"}    

   ] 

  }]

 

This works fine.

 

This is the details of the Node after creation.

 

NODE DATA

 

Array

(

    [NodeID] => ID_HIDDEN

    [ObjectSubType] => SNMP

    [SNMPVersion] => 2

    [Community] => publ1c15

    [IP] => IP_HIDDEN

    [IPAddressType] => IPv4

    [Caption] => UT_app1.phx1_11-14_07:42

    [NodeDescription] => app1.phx1

    [Description] =>

    [Status] => 1

    [SystemUpTime] =>

    [PercentMemoryAvailable] =>

    [MemoryAvailable] =>

    [MemoryUsed] => -2

    [TotalMemory] =>

    [CPULoad] => -2

    [EngineID] => 1

    [UnManaged] =>

    [UnManageFrom] => 1899-12-30T00:00:00.0000000Z

    [UnManageUntil] => 1899-12-30T00:00:00.0000000Z

    [Uri] => swis://NJ-SWINDS-VM03.vonage.net/Orion/Orion.Nodes/NodeID=ID_HIDDEN

    [Division] => PremierWest

    [Delimiter] => |

    [VIP] => No

    [SystemsGrouping] => SystemsGrouping

    [NetcoolNotify] => Yes

    [SmartWan] => Yes

    [CustomerName] => TELE : PHX1

    [CustomerID] => 30848

)

 

It just simply wont poll and detect resources automatically only manually. Can you let me know what I need to do.

 

It wont detect the machine type, memory, all those things automatically.

 

Thank you.

Can't query Status from Orion.F5.VirtualServers

$
0
0

I'm trying to get an F5 virtualserver status through API. NPM 12.1

 

Here is the query I'm passing

GET /SolarWinds/InformationService/v3/Json/Query?query=SELECT+NodeID+,+Name+,+EnabledState+,+Description+,+Status+,+DisplayName+FROM+orion.f5.virtualservers+where+name+like+'%257001' HTTP/1.1

 

Here's the error

{"Message":"Cannot resolve property Status","ExceptionType":"SolarWinds.Data.Query.ParserException","FullException":"SolarWinds.Data.Query.ParserException: Cannot resolve property Status\u000d\u000a   at SolarWinds.Data.Query.Processor.SemanticChecker.HandleNonQualifiedPropertyName(EntityExpression entityExpression)\u000d\u000a   at SolarWinds.Data.Query.Swql.ParseTreeDuplicator.Visit(ColumnExpression column)\u000d\u000a   at SolarWinds.Data.Query.Processor.SemanticChecker.Visit(ColumnExpression column)\u000d\u000a   at SolarWinds.Data.Query.Swql.ParseTreeDuplicatorNoState.Visit(SelectClause select)\u000d\u000a   at SolarWinds.Data.Query.Processor.SemanticChecker.Visit(SelectStatement statement)\u000d\u000a   at SolarWinds.Data.Query.Processor.SemanticChecker.Process(SelectStatement statement, PreProcessorState state, String replaceStatementTagWith)\u000d\u000a   at SolarWinds.Data.Query.Processor.SemanticChecker.Process(SelectStatement statement, PreProcessorState state)\u000d\u000a   at SolarWinds.Data.Quer* Connection #0 to host [blank] left intact

* Closing connection #0

y.Processor.PreProcessor.Process(SelectStatement selectStatement, PreProcessorState& preProcessorState)\u000d\u000a   at SolarWinds.Data.Query.Engine.QueryProcessor.ProcessInternal(String query, IQueryExecutionContext context)\u000d\u000a   at SolarWinds.InformationService.Core.QueryPlanCache.GetQueryPlan(String query, String username, Boolean federationEnabled, Func`1 buildQueryPlan)\u000d\u000a   at SolarWinds.InformationService.Core.InformationService.RunQuery(String query, IDictionary`2 parameters, IDataSerializer serializer)"}

 

If I take out Status, I get the good query result.

It seems like the schema doesn't match from SolarWinds Information Service v3.0 Schema Documentation Index

The Orion.F5.Pools table throws an error at me and I can't query anything from it. The Orion.F5.VirtualServers has partial, as well as Orion.F5.Device

 

I don't have access to the database directly to analyze.

403 with rest api call

$
0
0

I;ve seen a few other people with this issue, and some where resolved, but nowhere is a solution to be found.

 

The code:

 

$VLANNAAM = "Somevlan"

$cred = get-credential

$invoked = Invoke-RestMethod -Uri ("https://"+$Hostname+":17778/SolarWinds/InformationService/v3/Json/Query?query=SELECT GroupId,VLAN_Naam FROM IPAM.GroupNodeAttr WHERE (VLAN_Naam='$VLANNAAM')") -method Get -credential $cred

 

For the credentials I've used a windows account, local account, database user.

Nothing works, Always the 403 error.

 

2015-08-27 07_33_58-Pool 06 - ICT Services Windows 8 Werkplek.png

SWQL entity for disabling NetFlow/CBQoS?

$
0
0

I have a few hundred routers I need to disable NetFlow collection as well as CBQoS on globally, so naturally I'd like to script it. I've been looking for an entity to call using Python. Can anyone provide what I'm after, and possibly an example use?

Add UDT ports via API

$
0
0

I have not found a way to do this, but maybe I'm not looking in the right place. We've got Python scripts for discovering and adding nodes and interfaces via API no problem. We're using corePluginConfig  and  interfacesPluginConfig to accomplish this. But I have not seen a similar "ports" PluginConfig (i.e. portsPluginConfig). When we started down the road of automating device entry, we assumed UDT ports would also be available to us via API. Like when we import discovered results in the web console, the Interfaces screen (with all of its selection criteria and filtering) is followed by an almost identical Ports screen. So it seemed safe to assume we would be able to include UDT ports when automating device entry via API.

 

Hopefully I'm just missing something and the option to do this is available.

 

Thanks!

Continual Data retrieval through the API

$
0
0

I currently am at a company that is standing up EM7 for non-physical layer devices (Servers, OSes, some applications).  They use SolarWinds for the physical layer items (routers, switches, ect).  There are no current plans to retire SolarWinds. 

 

What I have been tasked to do is to create a bridge between the two to essentially copy all of the polled data from solarwinds into em7 without having em7 poll those devices.   My question here begins with where might I start to begin tackling this?

SolarWinds Orion API & SDK: Authenticating with the application API key

$
0
0

Is there a way to authenticate a call with an  ApiKey or UserName/ApiKey method?


Unable to query node for NCM properties

$
0
0

I'm able to query the SWIS API for NPM properties, but not for NCM.  This works to pull the custom properties for a node:

 

https://orion:17778/SolarWinds/InformationService/v3/Json/swis://orion/Orion/Orion.Nodes/NodeID=1/CustomProperties

 

Based on the SWIS schema, I think I should be able to pull NCM node properties with this method:

 

https://orion:17778/SolarWinds/InformationService/v3/Json/swis://orion/Orion/Orion.Nodes/NodeID=1/NodeProperties

 

But I'm getting this error in return:

 

{

  "Message": "Invalid key properties specified for entity NCM.NodeProperties.\r\nParameter name: filter",

  "ExceptionType": "System.ArgumentException",

  "FullException": "System.ArgumentException: Invalid key properties specified for entity NCM.NodeProperties.\r\nParameter name: filter\r\n   at SolarWinds.InformationService.Core.SwisUriResolver.ValidateAndResolveFilter(IEntityType entity, SwisUriFilter filter, Boolean isHosted)\r\n   at SolarWinds.InformationService.Core.SwisUriResolver.ValidateAndResolveUri(SwisUri uri, IQueryExecutionContext context)\r\n   at SolarWinds.InformationService.Core.CrudProcessor.Read[T](IServiceHost serviceHost, SwisUri uri, IQueryExecutionContext context)\r\n   at SolarWinds.InformationService.Core.InformationService.Read(String uri)"

}

 

Any ideas?  Thanks!

ASA NodeID's not found

$
0
0

I have copied and modified the following SWQL from Thwack to do SerialNumber searches for our SmartNet guy, and it works great, except it is not finding any of our ASA's.

 

SELECT n.caption as Node, '/Orion/NetPerfMon/NodeDetails.aspx?NetObject=N%3a' + ToString(n.nodeid) AS [_LinkFor_Node], '/Orion/images/StatusIcons/Small-' + n.StatusLED AS [_IconFor_Node], h.ServiceTag, n.IPaddress, n.vendor, n.machinetype, h.model, n.location, n.customproperties.ZL_Location, n.contact, h.manufacturer

FROM Orion.HardwareHealth.HardwareInfo h

left join orion.nodes n on h.nodeid=n.nodeid

 

When I dug into this a bit more, i noticed that

 

SELECT ID, NodeID

FROM Orion.HardwareHealth.HardwareInfo

 

returned all NodeID's except for our ASA's. 

 

Where are the NodeID's and ServiceTags for ASA's stored?

 

thanks

larry

IPAM Database

$
0
0

Hello everyone,

 

I am an intern helping my network engineering team to automate things in SolarWinds using Python scripts. My last project concerns extracting/updating information for every subnet. We use different servers for testing and production. I created a script extracting information from the database using the tables IPAM.GroupReport and IPAM.GroupNodeAttr. Afterwards, I run the same script in the Orion webserver. Unfortunately, it failed. I realised that I am not able to access the table IPAM.GroupNodeAttr. So, I opened the database manager to look ta the tables, and I noticed that the manager displays different names for the same tables.
Here are my questions.
Do you know why there are different table names between these servers?

Even though the database manager displays different table names, I am able to access some tables that are not being shown. I know these table names from the script I created for the testing server (database manager in testing server displays different table names).

Even though I can extract information using the database manager, I am not able to extract these information using a Python script. It is like the tables are not there. Has anyone faced it before?

 

Thank you in advance,

JSON API - Volumes not adding with Poller Types

$
0
0

I have a NET SNMP linux device and the volumes are not being pulled in using the API but it can easily be done within the SW admin site.

 

It will work on some devices like Juniper for example, it will pull in the volumes.

 

This is my code for building the poller types. I can also query the pollers table and find the poller types assigned to the node.

 

function prepareCreatePoller($node_id, $device_type_name = null)
{

$poller_types = array(
  'V.Statistics.SNMP.Generic'  => true, <----
  'V.Details.SNMP.Generic'  => true, <----
  'V.Status.SNMP.Generic'  => true, <----
  'I.Status.SNMP.IfTable'  => true,
  'I.Rediscovery.SNMP.IfTable'  => true,
  'N.Status.ICMP.Native'  => true,
  'N.Status.SNMP.Native'  => false,
  'N.ResponseTime.ICMP.Native'  => true,
  'N.ResponseTime.SNMP.Native'  => false,
  'N.Details.SNMP.Generic'  => true,
  'N.Uptime.SNMP.Generic'  => true,
  'N.IPAddress.ICMP.Generic'  => true,
  'N.IPAddress.SNMP.Generic'  => true,
  'N.AssetInventory.Snmp.Generic'  => true,
  'N.Routing.SNMP.Ipv4CidrRoutingTable' => true,
  'N.Topology_Layer3.SNMP.ipNetToMedia' => true,
  'N.Memory.SNMP.HrStorage'  => true,
  'N.Memory.SNMP.NetSnmpReal'  => true,
  'N.Memory.SNMP.CpqHostPhysicalMemory' => true,
  'N.Cpu.SNMP.NetSnmpCpuIdle'  => true,
  'N.Cpu.SNMP.NetSnmpSystemStats'  => true,
  'N.Cpu.SNMP.HrProcessorLoad'  => true,
);

if(stripos($device_type_name, "juniper") !== false)
{
  $juniper = array(
   'N.Memory.SNMP.JuniperSSGNetScreen' => true,
   'N.Memory.SNMP.JuniperERX'  => true,
   'N.Memory.SNMP.JuniperJunOS'  => true,
   'N.Cpu.SNMP.JuniperSSGNetScreen'  => true,
   'N.Cpu.SNMP.JuniperJunOS'  => true,
   'N.Cpu.SNMP.JuniperERX'  => true,
  );
  $poller_types = array_merge($poller_types, $juniper);
}

if(stripos($device_type_name, "cisco") !== false)
{
  $cisco = array(
   'N.Cpu.SNMP.CiscoCadant'  => true,
   'N.Cpu.SNMP.CiscoExtreme'  => true,
   'N.Cpu.SNMP.CiscoFoundry'  => true,
   'N.Cpu.SNMP.CiscoGen1'  => true,
   'N.Cpu.SNMP.CiscoGen2'  => true,
   'N.Cpu.SNMP.CiscoGen3'  => true,
   'N.Cpu.SNMP.CiscoNexus'  => true,
   'N.Cpu.SNMP.CiscoRiverDelta'  => true,
   'N.Memory.SNMP.CiscoExtreme'  => true,
   'N.Memory.SNMP.CiscoCadant'  => true,
   'N.Memory.SNMP.CiscoFoundry'  => true,
   'N.Memory.SNMP.CiscoGen1'  => true,
   'N.Memory.SNMP.CiscoGen2'  => true,
   'N.Memory.SNMP.CiscoGen3'  => true,
   'N.Memory.SNMP.CiscoGen4'  => true,
   'N.Memory.SNMP.CiscoGen3SystemMemory' => true,
   'N.Memory.SNMP.MemoryCiscoNexus'  => true,
   'N.Memory.SNMP.CiscoRapid'  => true,
   'N.Memory.SNMP.CiscoRiverDelta'  => true,
  );
  $poller_types = array_merge($poller_types, $cisco);
}

if(stripos($device_type_name, "windows") !== false)
{
  $windows = array(
   'N.Cpu.WMI.Windows'  => true,
   'N.Cpu.WMI.WindowsRaw'  => true,
   'N.Cpu.WMI.Windows2000'  => true,
   'N.Cpu.WMI.Virtual'  => true,
   'N.Details.WMI.Generic'  => true,
   'N.Details.WMI.Vista'  => true,
   'N.Details.WMI.XP'  => true,
   'N.Uptime.WMI.Generic'  => true,
   'N.Uptime.WMI.XP'  => true,
   'N.AssetInventory.Wmi.Generic'  => true,
   'V.Details.WMI.MountPoint'  => true,
   'V.Details.WMI.Windows'  => true,
   'V.Details.WMI.NativeVolume'  => true,
   'V.Statistics.WMI.MountPoint'  => true,
   'V.Status.WMI.MountPoint'  => true,
   'V.Status.WMI.PhysicalMemoryVolume'  => true,
   'V.Statistics.WMI.NativeVolume'  => true,
   'V.Statistics.WMI.PhysicalMemoryVolume' => true,
   'V.Statistics.WMI.Windows'  => true,
   'V.Statistics.WMI.VirtualMemoryVolume'  => true,
   'V.Status.WMI.NativeVolume'  => true,
   'V.Status.WMI.Windows'  => true,
   'V.Status.WMI.VirtualMemoryVolume'  => true,
  );
  $poller_types = array_merge($poller_types, $windows);
}

$pollers = [];
foreach($poller_types as $name => $poller_type)
{
  $pollers[] = array(
   'PollerType'  => $name,
   'NetObject'  => 'N:' . $node_id,
   'NetObjectType' => 'N',
   'NetObjectID'  => $node_id,
   'Enabled'  => $poller_type
  );
}

$result = [];
foreach($pollers as $poller)
{
  $result[] = $poller_result = $this->prepareAction("Create", null, "Orion.Pollers", null, $poller);
  if($poller_result['success'] != true)
  {
   throw new Exception($poller_result['data']);
  }
}
}

 

 

Its simply not pulling in the volumes. Everything else is working.

 

Is there a way to get volumes data on the device somehow and put that data in SW for monitoring?

 

Please review the attached screenshot.

 

Thanks in advance!

API GET fails if first result contains a null value

$
0
0

When attempting to pull a list of devices from the API, if the first result contains a null value for one of the attributes, the API returns an error.

 

Sample query: SELECT Status,LastSystemUpTimePollUtc,ObjectSubType FROM Orion.Nodes ORDER BY ip WITH ROWS 1 TO 100 (modified)

 

Result via SWQL Studio:

Status        LastSystemUpTimePollUtc  ObjectSubType

1                NULL                                    ICMP

1                NULL                                    ICMP

1                2017-11-22 20:01:03.603    SNMP

 

Result via API pull in browser:

{"Message":"Cannot set Column 'LastSystemUpTimePollUtc' to be null. Please use DBNull instead.","ExceptionType":"System.ArgumentException","FullException":"System.ArgumentException: Cannot set Column 'LastSystemUpTimePollUtc' to be null. Please use DBNull instead.\u000d\u000a at System.Data.DataRow.set_Item(DataColumn column, Object value)\u000d\u000a at SolarWinds.InformationService.Serialization.DataTableSerializer.Serialize(IQueryExpr query, ISchema schema, IQueryResultReader reader)\u000d\u000a at SolarWinds.InformationService.Serialization.DataTableSerializer.PrepareSerialize(IQueryExpr query, ISchema schema, IQueryResultReader reader)\u000d\u000a at SolarWinds.InformationService.Core.InformationService.RunQuery(String query, IDictionary`2 parameters, IDataSerializer serializer)"}

 

Additional Test: If I perform a query and the first result doesn't have a null value for LastSystemUpTimePollUtc, the API pull works.

Viewing all 2677 articles
Browse latest View live


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