Supervision Server (SVS)

image_pdfimage_print

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

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

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.

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:

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:

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

  • User login (including authentication/authorization against third-party systems)
  • User logout

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

  • Change of a cell value
  • Drill through events

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”.

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.

log_file

Defines the path and the name of the log file.

log_stderr

Defines whether the SVS writes PHP error messages to the log file
Parameter 1: messages will be written
Parameter 0: messages will not be written

svs_verbose

Determines the amount of the SVS messages
Parameters: info, debug
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.

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: 
image_pdfimage_print