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.

Application name macro

I'm hoping someone out there has some answers.   The last couple weeks I've been in some development of a custom HTTP handler to capitalize of the use of these macros Solar winds provides, like ${NodeName} to extend the usefulness of User Link widgets.  For example i pass in solarwinds/QueryServer.handler{NodeName}&QueryType=Documentation and the handler will then perform a client direct to the location of the documentation specific for that server.  This is all working great.  I've even extended tools links for things like the VMConsole and RDP.

Now to the problem.. I moved on to applications.  I could have sworn i tested the existance of a macro variable that expands into a Application Name, when viewing a note with a bound Application item.  Here's the URL:  /Orion/APM/ApplicationDetails.aspx?netobject=

The things I've tried:

${Application}  - This only gets application information about Solarwinds itself.

${APM.ApplicationItem.Name} - Tried the table name because documentation said i should

${ApplicationItem.Name} - Seemed logical.

Plus 20-30 others, but wanted to list the obvious.

If someone knows of the magic bullet here, it'd be appreciated.

Tried to work around the problem in other ways too.  Since i knew i could markup these links with html code.  I attempted to inject a <script>document.write(document.url)</script> in the link, because the NetObjectID in the displayed url is enough, combined with the working macros to figure out where to redirect a user and more importantly to determine the application name.  But this was presented with an error (BTW, good job solarwinds) basically of the parsing engine protecting itself.  Here's the summary of the error: 

URL: https://solarwinds.<redacted>.com:443/Orion/APM/NetPerfMon/Resources/Misc/<script>document.write(document.url)</script>

Referrer: https://solarwinds.<redacted>.com:443/Orion/APM/NetPerfMon/Resources/Misc/<script>document.write(document.url)</script>

Message: A potentially dangerous Request.Path value was detected from the client (<).

ErrorSite: System.Web.HttpRequest.ValidateInputIfRequiredByConfig

ErrorType: System.Web.HttpException

Stack:

at System.Web.HttpRequest.ValidateInputIfRequiredByConfig()

at System.Web.HttpApplication.PipelineStepManager.ValidateHelper(HttpContext context)

Assemblies:

Next question:   This line in the error messages alludes to an override of sorts to allow me to do what i want  ValidateInputIfRequiredByConfig - But i didn't want to willy-nilly start tripping around finding where to insert the change. 

Other food for throught:  There seems to be a single Regex line in a .cs file (CommonWebHelper.cs), which i believe is the http processor for solarwinds.. that control what tags may be used.

Here's the line:  static string _tagsToEncodeReg = "<(?!br|/br|p|/p|span|/span|div|/div|table|/table|tr|/tr|td|/td|a|/a|b|/b|i(?!nput)|/i(?!nput))(?:[^\">]|\"[^\"]*\")*>"

Again, i didn't want to dink with those pieces of code that were mine.  The objective was to extend what's allowed in Solarwinds.  But if some dev has a magic answer here.. i'd be helpful.

Rambled a bit, but i've spent some time looking for this answer and it's a lynch pin for me to help this organization bring home the "Single Pane of Glass" mentality by intelligently locating their scattered data, but organized data based on a display context in solarwinds (Server's or Applications)

  • There is no application description macro available for use through the Orion web interface. This macro does exist however for trigger actions within the Advanced Alert Manager.

  • I actually countered this limitation in the following way.

    Since contextually, when viewing an application i could get variables like NodeID and NodeSys and since the application component was associated to this node and it's object id was in the url.... it dawned on my the last piece of missing info was the URL and specifically the netobject - Ex: https://solarwinds/Orion/APM/ApplicationDetails.aspx?NetObject=AA:109

    So i wrote the following and imbedded in the custom HTML to send the info to a custom http handler which would parse the arguments and look up the application name.

    <html>
    <head>
    <script type="text/javascript">
    var currentLink =window.document.location.href;
    var AppDetails = "Application Details"
    var AppMap = "Application Map"
    var AppTroubleshooting = "Application Troubleshooting"
    document.write("<p>" + AppDetails.link("http://solarwinds:8000/QueryServer.customHandler?ServerName=MYAPPSRV01?CurrentPath=" + currentLink ) + "</p>");
    document.write("<p>" + AppMap.link("http://solarwinds:8000/QueryServer.customHandler?ServerName=MYAPPSRV01?CurrentPath=" + currentLink ) + "</p>");
    document.write("<p>" + AppTroubleshooting.link("http://solarwinds:8000/QueryServer.customHandler?ServerName=MYAPPSRV01?CurrentPath=" + currentLink ) + "</p>");

    </script>
    </head>
    <body>
    </body>
    </html>
    </br>

    Basically, it sends the currently displayed url into my handler, and with that and the servername i can tell the user is looking at an application and which one. And from that i can product some links back to internal documention, be it on sharepoint, or in a cmdb, etc.   My attempt to push home the single pane of glass mentatility.