TS Monitor: central configuration for a server farm. Deployment from command line
- Prepare custom configuration file
- Install TS Monitor from command line and apply your custom configuration
- Import custom configuration in TS Monitor
- Using central configuration for TS Monitors on multiple servers in a farm
- Troubleshooting central config
TS Monitor, starting from version 5.2, supports quiet installation mode with no GUI with command line parameters.
Administrator has an ability to:
- apply custom settings during installation, or
- import the program’s configuration from one server and apply to other servers;
- save a .cfg file on a secure shared drive and use it as central configuration for all servers in a farm. Edit the file in Notepad and configuration changes will be applied to all servers
This helps administrators to manage TS Monitor on multiple terminal servers in a farm
Prepare custom configuration file
- Install SoftActivity TS Monitor on a server, and setup all program settings as required: what actions you’d like recorded, database connection parameters, local cache file, list of monitored users, etc.
- Open TS Monitor Configuration window, switch to Advanced tab. Click Export All Settings and select a file name. All program settings will be save in a .cfg file
- Config file has a simple ini-style format of
- Open the cfg file in Notepad for editing. You can manually change some settings if needed.
- Enter the password in cfg file that you want applied to TS Monitor on other servers as
- Enter your registration name and key provided with your license by SoftActivity, as RegKey and RegName parameters in the .cfg file.
- Keep the .cfg file in a secure place and do not put it into a shared folder accessible by other users, as it contains a password at this point
- Now you are ready to import this configuration into TS Monitor on other servers, or deploy TS Monitor with this custom configuration.
Install TS Monitor from command line and (optionally) apply your custom configuration
Run the installation package for TS Monitor with the following command line parameters:
tsmon.exe /SP- /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /LOG=install_log.txt /TYPE=ts /importcfg="C:\path\tsmonitor.cfg" /centralcfg=on
The installer accepts the following command line parameters:
/SP- /VERYSILENT /SUPPRESSMSGBOXES /NORESTART: run the installation is silent mode with no UI
/LOG=install_log.txt: create an installation log in install_log.txt file for troubleshooting (optional)
/TYPE=full|ts|appsrv. Acceptable installation type values:
full: install all components (default)
ts: TS Monitor client only, for monitoring users
appsrv: application server (installs only webapp and Postgres database components, but no client for monitoring)
/COMPONENTS= list of installed components. It’s optional and can be used instead of TYPE. Accepts any commination of these values: tsmonitor, webapp, postgres
/importcfg="C:\folder name\tsmonitor.cfg" : (optional) import and apply custom configuration from the specified cfg file.
/centralcfg=on|off. Save provided config file path in order to re-import it later on every start of the service. This allows you to keep a central config for all servers in a farm. If on, /importcfg parameter must have a valid config file name. If no value is provided, just imports the config from /importcfg file once
/NewPsw=ts_monitior_password: (required) set TS Monitor password. Will be ignored if /importcfg has been used. In this case, enter the password you want to set in the cfg file. A password of at least 6 characters is requires unless you are importing it from a configuration file
/DIR="C:\Program Files\Destination folder": destination folder for the installation (optional). By default, installed in C:\Program Files\SoftActivity TS Monitor
On success the installer process will return exit code 0, or 1 in case of a failed installation. Exit codes can be analysed in your custom scripts or .bat files.
To view detailed installation errors, open
install_log.txt file and search for “error”.
Example of silent installation from command line with all default settings, without importing config:
tsmon.exe /SP- /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /newpsw=my_tsmonitor_password
Import custom configuration in TS Monitor
Administrator has an ability to import custom configuration file in an existing installation of TS Monitor and apply custom settings. This is done from command line with no GUI with an ability to automate from scripts.
To import .cfg file run from Command Prompt As Admin:
"%ProgramFiles%\SoftActivity TS Monitor\tsmcfg.exe" /importcfg="C:\path\tsmonitor.cfg" /centralcfg=on /log
/importcfg parameter accepts the file name of the configuration file to be imported.
/centralcfg=on|off. Save provided config file path in order to re-import it later with every start of the service. This allows to have central config file for all servers in a farm. If on, /importcfg parameter must have a valid config file name. off – disables central config file feature on this server. If no value is provided, just imports the config from /importcfg file once
/log – optional parameter that allows to record a debug log for troubleshooting purposes
This command will apply settings specified in the cfg file and restart the program’s services.
On success this command will return exit code 0, or 1 in case of an error. Exit codes can be analyzed in scripts or bat files.
In case of an import error, more details can be seen in debug log located in
Using central configuration for TS Monitors on multiple servers in a farm
- Install SoftActivity webapp and PostgreSQL database on an application server machine as described in Installation Guide
- Install TS Monitor client on one of the terminal servers (SERVER1) and point it to the above database server, setup all settings as desired. Important: you must have a license for each of the servers.
- Export configuration to a .cfg file on this server, as described above under “Prepare custom configuration file” step. Place it in a shared folder with Read NTFS permissions for SERVER$ accounts. Domain users should not have access to this folder.
- Deploy TS Monitor on other terminal servers in the farm from a command line and specify your .cfg file via
/centralcfg=onparameters. This .cfg file will be used as your central config file for all servers. Use
/TYPE=ts, since you only need TS Monitor client on each terminal server and not the webapp and database components.
- Point TS Monitor on SERVER1 to the same central .cfg file as described above under “Import custom configuration” using tsmcfg command line
- Once TS Monitor client deployed to all terminal servers, open the .cfg file in Notepad and remove the lines with passwords for better security:
WebappDBpassword=. The passwords are only needed once for initial installation.
- You can edit the central .cfg file when you need to change any TS Monitor settings. The settings will be applied on each server once
SalogSrvTsmservices restarts. The service will load and apply new configuration from your central cfg file. The services restart automatically once per day. Administrator can restart the services anytime to apply new settings.
- You can see the current path to central config file on the servers in registry under this key:
- Note: Once you enable central config file on a server, these settings will have a priority over the settings you change in TS Monitor configuration utility. Even if you change the settings in TS Monitor config utility, they will not be applied.
Troubleshooting central config:
- Restart TsmSvc service with /log parameter:
sc stop TsmSvc sc start TsmSvc /log
- Check the debug log: C:\ProgramData\SoftActivity\tsmsvc_dbg.txt for errors. It should say that central config file has been loaded
- Do the same with
SalogSrvTsmservice and check
- Check NTFS and sharing permissions of the folder that contains the central .cfg file
- If central config file becomes unavailable, TS Monitor will continue to function with the last configuration that was applied