HOW TO: Add a Secondary RockSolid Agent to a Monitoring Host RockSolid Agent Installation (SaaS/Perpetual)

In production a single RockSolidAgent service should run within a given OSE environment.  This ensures resources aren't conflicted when monitoring SQL Server instances in near real time.  However, within test environments it may be more efficient use of resources for more than one RockSolidAgent to run within an OSE.  This is only suited for environments where a very small number of instances are being monitored.

The installation of multiple RockSolidAgent services on a single host is not supported by the RockSolid installer so this process needs to be done manually, as described below.  However this article assumes you have already one RockSolidAgent installed using the proper installation method described here.

Installing a Secondary RockSolidAgent

1. Find the application directory of the existing RockSolidAgent service.  To do this, check the properties of the RockSolidAgent service in the Windows Services application.  Commonly this will be similar to "C:\Program Files (x86)\RockSolid SQL\Rock Solid Agent\"

2. Navigate and find this folder in the file system.  Copy the entire folder and paste it in the same parent directory.  Rename this folder to RockSolidAgentB, e.g. "C:\Program Files (x86)\RockSolid SQL\Rock Solid Agent B\"

3. To manually create the new windows service, you need to run the windows sc command. This has the format:

sc create <ServiceName> binpath=<PathToServiceEXE>

Please note spacing is very important.  You must have a space AFTER the binpath= parameter of you will receive an error.

In this example to create the RockSolidAgentB service use the following command from the Windows Command Line:

sc create RockSolidAgentB binpath= "C:\Program Files (x86)\RockSolid SQL\Rock Solid Agent B\RockSolidAgent.exe"

4. Now go into Windows Services and refresh the screen.  Configure the RockSolidAgent service to automatically start, and also configure the relevant Windows domain account that will be used to monitor the SQL Server environment.  More details can be found on this in the RockSolid Agent installation instructions.

5. Do NOT start the new RockSolidAgent service yet.

Configuring the Secondary RockSolidAgent Service

As the host name is used to validate the RockSolidAgent host, and we now have two agents sharing the same host we need to create a fictional host name for this agent.  The easiest way to do this is to take the actual host name of the RockSolidAgent host and add the corresponding agent suffix, such as the letter B in the example above.  The only important consideration in doing this is to ensure that the fictional host name is different from the host names of any other RockSolidAgent configured within the console.

1. Once you have decided the fictional host name navigate to the RockSolidAgentB service directory and locate the RockSolidAgent.exe.config file and open this in Notepad.

2. Add the following line to the configuration file ensuring that you add this BETWEEN the <appsettings> open and close XML tags:

<add key="AltHostName" value="YourFictionalHostName" />

For example:

<add key="AltHostName" value="<Server3B" />

3. Save the configuration file.

4. Now the Agent is configured, however before starting the agent you need to associate this agent with the relevant site in the RockSolid console.  This is a similar process as adding any RockSolidAgent in the console, however you specify the fictional host name instead of the actual host name.

Adding the Secondary RockSolidAgent in the Console

To configure the Secondary RockSolidAgent log into the RockSolid console:

  • Once logged in, go to the Sites -> RockSolid Agents menu option.
  • Choose the site in the drop down for the site where this agent will be created.  As this is a secondary agent, typically you will be creating this for a Secondary Site for testing purposes.
  • Click New Server and enter the fictional host name you configured above.
  • Click Add Agent

There is no need to download the agent configuration, as the configuration used from the primary agent is already present for the secondary agent.  

You can now start the RockSolidAgent service to begin the monitoring of SQL Server installations configured within the RockSolid software.


Have more questions? Submit a request


Please sign in to leave a comment.