identify web server

Hi, we are running HCO advanced enterprise 2024.2.1, and I am adding two web servers behind a load balancer with our MPE. I am looking for a simple way on the login screen to identify the server a user is connecting to. I have searched THWACK, and found a couple of feature requests from over a year ago, and then a similar question answered many years ago. I tried to follow the older solution, but it seems the structure is very different now. Has anyone been able to add an identity to each of the web servers? Any help is appreciated.

thanks

  • This is a good question. I dont know a way to do this, I think it'd be doable on classic using the custom html widget and calling some js or something. I may look into this further. Not aware of a way of callling any variables associated with the user session elsewhere.

  • Actually, to confirm  , this is specifically for the login page?

  • Hi Adam, it doesn't really need to be just for the login page, could be in the footer or header. just thought the login page would be the easiest place. Is something we have done with other applications that have multiple web servers behind a load balancer.  comes in very handy during troubleshooting.

    thanks, Steve

  • I think I may have found a solution that could work for this by adapting this old tutorial I've used in the past: HERE

    The actual post itself is pretty dated, so here is a list of steps I took to achieve the desired outcome:

    Step 1: Create "foo.js"

    On each web server, create a file called "foo.js" (or whatever you want, really)

    Inside of the file, paste this code (update to include the individual sever name):

    document.addEventListener('DOMContentLoaded'),function(){
    setTimeout(function(){
    document.getElementById("footer").innerHTML += ' Server: {SERVER_NAME}';
    }, 3000);
    }, false);

    Step 2: Copy "foo.js" to the OrionMinReqs.js Directory

    In my lab, the path was here:

     

    C:\Program Files\SolarWinds\Orion\Web\Orion\js\OrionMinReqs.js

    ...and that was it. Once I did a Shift+F5 to reload the page, I saw the updated HTML in the footer:

    A few notes:

    I had originally followed the linked tutorial and updated the bundler.config, but I was running some tests and I didn't seem to need to do this anymore. YMMV.

    I only tested on a single server lab that I set up specifically for this, so I can't guarantee 100% that it'll work with multiple WFE's, or that the juice will be worth the squeeze, but this should give a solid starting point if you want to test it out. I'd recommend trying in a lab environment first and nailing down the process since I had limited time to try out different steps or scenarios. I also can't guarantee it'll show up on every page. From limited testing, it doesn't show up on a lot of the newer UI pages, like Modern Dashboards, etc. You'd have to tweak the "foo.js" file to look for a different div element most likely.

  • hi   thank you for your response and updates. I gave this a try and am not so lucky that it would work on the first try. I created the foo.js file and copied what you have above. In the quotes for server I replaced {server name} with my servers name. I found the path for OrionMinReqs.js folder and copied the foo file. When I refresh the dashboard I am on at the time it will not complete loading and the footer does not show server name from foo. If I remove foo and refresh again the page completes loading. I checked for typos, and even tried adding foo to the bundler.config as one of the files, as the one in this directory had an entry for each file in the folder. This did not make a difference and page would not fully load. 

    I do not have a lab environment yet, on the todo list, but my web servers are new with no users connecting to them yet. Gives me some freedom to try anything. I will try again, maybe a third time will be the charm. 

    Thanks, Steve

  • Flackovic's solution looks good though i still cant test it at the moment. Had a thought though which is that netpathing to your load balancer IP/name/url produces a lovely chart of %traffic going to each endpoint and whatnot. Should work on :443 and :17778/4 

  • Hi Adam, I am not very familiar with the network side of monitoring, so configuring this may be a challenge for me. Thank you for the suggestion, and I will reach out to someone that might be more familiar with netpath. 

  • It's super easy, takes 2 mins in the UI, don't worry :)

  • After many tries on both of my web servers I am unable to get Foo.js to add my server name to the footer.  While poking around I found the login screen background image file called pattern-login-screen located here E:\Program Files\SolarWinds\Orion\Web\Orion\images\Login. I was able to add the server name text into the image, and now the background displays the server name repeatedly as part of the wallpaper, but at least it is there. It is not the best solution, but it works, and chances are nobody but me will notice until I ask during troubleshooting. I appreciate all the input and help. thanks, Steve