SoftActivity

TS Monitor: central configuration for a server farm. Deployment from command line

Contents

  1. Prepare custom configuration file
  2. Install TS Monitor from command line and apply your custom configuration
  3. Import custom configuration in TS Monitor
  4. Using central configuration for TS Monitors on multiple servers in a farm
  5. Troubleshooting central config

TS Monitor supports quiet installation mode with no GUI with command line parameters.
Administrators have an ability to:

  • deploy it in RDS farm on multiple servers in silent mode
  • apply custom settings during installation, or
  • export the TS Monitor 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

  1. 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.
  2. 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
  3. Config file has a simple ini-style format of parameter=value
  4. Open the cfg file in Notepad for editing. You can manually change some settings if needed.
  5. Enter the password in the cfg file that you want applied to TS Monitor on other servers as TSMonPassword=password
  6. Enter your registration name and key provided with your license by SoftActivity, as RegKey and RegName parameters in the .cfg file.
  7. 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.
  8. 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:

tsmon64.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 combination 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 10 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

/account="DOMAIN\SoftActMSA$” : Allows to specify service account for SoftActivity services. By default it will use built in accounts. Used in RDS farm setup.

On success the installer process will return exit code 0, or 1 in case of a failed installation. Exit codes can be checked 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, and with installation log file:

tsmon64.exe /SP- /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /LOG=install_log.txt /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

, where
/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 C:\ProgramData\SoftActivity\tsmcfg_dbg.txt

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 /importcfg and /centralcfg=on parameters. 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: TSMonPassword= and 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 TsmSvc and SalogSrvTsm services 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: HKEY_LOCAL_MACHINE\SOFTWARE\SoftActivity\TSM: cfg
  • 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 the central config setup:

  • 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 SalogSrvTsm service and check salogsrvtsm_dbg_sa.txt debug log
  • 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