Navigation
This version of the documentation is archived and no longer supported. To learn how to upgrade your version of MongoDB Ops Manager, refer to the upgrade documentation.
You were redirected from a different version of the documentation. Click here to go back.
  • Security >
  • Manage Ops Manager Hostname and Ports

Manage Ops Manager Hostname and Ports

    Ops Manager must provide a consistent hostname and consistent ports. Follow these procedures to:

    • Override the default hostname for Ops Manager
    • Change the default ports for Ops Manager
    • Enable the health-check endpoints

    Note

    All of these procedures are optional. You shouldn’t need to change these settings unless your Ops Manager Backup Daemons or Ops Manager Application doesn’t appear with the correct hostname, or you need to change ports to meet local security concerns.

    Override the Ops Manager Hostname

    Ops Manager tries to detect its host’s FQDN. There might be times when the Ops Manager hosts select the wrong hostname. If you need to override the hostname that Ops Manager selected, you can set Ops Manager to use a hostname that you specify.

    Important

    If Ops Manager works as expected from the URL you wanted, you can skip this procedure.

    To set the hostname on Ubuntu or Debian hosts:

    1

    Log in to the host running Ops Manager.

    2

    Open mms.conf for editing.

    1. Navigate to the <install_dir>/conf/ directory.

    2. Open the mms.conf file as root in your preferred text editor.

      Example

      sudo -H vi /opt/mongodb/mms/conf/mms.conf
      
    3

    Set the hostname values to the FQDN for the Ops Manager Application and Backup Daemon.

    Add two options with the mms.system.hostname value:

    • JAVA_MMS_UI_OPTS for the Ops Manager Application
    • JAVA_DAEMON_OPTS for the Backup Daemon

    Example

    These Java options should look similar to this example:

    JAVA_MMS_UI_OPTS="${JAVA_MMS_UI_OPTS} -Dmms.system.hostname=opsmanager.example.com"
    JAVA_DAEMON_OPTS="${JAVA_DAEMON_OPTS} -Dmms.system.hostname=opsmanager-bkp.example.com"
    

    You can use environment variables on Linux systems to set this value:

    JAVA_MMS_UI_OPTS="${JAVA_MMS_UI_OPTS} -Dmms.system.hostname=$(hostname -f)"
    JAVA_DAEMON_OPTS="${JAVA_DAEMON_OPTS} -Dmms.system.hostname=$(hostname -f)"
    
    4

    Update the Ops Manager URL.

    1. In the Ops Manager Application, click the Admin link in the upper right corner of the page.

    2. Click the General tab and then click Ops Manager Config.

    3. Update the URL to Access Ops Manager field to use the value you specified in the Java Options registry value.

      Example

      https://opsmanager.example.com:11800
      
    4. Click Save.

    5

    Restart Ops Manager.

    Invoke the following command:

    sudo service mongodb-mms restart
    

    Invoke the following command:

    sudo service mongodb-mms restart
    

    Invoke the following command:

    sudo /etc/init.d/mongodb-mms restart
    

    You can access the Ops Manager Application from the new URL after Ops Manager restarts.

    To set the hostname on Red Hat or CentOS hosts:

    1

    Log in to the host running Ops Manager.

    2

    Open mms.conf for editing.

    1. Navigate to the <install_dir>/conf/ directory.

    2. Open the mms.conf file as root in your preferred text editor.

      Example

      sudo -H vi /opt/mongodb/mms/conf/mms.conf
      
    3

    Set the hostname values to the FQDN for the Ops Manager Application and Backup Daemon.

    Add two options with the mms.system.hostname value:

    • JAVA_MMS_UI_OPTS for the Ops Manager Application
    • JAVA_DAEMON_OPTS for the Backup Daemon

    Example

    These Java options should look similar to this example:

    JAVA_MMS_UI_OPTS="${JAVA_MMS_UI_OPTS} -Dmms.system.hostname=opsmanager.example.com"
    JAVA_DAEMON_OPTS="${JAVA_DAEMON_OPTS} -Dmms.system.hostname=opsmanager-bkp.example.com"
    

    You can use environment variables on Linux systems to set this value:

    JAVA_MMS_UI_OPTS="${JAVA_MMS_UI_OPTS} -Dmms.system.hostname=$(hostname -f)"
    JAVA_DAEMON_OPTS="${JAVA_DAEMON_OPTS} -Dmms.system.hostname=$(hostname -f)"
    
    4

    Update the Ops Manager URL.

    1. In the Ops Manager Application, click the Admin link in the upper right corner of the page.

    2. Click the General tab and then click Ops Manager Config.

    3. Update the URL to Access Ops Manager field to use the value you specified in the Java Options registry value.

      Example

      https://opsmanager.example.com:11800
      
    4. Click Save.

    5

    Restart Ops Manager.

    Invoke the following command:

    sudo service mongodb-mms restart
    

    Invoke the following command:

    sudo service mongodb-mms restart
    

    Invoke the following command:

    sudo /etc/init.d/mongodb-mms restart
    

    You can access the Ops Manager Application from the new URL after Ops Manager restarts.

    To set the hostname on Linux hosts:

    1

    Log in to the host running Ops Manager.

    2

    Open mms.conf for editing.

    1. Navigate to the <install_dir>/conf/ directory.

    2. Open the mms.conf file as root in your preferred text editor.

      Example

      sudo -H vi /opt/mongodb/mms/conf/mms.conf
      
    3

    Set the hostname values to the FQDN for the Ops Manager Application and Backup Daemon.

    Add two options with the mms.system.hostname value:

    • JAVA_MMS_UI_OPTS for the Ops Manager Application
    • JAVA_DAEMON_OPTS for the Backup Daemon

    Example

    These Java options should look similar to this example:

    JAVA_MMS_UI_OPTS="${JAVA_MMS_UI_OPTS} -Dmms.system.hostname=opsmanager.example.com"
    JAVA_DAEMON_OPTS="${JAVA_DAEMON_OPTS} -Dmms.system.hostname=opsmanager-bkp.example.com"
    

    You can use environment variables on Linux systems to set this value:

    JAVA_MMS_UI_OPTS="${JAVA_MMS_UI_OPTS} -Dmms.system.hostname=$(hostname -f)"
    JAVA_DAEMON_OPTS="${JAVA_DAEMON_OPTS} -Dmms.system.hostname=$(hostname -f)"
    
    4

    Update the Ops Manager URL.

    1. In the Ops Manager Application, click the Admin link in the upper right corner of the page.

    2. Click the General tab and then click Ops Manager Config.

    3. Update the URL to Access Ops Manager field to use the value you specified in the Java Options registry value.

      Example

      https://opsmanager.example.com:11800
      
    4. Click Save.

    5

    Restart Ops Manager.

    Invoke the following command:

    sudo service mongodb-mms restart
    

    Invoke the following command:

    sudo service mongodb-mms restart
    

    Invoke the following command:

    sudo /etc/init.d/mongodb-mms restart
    

    You can access the Ops Manager Application from the new URL after Ops Manager restarts.

    Change the Default Port

    Ops Manager uses the ports and health-check endpoints described in Firewall Configuration. The endpoints default to disabled.

    To change the ports on Ubuntu or Debian hosts:

    1

    Log in to the host running Ops Manager.

    2

    Open mms.conf for editing.

    1. Navigate to the <install_dir>/conf/ directory.

    2. Open the mms.conf file as root in your preferred text editor.

      Example

      sudo -H vi /opt/mongodb/mms/conf/mms.conf
      
    3

    Set the BASE_PORT value to the desired Ops Manager port.

    When changing the port, ensure that the chosen port is available for use.

    By default, Ops Manager uses port 8080. Change the BASE_PORT value to the desired port number.

    BASE_PORT=11700
    

    If you want to change the port for Ops Manager connections over TLS, update BASE_SSL_PORT.

    4

    Update the Ops Manager URL.

    1. In the Ops Manager Application, click the Admin link in the upper right corner of the page.

    2. Click the General tab and then click Ops Manager Config.

    3. Update the URL to Access Ops Manager field to use the value you specified in the Java Options registry value.

      Example

      https://opsmanager.example.com:11800
      
    4. Click Save.

    5

    Restart Ops Manager.

    Invoke the following command:

    sudo service mongodb-mms restart
    

    Invoke the following command:

    sudo service mongodb-mms restart
    

    Invoke the following command:

    sudo /etc/init.d/mongodb-mms restart
    

    You can access the Ops Manager Application from the new URL after Ops Manager restarts.

    To change the ports on Red Hat or CentOS hosts:

    1

    Log in to the host running Ops Manager.

    2

    Open mms.conf for editing.

    1. Navigate to the <install_dir>/conf/ directory.

    2. Open the mms.conf file as root in your preferred text editor.

      Example

      sudo -H vi /opt/mongodb/mms/conf/mms.conf
      
    3

    Set the BASE_PORT value to the desired Ops Manager port.

    When changing the port, ensure that the chosen port is available for use.

    By default, Ops Manager uses port 8080. Change the BASE_PORT value to the desired port number.

    BASE_PORT=11700
    

    If you want to change the port for Ops Manager connections over TLS, update BASE_SSL_PORT.

    4

    Update the Ops Manager URL.

    1. In the Ops Manager Application, click the Admin link in the upper right corner of the page.

    2. Click the General tab and then click Ops Manager Config.

    3. Update the URL to Access Ops Manager field to use the value you specified in the Java Options registry value.

      Example

      https://opsmanager.example.com:11800
      
    4. Click Save.

    5

    Restart Ops Manager.

    Invoke the following command:

    sudo service mongodb-mms restart
    

    Invoke the following command:

    sudo service mongodb-mms restart
    

    Invoke the following command:

    sudo /etc/init.d/mongodb-mms restart
    

    You can access the Ops Manager Application from the new URL after Ops Manager restarts.

    To change the ports on Linux hosts:

    1

    Log in to the host running Ops Manager.

    2

    Open mms.conf for editing.

    1. Navigate to the <install_dir>/conf/ directory.

    2. Open the mms.conf file as root in your preferred text editor.

      Example

      sudo -H vi /opt/mongodb/mms/conf/mms.conf
      
    3

    Set the BASE_PORT value to the desired Ops Manager port.

    When changing the port, ensure that the chosen port is available for use.

    By default, Ops Manager uses port 8080. Change the BASE_PORT value to the desired port number.

    BASE_PORT=11700
    

    If you want to change the port for Ops Manager connections over TLS, update BASE_SSL_PORT.

    4

    Update the Ops Manager URL.

    1. In the Ops Manager Application, click the Admin link in the upper right corner of the page.

    2. Click the General tab and then click Ops Manager Config.

    3. Update the URL to Access Ops Manager field to use the value you specified in the Java Options registry value.

      Example

      https://opsmanager.example.com:11800
      
    4. Click Save.

    5

    Restart Ops Manager.

    Invoke the following command:

    sudo service mongodb-mms restart
    

    Invoke the following command:

    sudo service mongodb-mms restart
    

    Invoke the following command:

    sudo /etc/init.d/mongodb-mms restart
    

    You can access the Ops Manager Application from the new URL after Ops Manager restarts.

    Enable the Health Check Endpoint

    Ops Manager provides an HTTP health-check endpoint. This endpoint is accessed on port 8090 and is disabled by default. Before you enable the endpoint, make sure that another application or process isn’t using port 8090 .

    To enable the endpoint:

    1

    Open mms.conf for editing.

    Open the mms.conf file with root access. mms.conf is located in the <install_dir>/conf/ directory.

    2

    Uncomment DEBUG.PORT.

    To enable the endoint, remove the # symbol so that the line reads:

    DEBUG.PORT=8090
    

    Important

    This port is only accessible from localhost (or 127.0.0.1). The port number can be changed from 8090 to another value.

    3

    Save the changes.

    4

    Restart Ops Manager.