This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

bug in SWQL studio

There appears to be a bug in SWQL studio when invoking the createcontainer method and the member definition has an ampersand character in it.

See the end of this message for details on invoking

just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Xml.XmlException: An error occurred while parsing EntityName. Line 1, position 204.

   at System.Xml.XmlTextReaderImpl.Throw(Exception e)

   at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)

   at System.Xml.XmlTextReaderImpl.ParseEntityName()

   at System.Xml.XmlTextReaderImpl.ParseEntityReference()

   at System.Xml.XmlTextReaderImpl.Read()

   at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)

   at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)

   at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)

   at System.Xml.XmlDocument.Load(XmlReader reader)

   at System.Xml.XmlDocument.LoadXml(String xml)

   at System.Xml.XmlDocument.set_InnerXml(String value)

   at SwqlStudio.InvokeVerbTab.GetValue(VerbArgument arg)

   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()

   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)

   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)

   at SwqlStudio.InvokeVerbTab.Invoke_Click(Object sender, HtmlElementEventArgs e)

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

   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)

   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)

   at System.Delegate.DynamicInvokeImpl(Object[] args)

   at System.Windows.Forms.HtmlShim.FireEvent(Object key, EventArgs e)

************** Loaded Assemblies **************

mscorlib

    Assembly Version: 4.0.0.0

    Win32 Version: 4.7.2117.0 built by: NET47REL1LAST

    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll

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

SwqlStudio

    Assembly Version: 2.3.0.123

    Win32 Version: 2.3.0.123

    CodeBase: file:///C:/Program%20Files%20(x86)/SolarWinds/Orion%20SDK/SWQL%20Studio/SwqlStudio.exe

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

SolarWinds.Logging

    Assembly Version: 2.3.0.123

    Win32 Version: 2.3.0.123

    CodeBase: file:///C:/Program%20Files%20(x86)/SolarWinds/Orion%20SDK/SWQL%20Studio/SolarWinds.Logging.DLL

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

System

    Assembly Version: 4.0.0.0

    Win32 Version: 4.7.2114.0 built by: NET47REL1LAST

    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll

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

System.Windows.Forms

    Assembly Version: 4.0.0.0

    Win32 Version: 4.7.2114.0 built by: NET47REL1LAST

    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

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

System.Drawing

    Assembly Version: 4.0.0.0

    Win32 Version: 4.7.2053.0 built by: NET47REL1

    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

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

System.Core

    Assembly Version: 4.0.0.0

    Win32 Version: 4.7.2117.0 built by: NET47REL1LAST

    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll

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

log4net

    Assembly Version: 1.2.13.0

    Win32 Version: 1.2.13.0

    CodeBase: file:///C:/Program%20Files%20(x86)/SolarWinds/Orion%20SDK/SWQL%20Studio/log4net.DLL

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

System.Configuration

    Assembly Version: 4.0.0.0

    Win32 Version: 4.7.2053.0 built by: NET47REL1

    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

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

System.Xml

    Assembly Version: 4.0.0.0

    Win32 Version: 4.7.2102.0 built by: NET47REL1LAST

    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

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

SolarWinds.SDK.Swis.Contract

    Assembly Version: 2.3.0.123

    Win32 Version: 2.3.0.123

    CodeBase: file:///C:/Program%20Files%20(x86)/SolarWinds/Orion%20SDK/SWQL%20Studio/SolarWinds.SDK.Swis.Contract.DLL

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

System.ServiceModel

    Assembly Version: 4.0.0.0

    Win32 Version: 4.7.2106.0 built by: NET47REL1LAST

    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.ServiceModel/v4.0_4.0.0.0__b77a5c561934e089/System.ServiceModel.dll

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

System.Runtime.Serialization

    Assembly Version: 4.0.0.0

    Win32 Version: 4.7.2106.0 built by: NET47REL1LAST

    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll

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

SMDiagnostics

    Assembly Version: 4.0.0.0

    Win32 Version: 4.7.2106.0 built by: NET47REL1LAST

    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/SMDiagnostics/v4.0_4.0.0.0__b77a5c561934e089/SMDiagnostics.dll

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

System.ServiceModel.Internals

    Assembly Version: 4.0.0.0

    Win32 Version: 4.7.2106.0 built by: NET47REL1LAST

    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.ServiceModel.Internals/v4.0_4.0.0.0__31bf3856ad364e35/System.ServiceModel.Internals.dll

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

System.ServiceModel.Web

    Assembly Version: 4.0.0.0

    Win32 Version: 4.7.2053.0 built by: NET47REL1

    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.ServiceModel.Web/v4.0_4.0.0.0__31bf3856ad364e35/System.ServiceModel.Web.dll

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

System.Data

    Assembly Version: 4.0.0.0

    Win32 Version: 4.7.2102.0 built by: NET47REL1LAST

    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll

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

System.IdentityModel

    Assembly Version: 4.0.0.0

    Win32 Version: 4.7.2106.0 built by: NET47REL1LAST

    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.IdentityModel/v4.0_4.0.0.0__b77a5c561934e089/System.IdentityModel.dll

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

System.IdentityModel.Selectors

    Assembly Version: 4.0.0.0

    Win32 Version: 4.7.2053.0 built by: NET47REL1

    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.IdentityModel.Selectors/v4.0_4.0.0.0__b77a5c561934e089/System.IdentityModel.Selectors.dll

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

Microsoft.GeneratedCode

    Assembly Version: 1.0.0.0

    Win32 Version: 4.7.2102.0 built by: NET47REL1LAST

    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

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

System.Security

    Assembly Version: 4.0.0.0

    Win32 Version: 4.7.2053.0 built by: NET47REL1

    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Security/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Security.dll

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

System.Numerics

    Assembly Version: 4.0.0.0

    Win32 Version: 4.7.2053.0 built by: NET47REL1

    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll

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

ScintillaNET

    Assembly Version: 3.5.6.0

    Win32 Version: 3.5.6.0

    CodeBase: file:///C:/Program%20Files%20(x86)/SolarWinds/Orion%20SDK/SWQL%20Studio/ScintillaNET.DLL

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

System.Web

    Assembly Version: 4.0.0.0

    Win32 Version: 4.7.2106.0 built by: NET47REL1LAST

    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Web/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Web.dll

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

Microsoft.CSharp

    Assembly Version: 4.0.0.0

    Win32 Version: 4.7.2053.0

    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.CSharp/v4.0_4.0.0.0__b03f5f7f11d50a3a/Microsoft.CSharp.dll

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

System.Dynamic

    Assembly Version: 4.0.0.0

    Win32 Version: 4.7.2053.0

    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Dynamic/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Dynamic.dll

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

Anonymously Hosted DynamicMethods Assembly

    Assembly Version: 0.0.0.0

    Win32 Version: 4.7.2117.0 built by: NET47REL1LAST

    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/mscorlib/v4.0_4.0.0.0__b77a5c561934e089/mscorlib.dll

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

************** JIT Debugging **************

To enable just-in-time (JIT) debugging, the .config file for this

application or computer (machine.config) must have the

jitDebugging value set in the system.windows.forms section.

The application must also be compiled with debugging

enabled.

For example:

<configuration>

    <system.windows.forms jitDebugging="true" />

</configuration>

When JIT debugging is enabled, any unhandled exception

will be sent to the JIT debugger registered on the computer

rather than be handled by this dialog box.

  • SWQL Studio needs complex argument values in XML format. In XML, the & character must be encoded as &amp; or the XML is malformed. In this case, I would expect SWQL Studio to give a decent error message, but what you actually got was an ugly unhandled exception. I opened https://github.com/solarwinds/OrionSDK/issues/107  to improve this.

  • Thank you again! I’ll keep that in mind. I’ll be using this (courteous of your help from your other post) to script creating a BUNCH of groups

    attachments.zip
  • You may want to be cautious about creating a BUNCH of groups, it can cause a serious performance hit to your instance.  It depends on the particulars of your environment and hardware, but I find that once you get into the 400+ groups range you can start to measure/feel the difference in many views, I've seen clients with over 1000 groups working fine but they have a lot of cpu and memory associated with their environment.  The performance hit has to do with the fact that groups are frequently re-evaluating their status based on the status of all their members, and if you have a lot of complex dynamic queries populating the groups then there is some more overhead associated with those.  One way to mitigate this seem to be by reducing the frequency of groups from the default 60 seconds to something like 500, but even with that change you will eventually start to feel negative impacts at high enough numbers of groups.

  • Thank you for that tip!  I say bunch but I didn't mean anywhere near 400 or 1000.  Looks like right now I'm only at 57 total comprised of about 2000 servers.

    We're using the groups primarily as a means for storing the email addresses associated with those devices so when an alert triggers on them it goes to the email addresses associated with that groups email (which is just a group custom property)

    So far it's working rather nicely.  Again, thank you for the heads up - will definitely keep that in mind.

  • Of note - in Orion Platform 2017.3 (a.k.a. NPM 12.2) we put some work into improving the performance of many aspects of Orion Groups. They still aren't "free", but they are cheaper than they used to be. Larger and more numerous groups should have a smaller systemic impact than in previous releases.

  • Awesome to hear about that change!