Supervision Server (SVS)

Supervision Server (SVS) is a Jedox component that monitors events in the Jedox In-Memory DB and responds via a PHP script for the defined events. Different types of interactions result in the execution of different bits of PHP code.

By default, Supervision Server is installed with Jedox in both Windows and Linux setups.

Jedox uses PHP version 7. Custom scripts written for PHP 5 may require modifications, depending on their complexity. Sample scripts shipped by Jedox (e.g. for Drillthrough) do not require any changes. A list of required changes is available in the PHP documentation https://www.php.net/manual/en/migration70.php.

Starting, stopping, and restarting the Supervision Server

SVS will be installed and started by default.

You can stop, start, and restart SVS without stopping JedoxSuiteMolapService. These functions are available in Jedox Web > Administration > Connections when you select an active Jedox OLAP Server connection in the SVS Management tab.

Jedox administration section screenshot

Stopping disables SVS until either SVS is restarted with the option Start SVS or until JedoxSuiteMolapService is restarted.

Starting the instruction options for Supervision Server

You can switch on the different branches (known as "workers") of the SVS program by entering instructions in the palo.ini or when starting from the command line.

The following instruction is mandatory:

Copy
worker "install_path\svs\SupervisionServer.exe"

It starts the System Supervisor, which reacts as the standard worker during the following events:

  • Jedox OLAP server shutdown
  • Termination of the Supervision Server process itself
  • Database save

The following instructions are optional:

Copy
workerlogin information

It starts the Login Supervisor, which reacts during the following events:

  • User login (including authentication/authorization against third-party systems)
  • User logout
  • Copy
    use-cube-worker

It starts the Cube Supervisor, which reacts during the following events:

  • Change of a cell value
  • Drill through events
  • Copy
    use-dimension-worker

It starts the Dimensions Supervisor, which reacts during the following events:

  • Creation of an element in a specified dimension
  • Deletion of an element in a specified dimension
  • Renaming of an element in a specified dimension

Overview of SVS Worker Instructions

SVS Worker Options entry in the palo.ini Statement on the command level
switches on standard worker worker Option “w”
additional login supervision workerlogin Option “x”
additional cube supervision use-cube-worker Option “Y”
additional dimension supervision use-dimension-worker Option “W”

There are two PHP scripts in the installation folder of the SVS: main.php and sep.inc.php.
The file main.php is necessary and should not be changed.
In the file sep.inc.php, events can be defined or you can reference added scripts with instructions on how the SVS should react to the different events.

By default the file sep.inc.php has the following entry:

<?php
include './sample_scripts/sep.inc.default.php';
?>

In the file sep.inc.default.php basic responses are given to all possible events. For activation, however, they must be programmed with an appropriate PHP code. Make sure you work with only one include file.

In an editor, you can check the entries of such a SVS script file and adjust them, if appropriate. Please enter then this file as an include statement in the file sep.inc.php.

The SVS will be started by restarting of the JedoxSuiteMolapService with the corresponding palo.ini instructions. After the successful start the process "Supervision Server" appears in the Task Manager of Windows.

PHP initialization file

The Supervision Server uses an embedded PHP interpreter. For basic usage, there is no need to install PHP on your system, unless you want to use other PHP APIs in addition to the PHP API provided with Jedox.

The php.ini is used to configure the embedded interpreter and to pass configuration information to the Supervision Server. The following options are related to the Supervision Server:

Option Parameter

palo_server_hostname

IP or name of the host that runs Jedox OLAP server, e.g. “localhost”.

(Default value is localhost)

palo_server_port

Port that the Supervision Server can use to access Jedox OLAP Server.
It has to match the “admin” port of the Jedox OLAP server configuration. (Default value is 7778)
etl_service_url IP address/port for Integrator server. Defining the etl_service_url enables the use of a variable, rather than hard-coded address, if an SVS script establishes a connection to Jedox Integrator. Note: this parameter is only available in Jedox 2020.2 and later.
Example: etl_service_url=”http://127.0.0.1:7775″

log_file

Defines the path and the name of the log file. (Default value is SVS.log)

log_stderr

Defines whether the SVS writes PHP error messages to the log file
Parameter 1: messages will be written (Default value is 1)
Parameter 0: messages will not be written

svs_verbose

Determines the amount of the SVS messages
Parameters: info, debug. (Default value is info)
syslog

Logs SVS messages to syslog. Enabled in php.ini by syslog=address,port,facility. Example: syslog=pc-username,514,1

Sample /var/log/messages output:
2019-01-28T09:55:17+01:00 pc-username JedoxSVS: [43995] SupervisionServer: terminating.

(Empty by default, not defined.)

socket_timeout Network timeout. (In milliseconds) (Default value is 0)
connection_attempt_delay Delay (in seconds) before next attempt to connect after exception. (Default value is 5)
connection_attempt_count How many attempts are executed before SVS terminates. (Default value is 1)
qbr_max_rows This key is for query based rules handling, and shows the maximum number of rows that can be returned by a regular query. It prevents exhausting resources by nonsense queries. (Default value is 1000)
qbr_max_rows_list This key is for query based rules handling, and shows the maximum number of rows that can be returned by a list-type query. It prevents exhausting resources by nonsense queries. (Default value is 100000)

Parameter-passing mechanism

The PHP API functions support two different parameter-passing mechanisms.

The first one uses the signature “function(connection,database,…)” and the second one uses the signature “function(connection-resource-string,…)”. For Supervision Server scripts, the second notation must be used. The connection object is managed internally and the connection resource string has the form “SupervisionServer/$database”, where $database is the name of the database we are working with.

Debugging Supervision Server Scripts

As explained above, sep.inc.php is the only file one needs to modify.

The Supervision Server includes a logging mechanism that can be used for debugging purposes. Use the function sep_log($string) in order to write to the log file …\Jedox\Jedox Suite\log\svs.log. In general, svs.log is a good place to look if things go wrong, because exceptions thrown by the PHP extension are monitored there.

Related articles:

Updated September 27, 2022