How do I change the Port Number for SQL Monitor?

Previously the URL for accessing our Redgate Monitor was:
http://{internal server IP}:8080/

I just installed updates to SQL Monitor and now it's:
http://{internal server IP}:8070/

How can I update the Port Number so that our users don't have to change the URL they use?
Tagged:

Best Answer

  • Russell DRussell D Posts: 1,324 Diamond 5
    edited November 27, 2017 2:04PM Answer ✓
    First stop the basemonitor, then you need to edit the RedGate.Response.UI.Server.Service.exe.config​, in C:\Program Files\Red Gate\SQL Monitor\Web\​. Find the portNum​ setting in the serverSettings tags:

    <serverSettings portNum="8080" serviceType="network">
    <website path="C:\Program Files\Red Gate\SQL Monitor\Web\Website\"/>
    </serverSettings>

    then restart both the SQL Monitor Basemonitor and the SQL Monitor Web Service services.
    Have you visited our Help Centre?

Answers

  • Alex BAlex B Posts: 1,157 Diamond 4
    edited December 11, 2017 10:29AM
    The below for the built in webserver used to work in some previous versions of v7 but it seems it no longer does! Please see Russell's answer above for that, changing the port for IIS configuration below is still valid.


    Hi @hurleystylee

    It depends on whether you are using the built in webserver or IIS. I imagine you are using the built in webserver as it would be harder to accidentally change the port in IIS :grin: but I'll include both for anyone else who might need it:

    For the built in webserver:
    1. Open Notepad as an admin (or other text editor program)
    2. Edit to the applicationhost.config file located at %ProgramData%\Red Gate\SQL Monitor.
    3. Search for the current port number (8070)
    4. Change it to 8080 and save
    5. Restart the SQL Monitor Web Service service for this to take effect.

    If you haven't opened as an admin it will not let you save it. The line will look like:
    <binding protocol="http" bindingInformation="*:8080:*" />
    


    If you are using IIS you will need to edit the port the site in IIS is bound to.
    1. Open the IIS Manager
    2. Expand out the list of sites
    3. Right click the SQL Monitor site (this is will be whatever you named it)
    4. Choose Edit Bindings
    5. Double Click the http binding
    6. Change the port from 8070 to 8080

    I hope that helps!

    Kind regards,
    Alex
    Product Support Engineer | Redgate Software

    Have you visited our Help Center?
  • Thank you, Alex!

    Yes, I'm using the built in webserver, but I've got slightly different values than what you pointed out.

    1. In %ProgramData%\Red Gate\SQL Monitor\, that applicationhost.config file doesn't exist. All that's there are 2 folders - BaseMonitor and Web. However, in the Web folder, there's an applicationhosttemplate.config file

    2. That applicationhosttemplate.config file has the following line in it:
    <binding protocol="http" bindingInformation="*:{PORT}:*"/>
    

    Although I didn't think it would work, I went ahead and changed that line to match what you suggested, then restarted the Web Service. No luck.
  • Hi @hurleystylee

    It sounds like you're looking in the %ProgramFiles% folder (the install directory which has BaseMonitor and Web or Website depending on whether you have IIS or built in webserver) not the %ProgramData% folder (the hidden folder for data relating to the program that isn't user specific).

    Copy and paste the folder path and it should take you to the right place - though thinking about it just now, you may be able to change this working directory when you install.

    Can you confirm whether you are looking at the correct folder above?

    Kind regards,
    Alex
    Product Support Engineer | Redgate Software

    Have you visited our Help Center?
  • Hi Alex,

    Thank you for your continued help! I apologize for being in the wrong folder before - that was dumb. I'm in the ProgramData folder now and have found the config file in question.

    I'm able to modify the binding protocol line in Admin mode, I close it and then reopen it to verify the change was saved (it was), then I restart the SQL Monitor Web Service. Nothing appears to have changed , plus the value in the config file reverts back to 8070.

    Thank you!
    Jason
  • Hi @hurleystylee

    Not a problem it happens to us all :grin:

    This is quite odd - what version of SQL Monitor are you using? If you stop the webservice first and then try editing it and start the service again does it still do this?

    Kind regards,
    Alex
    Product Support Engineer | Redgate Software

    Have you visited our Help Center?
  • Alex,

    This all started because I opened up SQL Monitor and it prompted me to update to the latest version. So, that's what version I'm on now! (Web Server and Base Monitor versions of 7.1.12.9668)

    I liked the idea of stopping the service, changing the value, and starting the service. However, that didn't work either! It keeps reverting the value back to 8070!

    Thanks,
    Jason
  • Hi @Russell D,

    Thanks for helping out with this too!

    I was able to change the portNum value in that config file from 8070 to 8080 and the value "stuck" when I restarted the basemonitor.

    However, the Monitor is still only working with the URL of 8070 and not 8080.
    http://localhost:8070/GlobalDashboard/ --> Works
    http://localhost:8080/GlobalDashboard/ --> Doesn't work
  • jasonhurleyjasonhurley Posts: 7 Bronze 3
    edited November 27, 2017 2:13PM
    @Russell D that did it! Thanks so much to you and @Alex B for all your help on this!!
  • No problem, glad we got there in the end, I've tidied up the answer so its all in one post.
    Have you visited our Help Centre?
Sign In or Register to comment.