This article applies to Goliath Performance Monitor 14.0 and newer.
Upgrading from 12.x? The 14.0 agent installer uses new command-line switches. Scripts that call
InstallAgent.exe /S:"<file>.ini"will open the setup window instead of installing silently. Change them to use/VERYSILENT /VARS="<file>.ini", as shown below.If your Goliath server was upgraded from 12.x, the
InstallOrUpdateAgent.batandSetupVars.iniin itsBinfolder are still the 12.x versions. Don't use them. Use the 14.0 versions below, or the files from the 14.0 agent download.
Prepare the Files
There are three files that are required for a Silent Install of the Goliath Intelligent Agent, and will need to be updated with the parameters for your environment for the silent install to be successful:
-
InstallAgent.exe: the agent installer. On the Goliath server it is at
C:\Program Files\MonitorIT\InstallAgent.exe. -
SetupVars.ini: the settings passed to the installer. On a new 14.0 server it is at
C:\Program Files\MonitorIT\Bin\SetupVars.ini. -
InstallOrUpdateAgent.bat: runs the installer silently with
SetupVars.ini. On a new 14.0 server it is atC:\Program Files\MonitorIT\Bin\InstallOrUpdateAgent.bat.
Put SetupVars.ini and InstallOrUpdateAgent.bat in the same folder. InstallAgent.exe can go in that folder or in the folder above it. You don’t need to edit any paths in the batch file.
Update SetupVars.ini
Edit SetupVars.ini with the details of your Goliath setup:
[SetupValues] %ServerIPAddress%=goliath-server.yourdomain.local %ServerPort%=443 %isGoldImage%=False
| Field | Required | What to enter |
|---|---|---|
%ServerIPAddress% |
Yes | The IP address, host name or FQDN of the Goliath server the agent reports to, or of the Master Agent if you use one. |
%ServerPort% |
Yes | The port the agent uses to talk to the server. The default is 443. |
%isGoldImage% |
No |
True only when installing on a gold image, master image or template that will be cloned. Leave it out, or set it to False, for normal machines. |
With %isGoldImage%=True, the agent service is installed and set to Automatic (Delayed Start), but not started, and the agent identity is cleared. Each clone then registers itself with the server on its first boot. Seal the image without restarting it after the install.
%AppFolder% and %AgentName% from earlier versions are ignored in 14.0 and can be removed. The agent always registers with the machine's computer name. To install somewhere other than C:\Program Files\MonitorIT, use the /DIR switch (see below).
Update InstallOrUpdateAgent.bat
In 14.0 the batch file has no paths to edit by default. It uses the SetupVars.ini in its own folder, and the InstallAgent.exe in its own folder or the folder above. Pick one of these two setups.
Option A: run the batch file from the share (no edits)
Put all three files in one share folder and run the batch file from there, for example:
\\fileserver.yourdomain.local\GoliathAgent\InstallOrUpdateAgent.bat
The setup log (InstallAgent.log) is written to the same share folder, so the account running the batch file needs read and write access to it.
The 14.0 batch file contains the following. If your copy runs InstallAgent.exe /S:..., it is the 12.x version: replace its contents with this.
@echo off Rem Installs or updates the Goliath agent with the server named in the SetupVars.ini beside this Rem file, using the InstallAgent.exe beside it or in its parent folder. The install runs Rem silently; on failure its reason is in InstallAgent.log beside this file. set "SETUP=%~dp0InstallAgent.exe" if not exist "%SETUP%" set "SETUP=%~dp0..\InstallAgent.exe" if not exist "%SETUP%" goto missing start "" /wait "%SETUP%" /VERYSILENT /SUPPRESSMSGBOXES /VARS="%~dp0SetupVars.ini" /LOG="%~dp0InstallAgent.log" if errorlevel 1 goto failed echo Agent installed. goto done :failed echo Agent install failed with exit code %ERRORLEVEL%. See "%~dp0InstallAgent.log" goto done :missing echo InstallAgent.exe was not found in "%~dp0" or its parent folder. :done Pause
Option B: copy the batch file to each machine (edit the paths)
If your deployment copies the batch file to each machine and keeps the installer and INI on a share, replace the batch file's contents with the following. Change the two share paths to your own:
@echo off set "SETUP=\\fileserver.yourdomain.local\GoliathAgent\InstallAgent.exe" set "VARS=\\fileserver.yourdomain.local\GoliathAgent\SetupVars.ini" set "LOG=%SystemRoot%\Temp\GoliathInstallAgent.log" start "" /wait "%SETUP%" /VERYSILENT /SUPPRESSMSGBOXES /VARS="%VARS%" /LOG="%LOG%" exit /b %ERRORLEVEL%
- The first path is the full path to
InstallAgent.exe. - The second path is the full path to
SetupVars.ini. - Use UNC paths with the FQDN of the file server.
With this version the log stays on the local machine, at C:\Windows\Temp\GoliathInstallAgent.log, and the batch file passes the installer's exit code back to your deployment tool.
For both options
-
Remove
Pausefor unattended runs. The stock batch file ends withPause, which waits for a key press. If it runs unattended (startup script, GPO, SCCM), delete that last line. Option B has noPause. -
Give the computers access to the share. Startup scripts and most deployment tools run as SYSTEM, which reaches the share as the computer account (
DOMAIN\MACHINE$). -
Don't reuse a 12.x batch file. One from an earlier version, or from a Goliath server upgraded from 12.x, uses the
/S:switch. 14.0 ignores it, so the setup window opens.
Install from the Command Line
You can also run the installer directly, without the batch file. Run it as an administrator.
With an INI file:
InstallAgent.exe /VERYSILENT /SUPPRESSMSGBOXES /VARS="C:\path\SetupVars.ini" /LOG="C:\path\InstallAgent.log"
Without an INI file:
InstallAgent.exe /VERYSILENT /SUPPRESSMSGBOXES /SERVERIP=goliath-server.yourdomain.local /SERVERPORT=443
| Switch | What it does |
|---|---|
/VERYSILENT |
Installs with no windows. (/SILENT shows a progress window.) |
/SUPPRESSMSGBOXES |
Never stops on a message box. |
/VARS="<file>" |
Reads the server, port and Gold Image settings from an INI file. |
/SERVERIP=<address> |
Server address. Overrides the INI value. |
/SERVERPORT=<port> |
Server port. Overrides the INI value. |
/GOLDIMAGE=1 |
Prepares a gold image (see Update SetupVars.ini). |
/DIR="<folder>" |
Install folder. The default is C:\Program Files\MonitorIT. |
/LOG="<file>" |
Writes a setup log. |
Put quotes around any path that contains spaces.
Update an Existing Agent
Run the same batch file or command on a machine that already has the agent. The installer stops the agent, replaces its files, and registers the service again with the server and port you give it.
Check the Result
The installer returns an exit code, and writes the reason for any failure to the log file:
| Exit code | Meaning |
|---|---|
| 0 | The agent was installed or updated. |
| 7 | Setup stopped before installing: the server address or port is missing or invalid. Check SetupVars.ini or the /SERVERIP and /SERVERPORT values. |
| Any other non-zero code | The install did not complete. See the log file. |
With the stock batch file, the log is InstallAgent.log in the batch file's folder. With Option B, it is C:\Windows\Temp\GoliathInstallAgent.log.
Deploy the Files
Agent Repository/Share
Store InstallAgent.exe, SetupVars.ini and InstallOrUpdateAgent.bat in a folder or share the target machines can reach. Keep SetupVars.ini in the same folder as the batch file.
Batch File Execution
- Option A: run the batch file from the share, or call it from your deployment script by its UNC path.
- Option B: deploy your edited batch file to each machine, or build its command into your deployment script.
Note: if the machine restarts after the batch file runs, refer to Silent Agent Install Causes Machine to Reboot. Goliath recommends testing the silent install on one machine before deploying to production, to confirm the behavior is what you expect.