Automated installation and updates on Windows
Published 28 March 2024
These instructions are only relevant for installations on Windows
Installation and updates of Redgate Monitor can be automated by using msi files and Microsoft’s System Centre Configuration Manager (SCCM), custom scripts, or any other standard way of managing upgrades in your organization.
Legal notice
Running an unattended installation means that you consent to the Redgate Monitor EULA found at https://red-gate.com/monitor/eula.
When running msi installers you need to agree to the EULA by setting a parameter I_AGREE_TO_THE_EULA=yes.
Obtaining msi installers
Website
- Download the
exeinstaller file (e.g.RedgateMonitorWebService_14.0.0.7532.exe) from https://download.red-gate.com/checkforupdates/RedgateMonitorWebService/. - Extract the
msifrom it by running:RedgateMonitorWebService_14.0.0.7532.exe/IAgreeToTheEULA extract web.msi
The latest stable version can be downloaded from https://download.red-gate.com/RedgateMonitor.exe, which can be automated with:
curl -L https://download.red-gate.com/RedgateMonitor.exe -o RedgateMonitor.exe
Base Monitor
- Get the base monitor
exeinstaller file (RedgateMonitorBaseMonitorInstaller.exe) - Extract the
msifrom it by running:RedgateMonitorBaseMonitorInstaller.exe/IAgreeToTheEULA extract base.msi
The RedgateMonitorBaseMonitorInstaller.exe can be obtained in the following ways:
- From the Website UI as described in Running the Base Monitor Installer
- From the
Downloadfolder of an installed Website,%ProgramFiles%\Red Gate\Redgate Monitor\Web\wwwroot\Downloadby default - Extracted from the
web.msi, e.g. using lessmsi utility by runninglessmsi x web.msi RedgateMonitorBaseMonitorInstaller.exe
Configuration parameters
The easiest way to obtain the configuration parameters is to copy them from the UI installer by clicking the Help me automate this link in the Summary page:
Website
INSTALLDIR
string
Installation directory
Default: %ProgramFiles%\Red Gate\Redgate Monitor\Web
Optional for new installs and upgrades.
SERVICETYPE
local | user | gmsa | IIS
Hosting method and web service account type:
local- Self-hosted with a Windows Service using Kestrel running as LocalService (renamed fromnetworkin Redgate Monitor ver. 12.1.17)user- Self-hosted with a Windows Service using Kestrel running as a specified user account - seeSERVICEUSERNAMEandSERVICEPASSWORDgmsa- Self-hosted with a Windows Service using Kestrel running as a gMSA account - seeSERVICEUSERNAMEIIS- Hosted on IIS
Default: local
Optional for new installs. Must be set for upgrades if default is not used.
SERVICEUSERNAME
string
User to run Windows Service as.
Default: (not set)
For SERVICETYPE=user|gmsa only.
SERVICEPASSWORD
string
Password for the Windows Service user.
Default: (not set)
For SERVICETYPE=user only.
SERVICEPORTNUM
int
Port for accessing the Website when self-hosted.
Default: 8080
Optional for new installs. Must be set for upgrades if default is not used.
WEBSITE
string
Installation directory for Website
Default: (none)
Must be set if SERVICETYPE=IIS. Must be set for upgrades if default is not used.
SERVICERPCHOSTNAME
string
Network name of the host where base monitor is installed
For collocated Website and Base Monitor localhost can be provided. Stored in BaseLocation.config.
Default: (none)
Optional for new installs. Redgate Monitor will prompt for an address on first run if not set.
Optional for upgrades. Use PRESERVECONFIG=yes to keep existing settings for upgrades.
SERVICERPCPORTNUM
int
TCP port for communication with base monitor
Default: (none)
Optional for new installs. Redgate Monitor will prompt for an address on first run if not set.
Optional for upgrades. Use PRESERVECONFIG=yes to keep existing settings for upgrades.
PRESERVECONFIG
yes | no
Whether the BaseLocation.config file should be preserved on update
Default: no
BaseLocation.config is stored in %ProgramData%\Red Gate\Redgate Monitor\BaseLocation.config.
I_AGREE_TO_THE_EULA
yes | 1
Providing this parameter means that you consent to Redgate's Redgate Monitor EULA found at https://red-gate.com/redgatemonitor/eula.
Default: (none)
Mandatory.
Base Monitor
INSTALLDIR
string
Installation directory
Default: %ProgramFiles%\Red Gate\Redgate Monitor\BaseMonitor
Optional for new installs and upgrades.
DATACONNECTION
string
Connection string for base monitor.
Saved to %ProgramData%\Red Gate\Redgate Monitor\RedGate.RedgateMonitor.Engine.Alerting.Base.Service.exe.settings.config.Cleared on uninstall.
Mandatory
REPOSITORYTYPE
SQLSERVER | POSTGRES
Defines the type of instance backing the data repository; the type of database referred to by the DATACONNECTION parameter.
Default: SQLSERVER
Optional for new installs and upgrades.
SERVICETYPE
user | local | gmsa
Defines how Windows Service should be configured.
Default: local
Mandatory
SERVICEDOMAIN
string
Domain that a user to run Windows Service as belongs to.
Default: (not set)
For SERVICETYPE=user|gmsa only.
SERVICEUSERNAME
string
User to run Windows Service as.
Default: (not set)
For SERVICETYPE=user|gmsa only.
SERVICEPASSWORD
string
Password for the Windows Service user.
Default: (not set)
For SERVICETYPE=user only.
SERVICERPCPORTNUM
int
TCP port for communication with base monitor.
Default: 7399
Should be the same as used in the Website installer, or set in BaseLocation.config (manually or using the Web UI to register a new base monitor).
I_AGREE_TO_THE_EULA
string
Providing this parameter means that you consent to Redgate's Redgate Monitor EULA found at https://red-gate.com/redgatemonitor/eula.
Mandatory
Executing the installation
You can run the msi directly or run it with msiexec.exe, providing additional parameters if needed, e.g. msiexec.exe /i base.msi /qn /norestart DATACONNECTION="..."
Website Installation and Update
Both installation and update of the website use the same command-line options.
Example: Installing the website (self-hosted) using the Windows command prompt:
.\web.msi I_AGREE_TO_THE_EULA=yes
Example: Installing the website (self-hosted) using PowerShell:
.\web.msi I_AGREE_TO_THE_EULA=yes
Example: Installing the website (IIS) using the Windows command prompt:
.\web.msi I_AGREE_TO_THE_EULA=yes SERVICETYPE=IIS WEBSITE="C:\Program Files\Red Gate\Redgate Monitor\Web\"
Example: Installing the website (IIS) using PowerShell
Start-Process ".\web.msi" -ArgumentList @"
I_AGREE_TO_THE_EULA=yes SERVICETYPE=IIS WEBSITE="C:\Program Files\Red Gate\Redgate Monitor\Web\"
"@
Base Monitor Installation and Update
Both installation and update of the base monitor use the same command-line options.
Example: Installing the base monitor using the Windows command prompt:
.\base.msi I_AGREE_TO_THE_EULA=yes SERVICETYPE=user SERVICEDOMAIN=my-domain SERVICEUSERNAME=my.user SERVICEPASSWORD=ThisIsSecret DATACONNECTION="Server=.;Database=RedgateMonitor;Trusted_Connection=True"
Example: Installing the base monitor using PowerShell:
Start-Process ".\base.msi" -ArgumentList @"
I_AGREE_TO_THE_EULA=yes SERVICETYPE=user SERVICEDOMAIN=my-domain SERVICEUSERNAME=my.user SERVICEPASSWORD=ThisIsSecret DATACONNECTION="Server=.;Database=RedgateMonitor;Trusted_Connection=True"
"@
