Admin Console
For configuration, management and monitoring purposes Webswing provides a convenient web interface.
Installation
Since Webswing 20.2, Admin Console is distributed as a standalone web server application in its own war file. To start Admin console simply run webswing&admin.bat
on Windows to start both Webswing and Admin Console. On Linux, you start Admin Console separately using admin.sh
which you can find in admin
folder in the distribution package. You can also deploy the webswing-admin-server.war
manually in a servlet container, however this has not been tested or documented yet.
To connect Webswing server with Admin Console server, you have to configure following:
- Admin Console URL in
webswing.config
file- under
"/"
path set field"adminConsoleUrl": "http://localhost:8090"
or the current URL where your Admin Console server is running
- under
- Connection secret in
webswing-admin.properties
- use the same
webswing.connection.secret
value as configured inwebswing.properties
file
- use the same
The admin
folder also contains two configuration files:
-
jetty.properties
- similar to Webswing server jetty configuration, configure host, port and SSL here -
webswing-admin.properties
- several Admin Console server properties described in a table below
Property | Description | Default value |
---|---|---|
webswing.connection.secret |
secret signing key for JWT tokens, should be at least 128 characters long string | |
webswing.server.publicUrl |
public URL on which applications are accessible on public internet | http://localhost:8080 |
webswing.websocketUrlLoader.type |
type of websocket URL loader - define how should Admin Console server get the websocket connection URL to Webswing server (use propertyFile_noReload to disable reloading) |
propertyFile |
webswing.websocketUrlLoader.interval |
websocket URL loader reloading interval in seconds | 5 |
webswing.server.websocketUrl |
comma-separated list of websocket URLs to webswing servers (use with loader type propertyFile and propertyFile_noReload ) |
ws://localhost:8080 |
webswing.websocketUrlLoader.script |
script that loads a comma-separated list of websocket URLs (use with loader type script ) |
|
webswing.logsDir |
path where admin console logs should be stored | logs/ |
By default, Admin Console server runs on http://localhost:8090
. You can either access it directly on this URL or click the Manage link in the application selector.
If you don't want to use Admin Console and want to remove the Manage link from selector, simply remove adminConsoleUrl
field from your configuration in webswing.config
.
Overview
The Overview section shows you the overview of the server configuration. You can see how many apps are configured, how many instances are running and how many users are connected.
Application configuration
You can configure your applications in Applications section. In this section you can also add/remove an application or disable/enable it. For more details on how to configure your application please refer to this page.
Statistics
In the top navigation bar you can access Sessions. Here you can see details about each session, shut down the session, or record the session. You can filter the sessions by selecting the application name on the left. In the top is aggregated data about CPU, RAM and Network consumption.
If you select Finished Sessions Tab then you can see history of all finished sessions with some useful details - username, IP address, session duration, ...
Latency
The Latency Graph consists of the following partial graphs
- Average HTTP ping latency - delay between sending a request and obtaining response (no business logic is performed on the server)
- Average Server Rendering latency - delay between sending user event to Swing app and receiving rendering event from the awt framework
- Average Client Rendering latency - delay between receiving rendering event and displaying it to user in JavaScript
- Max E2E frame based latency - latency from the user event to server + server rendering + sending the change back to user + client rendering
Customization
By default the graphs show CPU/Memory usage history of the last 10 minutes. This is due to memory requirements of the data. The defaults can be changed during startup of Webswing Server by providing specific System properties. Please note that low interval and high history size results in extended Memory and CPU usage.
webswing.stats.interval=10 (Granularity of the metrics, average of last 10 seconds is default)
webswing.stats.historySize=60 (Number of observations kept in memory, 60 by default)
webswing.stats.memUsageWarn=0.8 (Threshold to generate a memory usage warning, 80% default)
webswing.stats.latencyWarn=700 (Threshold to generate a network latency warning, 700ms default)
webswing.stats.pingWarn=500 (Threshold to generate a ping warning, 500ms default)
Mirror view
In the session detail page you can click the View button to see the copy of the user's session. The following information and features are available:
- Username of the session owner
- Statistics of current session
- Mirror view of the session
- Full control of the application
- Possibility to record the session
- Shutting down the session
- Turn on/off statistics for this session only
- Request a thread dump
Mirror and recording consent
Using mirror and recording feature by administrator may bring privacy concerns for your end-users. In that case you can enable requesting user consent before mirror view or recording starts. Simply enable Require Recording Consent
or Require Mirroring Consent
in your application configuration.
If you'd like to change the text in consent dialogs, add the following system properties to vmArgs
configuration of your application:
System property | Default text |
---|---|
webswing.recording.message | Administrator wants to record your session.\nDo you want to allow the recording? |
webswing.recording.title | Session recording |
webswing.recording.allow | Allow |
webswing.recording.deny | Deny |
webswing.mirroring.message | Administrator wants to mirror and take control of your session.\nDo you want to allow the mirroring? |
webswing.mirroring.title | Session mirroring |
webswing.mirroring.allow | Allow |
webswing.mirroring.deny | Deny |
Logs
In the top navigation bar you can access Logs. Within the logs page 3 types of logs are accessible:
- Audit - application access logs (audit.log)
- Server - server and application event logs (webswing.log)
- Session - application event logs, as configured in the application (if log per session is enabled)