cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post

Display Server Name for Multiple Orion Web Servers

Abstract

We recommend regularly to our clients to deploy Orion Additional Web Servers, typically where we know the active user count will be pushing towards 20+ concurrent users and where platform resiliency is a requirement. In the latter situation, this means that we are putting a load balancer in front of the Orion web servers to act as the arbitrator on which server is used for a particular session.

This is important, you need to deploy an Orion multi web server architecture with a solution for ensuring session management is supported. This is often referred to a sticky session management, as a single session needs to be handled by a single Orion web server. If it is not, then you will have a situation where when navigating around the Orion web interface a page request or even auto page refresh may now get picked up by the other web server. That web server has not spoken to you before and therefore will ask you to login.

This is why it is not possible to use DNS round robin to provide Orion load balancing either.

OK, so that was the pre-amble, the purpose of this post is to provide a method to display which web server you are accessing when you are using such an architecture. For this, we are going to need to change the web application code to include output for the hostname of the server to which your page request is being served. This is especially useful to identify which server you may need to go collect logs for, or identify if you have issues with balancing of requests across the servers.

Information and Warning

This is a straightforward change to make and I would mark this as an easy change.

However! This is a change which is adjusting the code in the Orion web application. This has potential implications:

  1. This is an unsupported change. SolarWinds support might quite rightly ask you to remove this change to provide support if your issue relates to the web page
  2. If you ever run the Configuration Wizard or when you perform upgrades, the code may get reset and you will simply need to re-add it
  3. Post upgrade, this code structure may have changed and therefore it will need to be updated to support probably just the insertion point
  4. The change outlined below requires you to have your Orion website running with 'Precompiledwebsitedisabled="true", which is beautifully detailed by @wluther here https://thwack.solarwinds.com/t5/SCM-Documents/Primary-Default-SolarWinds-Files-Used-To-Customize-De...
Solution

The easiest thing is for me to show you the outcome with a screenshot, as this will save me typing more and way easier for you to understand if this is something you wish to apply to your installation.

Which Server, ahh this one

I have chosen to put this in the footer section, as a this is nicely hidden away and secondly this is probably the easiest location to apply the change.

Steps to configure:

  1. Login to one of your Orion web servers
  2. Navigate to C:\inetpub\SolarWinds\Orion\Controls\ (if you have installed the SolarWinds website in a different folder, find the appropriate path 
  3. Make a copy of the file - PageFooter.ascx and save to a safe location
  4. Open in a text editor the original file
  5. In Orion 2019.4 release version on line 21 you will find the following text

    <a href="<%= Resources.CoreWebContent.SolarWindsComLocUrl %>"><img alt="SolarWinds" height="19" width="77" src="/orion/images/SolarWinds.Logo.Footer.svg" /></a><%= FooterString %></div>

  6. Insert the following text into this line where the next text is highlighted her in bold

    <a href="<%= Resources.CoreWebContent.SolarWindsComLocUrl %>"><img alt="SolarWinds" height="19" width="77" src="/orion/images/SolarWinds.Logo.Footer.svg" /></a> Server: <%= System.Environment.MachineName.ToString() %> <%= FooterString %> </div>

  7. Save the file
  8. Navigate to this web servers Orion URL and confirm that you see the hostname displayed in the footer
    1. Note: This save will cause IIS to recompile the SolarWinds web application as a change was detected, so the first time you hit the site, it will take 20 - 60 seconds to load
  9. Backup this new file to a safe location 
  10. Repeat on each of your other Orion web servers

I hope you find this useful.

Mark Roberts

Prosperon - UK SolarWinds Partners

Installation | Consultancy | Training | Licenses

12 Replies
Level 12

I think I must be missing something - I have tried put this into "production" and could not find the directories/files that were given here.

I am at 2019.4.

Any help or direction would be appreciated 

Thank You

0 Kudos

This tiny little detail should just be standard, especially when having multiple web servers running. I have been wanting to do something like this for a while. Thanks to @m_roberts , I don't have to spend the time figuring it out!

I just made this edit to my web servers, and my brain thanks you, sir!

I use PowerShell to keep a few .js, .ascx, and .config files modded. It's nothing fancy, and does not have any error correction, but it works. I added this edit to my list, so I can just run a PowerShell script instead of having to go into each file, on each server, and make the change.

 

#Orion Platform 2018.4 HF3, SCM 1.1.0, NCM 7.9, NPM 12.4, DPAIM 11.1.1, VMAN 8.4.0, SAM 6.8.0, NetPath 1.1.4
#F:\inetpub\SolarWinds\Orion\Controls\PageFooter.ascx
$file = 'F:\inetpub\SolarWinds\Orion\Controls\PageFooter.ascx'
$ChangeThis = '    <a href="<%= Resources.CoreWebContent.SolarWindsComLocUrl %>"><img alt="SolarWinds" height="19" width="77" src="/orion/images/SolarWinds.Logo.Footer.svg" /></a><%= InstalledProducts %> &copy; 1999-<%= DateTime.Now.Year %> SolarWinds Worldwide, LLC. All Rights Reserved.</div>'
$ToThis = '    <a href="<%= Resources.CoreWebContent.SolarWindsComLocUrl %>"><img alt="SolarWinds" height="19" width="77" src="/orion/images/SolarWinds.Logo.Footer.svg" /></a> Server: <%= System.Environment.MachineName.ToString() %>  <%= InstalledProducts %> &copy; 1999-<%= DateTime.Now.Year %> SolarWinds Worldwide, LLC. All Rights Reserved.</div>'
(Get-Content $file) -replace $ChangeThis, $ToThis | Set-Content $file
Write-Output ' Updated PageFooter.ascx '

 

 

Again, it's nothing fancy, but it helps me keep up with the changes after running the config wizard. Maybe it will help someone else too.

 

Thanks, again, @m_roberts !!

Level 11

BUMP!! Yeah this is definitely an issue when troubleshooting and testing web servers behind a load balancer. Nice solution to update the code to the bottom bar. Much nicer than trying to view platform page or a custom swql report. 

0 Kudos
Level 9

This is cool and interesting, but doesn't the platform details page show you the same thing without having to modify code?

nerengm_0-1589463477146.png

 

0 Kudos

Yes, but non-admins cannot get to see this and to put this on an entire widget is not something likely for user display

0 Kudos

I agree with you that the Platform page does, however if you are troubleshooting issues with a user that doesn't have access to that page, it becomes harder to see which web server they are connected to.

John Handberg

Oh, good point.  I was only thinking about myself again...

0 Kudos

Plus according to SolarWinds support that page was written a LONG time ago, and they said they are not sure how reliable it is.

I have been asking about this for some time so I am very happy to be able to put this in - Thank you @m_roberts 

- David Smith
0 Kudos
Level 12

HUGE Thank You
We have been wanting this for ages.
We use F5 GTM to "balance - least connections - sticky" across all our Additional Web Servers.

I've been wanting something like this for ages, thank you for sharing Mark.

This is great, I will get this implemented right away!