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.
- Functional Description of the Jedox Supervision Server
- Supervision Server Handlers
- Specific Functions of Jedox Supervision Server
- Supervision Server Samples
- Supervision Server for Drill Down and Drill Through
- SVS Cube Supervisor
- SVS Login Supervisor
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 after the selection of 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 the following 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 <path_to_SVS>||Option “w”|
|additional login supervision||workerlogin <Option>||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:
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:
|IP or name of the host that runs Jedox OLAP server, e.g. “localhost”.|
|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.
|Defines the path and the name of the log file.|
|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
|Determines the amount of the SVS messages
Parameters: info, debug
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:
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.
Supervision Server Script Editor
You can call the Supervision Server script editor for both Jedox Web and Excel Add-In.
In Jedox Web, click on the gear icon in Modeler. Select SVS Script editor…
The SVS Script editor opens, listing all the available scripts:
After choosing a script, you can make changes to it and save it, as well as undo and redo actions, and cut, copy, paste and search content. Additionally, you can restart the Supervision Server from the editor and save the changes all at once.
In Excel Add-in, you can access the Supervision Server Script editor from Modeler > Supervision Script Editor.
The editor allows you to select the connection and see all the available scripts, search their content, and save the files separately or all at once. Additionally, you can restart SVS.
Note: This option is to be deprecated in future Jedox versions.
In the Excel Add-in, you can also access the SVS editor from the Modeler window. To do this, open the Modeler window, click the gear icon and select SVS script editor…. The Jedox Web SVS script editor opens.