Perfion Connector App Setup

Perfion Connector App allows to control Ucommerce Connector installed as Windows service and also to monitor its logs.

Overview

Perfion Connector App depends on other services. The overview of all services involved in Perfion Connector App setup is shown in Figure 4.

Figure 4: PerfionConnector App setup

The Perfion Connector App itself is independent, but without other services it will be useless. It will not show any data and will not allow to control Ucommerce Connector. The table below shows app’s functionality dependency on various services:

Perfion Connector App function

Ucommerce Connector as Windows service

Ucommerce Connector as console app

Ucommerce Connector Controller Web Service

Log monitoring

Optional *

Optional *

-

Log cleanup

-

-

-

Connector status

Required

-

Required

Connector control

Required

-

Required

The app can read logs from Ucommerce database independently from Ucommerce Connector status. However, only Ucommerce Connector can generate logs, so there will be no logs until Ucommerce Connector runs at least one time. Ucommerce Connector must be configured to log to Ucommerce database in order to be able to monitor its logs via Perfion Connector App.

NOTE: Ucommerce Connector Windows service and Ucommerce Connector Controller web service must run in the same PC and should be setup to have the same user access rights.

Ucommerce Connector as Windows Service Setup

The setup of Ucommerce Connector as Windows service is the same as it is described in Ucommerce Connector Setup. The only extra requirement is that service’s configuration file parameter “LogToUcDb” must be enabled.

Ucommerce Connector as Console Application Setup

The setup of Ucommerce Connector as console application is the same as it is described in Ucommerce Connector Setup. The only extra requirement is that service’s configuration file parameter “LogToUcDb” must be enabled.

The Ucommerce Connector as console application cannot be controlled by Perfion Connector App. It can only log messages to Ucommerce database, but control of the console application is manual.

Ucommerce Connector Controller Web Service Setup

Ucommerce Connector Controller web service installation procedure:

  • Web service installation files are included in Ucommerce Connector package in “WebService” directory.

  • Open Microsoft Internet Information Services Manager (IIS) and create a new site.

  • Use “WebService” directory as site’s physical path.

  • Use “perfionremotecontroller” as site’s host name and use port 80.

  • Open site’s application pool and check that it runs .NET CLR version higher than v4.0 and make sure that its identity is set so that it has permission to control Ucommerce Connector Windows service. In most cases using “LocalSystem” identity should work. Identity can be changed from application pool’s advanced settings.

  • Open web service’s configuration file (WebService/Web.config) and make sure that parameter “ConnectorServiceName” in configuration->appSettings section is set to correct value. The value should be Ucommerce Connector Windows service name. One can find the name of the service by opening Windows Services application and opening properties window for Ucommerce Connector service as shown in Figure 5.

Figure 5: Ucommerce Connector Windows service properties
  • Add web service’s host name “perfionremotecontroller” to Windows host file. The typical location of Windows host file is: "C:\Windows\System32\drivers\etc\hosts". Open the host file in a text editor using administrator user privileges and add a line at the end “127.0.0.1 perfionremotecontroller”. This allows accessing the site using “perfionremotecontroller” host name directly from web browser and is also how Perfion Connector App is set up to access this web service. Save and close the host file.

  • Test web service in a web browser. Open a web browser and enter this address: “http://perfionremotecontroller/Connector.asmx”. The browser should open a page which looks like one shown in Figure 6.

  • At this point the setup for web service is done. One can test it further by selecting web service’s exposed methods and invoking them directly from web browser’s page. After invoking action, e.g. “StartService” the Ucommerce Connector Windows service should start. The status of Windows service will change in Windows Service application.

 

Perfion Connector App Installation

Perfion Connector App can be installed from Ucommerce back-end. The app has only 1 installation file which is NuGet installation package file and it is included in Ucommerce Connector package. App installation procedure:

  • Open Ucommerce back-end as shown in Figure 7.

  • Go to Settings -> Apps -> Install App. The new page will open on the right side as shown in the Figure 7.

  • Click a button “Choose File” and select the Perfion Connector App installation file PerfionConnectorApp /Perfion.Connector.xxx.nupkg, where xxx is version number. The file is located in Ucommerce Connector package.

  • Click “Upload” button.

  • A new page will open which will show some information about Perfion Connector App and there will be a button “Install”. Click that button to install the app.

  • After installation the Perfion Connector App will be available in “Apps” section in Ucommerce back-end as shown in Figure 7. It will also be available in Settings -> Installed Apps section where one can check its version, read description, access documentation and also uninstall it. Refer to Figure 8.

Perfion Connector App Update

To update the Perfion Connector App uninstall it and then install a new version. The app has no configuration, so it is ready as soon as it is installed.

Perfion Connector App Removal

To remove the Perfion Connector App one have to uninstall it by going to Ucommerce back-end Settings -> Installed Apps section, opening the Perfion Connector App and clicking “Uninstall” button. Refer to Figure 8.

Perfion Connector App Usage

The app can be opened from “Apps” section in Ucommerce back-end. On the right side a new page will be loaded.

Controlling Ucommerce Connector

To control Ucommerce Connector Windows service select the “Status” tab.

In the upper part of the page one can control Ucommerce Connector. It will show the current status of Ucommerce Connector Windows service. Note, the status is not automatically updated, so to get the latest status one must click “Update Status” button. Refer to Figure 9. User have the following options:

  • Status – Shows what the current status of Ucommerce Connector service is. It does not show data synchronization status, but if Ucommerce Connector Windows service is running or not. To see the actual synchronization status one must monitor the log messages where Ucommerce synchronization manager reports its progress.

  • Start button – Sends a command to Ucommerce Connector to start. Note, this is Ucommerce Connector Windows service control, but not data synchronization control. By default Ucommerce Connector will start synchronization when the service starts, but if it is already running, then pressing this button will not affect the already running service in any way. In order to start data synchronization one can stop the service first and then start it again. When the service is running, then Ucommerce Connector is in manager mode, which automatically controls when the next data synchronization should start based on setup in Perfion.

  • Stop button – Sends a command to Ucommerce Connector to stop. This is Ucommerce Connector Windows service control, so stopping the service will stop Ucommerce synchronization manager. The Ucommerce synchronization manager will initiate service stop procedure. It will try to stop all currently running processes before stopping.

  • Update Status button – Sends a command to Ucommerce Connector and request to report its status. This is Ucommerce Connector Windows service control. There can be several intermediate states reported when the service is starting or trying to stop, but in general there are only 2 important states: Stopped and Running. Refer to Figure 9 and Figure 10 to see the Ucommerce Connector service in stopped and running statuses.

Monitoring Logs

To monitor logs select the “Status” tab.

In the lower part of the page one can see the table with all logs from Ucommerce Connector. It will show logs ordered by log message time in descending order (newest log message first). By default log will show only logs for “Progress” log level, which shows “Error”, “Warning” and “Progress” type log messages.

The quantity of log messages and their types depends on log level set up for Ucommerce Connector in its configuration file. This means that if the Connector logs only “Error” type messages, then no other type of messages will be saved and in the app one will be able to review “Error” type messages. In order to always have all type of messages available in the app, one must set “Debug” log level in Connector’s configuration file, however, logging using “Debug” level may affect Connector performance. Another important factor to consider is the data sent via Connector from Perfion to Ucommerce. If there are any sensitive data which should not be exposed to users without sufficient access rights, then debug type messages should be avoided, because debug messages logs all requests and response sent to/from Perfion API. To see which message types are logged for each log level look up “LogType” parameter in Ucommerce Connector Configuration File.

The Perfion Connector App allows filtering of log messages and here one can choose from 3 parameters:

  • Date from. It is optional parameter, which allows to limit from which date the log messages should be shown. The date can be entered in "yyyy-MM-dd HH:mm:ss.fff” format. Some examples: “2019-05-26”, “2019-05-26 10:00:00”, “2019-05-26 10:00:00.123”, etc.

  • Date to. It is optional parameter, which allows to limit to which date the log messages should be shown. It has the same requirements like the “Date from” parameter.

  • Log level. It specifies the log level for filtering. It works in the same way like the “LogType” parameter in Ucommerce Connector configuration file (refer to Ucommerce Connector Configuration File). The filtering using log level allows to choose the desired log level and to minimize the number of messages shown in the table. It is especially useful if “Debug” log level is activated in Connector and then by selecting another level one can reduce the number of messages, e.g. to show only “Warning” and “Error” type messages by choosing “Warning” log level.

The Figure 10 shows log messages filtered by dates and log level.

Note, the log entries list does not update automatically and one has to click “Filter” button to refresh the content.

Cleaning Log

To cleanup logs select the “Cleanup” tab.

To delete the old log messages enter the number of days you want to keep in the log and click “Delete” button. It will delete all log messages older then selected days. To delete all log messages enter “0” and click “Delete” button.