Skip to main content

Installation

What is it?​

This page describes how to install and configure the Webservices Connector on Windows, Linux, or as a Docker image. It also covers installing the Web Services job sub-type plug-in for Enterprise Manager and creating the global properties the connector requires.

Installation flow​

A complete installation has four steps. Complete them in order:

  1. Install the connector binary on the host server (Windows, Linux, or Docker).
  2. Install the Job Sub-type plug-in in Enterprise Manager so you can define Web Services jobs.
  3. Create the global property that points OpCon to the connector installation.
  4. Configure the connector by editing Connector.config and running the --setup switch to register an application token with the OpCon REST API.

Before you begin​

Prerequisites​

  • An OpCon Agent is already installed on the target Linux or Windows server.
  • OpCon version 21.0.x or greater.
  • An OpCon user with the ocadm role (used during the --setup step).

:::note Linux Agent settings If you are installing on Linux, set the following Linux Agent configuration parameters before installing the connector:

ParameterValue
LSAM_0_2551
path_to_suyes
:::

Limits and caveats​

:::caution JSON payload size limits The maximum JSON payload size depends on the operating system:

OSLimitReason
Linux2000 charactersLinux parameter field size
Windows4000 charactersWindows command-line field size
:::

:::caution Backslashes in OpCon properties When an OpCon property is referenced inside a JSON definition, OpCon resolves the property at run time without escaping backslashes. An unescaped backslash (for example, in \\server\directory) breaks JSON parsing.

Workarounds:

  • Escape the backslash in the property value (\\).
  • Use an Environment Variable instead (Environment Variables are not subject to JSON parsing). :::

:::note Other restrictions

  • Java is bundled — the connector ships with an embedded AdoptOpenJRE 11. No separate Java install is required.
  • Response data parsing is supported only for application/json and application/xml.
  • To use Environment Variables, the supporting Windows or UNIX Agent must support that feature. :::

Step 1: Install the connector binary​

To install the connector on Windows, complete the following steps:

  1. Copy SMAWebServicesConnector-win.zip to a directory on the server.
  2. Unzip the file and extract the contents to a directory on the server.

After the extraction is complete, the installation root directory contains:

PathContents
SMAWSConnector.exeThe connector executable.
config\Holds Connector.config.
java\The embedded Java runtime.
emplugins\The Enterprise Manager plug-in for the Web Services job sub-type.
templates\A basic job template.

Step 2: Install the Job Sub-type plug-in​

To install the Web Services job sub-type plug-in in Enterprise Manager, complete the following steps:

  1. Copy the plug-in from the connector installation /emplugins directory into the dropins directory of the Enterprise Manager installation.

    note

    If the dropins directory does not exist, create it off the Enterprise Manager root directory.

  2. Restart Enterprise Manager.

A new Windows or UNIX job sub-type called Web Services is now visible.

:::tip Plug-in not visible? Restart Enterprise Manager using Run as Administrator. After this, Enterprise Manager can be used normally. :::

Step 3: Create the global property​

Create a global property in OpCon that points to the root installation directory of the connector. The property name depends on the install type:

InstallationProperty nameValue
WindowsWS_PATHroot installation directory
LinuxWS_UNIX_PATHroot installation directory
DockerWS_UNIX_PATH/app

Step 4: Configure the connector​

Configuration consists of two tasks:

  1. Review or edit the Connector.config file (see Connector.config file).
  2. Register an application token with the OpCon REST API by running the connector with the --setup switch (see OpCon REST API setup).

Connector.config file​

The Connector.config file lives in the following location for each install type:

InstallationLocation
Windowsroot installation directory\config\Connector.config
Linuxroot installation directory/config/Connector.config
Docker/app/config/Connector.config

The file is divided into three sections — [GENERAL], [PROXY], and [OPCON_API].

[GENERAL] section​

PropertyDescriptionDefault
DATA_DIRECTORYA default data directory used by the connector for storing created templates. On Windows, escape backslashes (\\).—
USES_PROXYIndicates whether the connector uses a proxy server.False
UPDATE_PROPERTIES_ON_FAILUREIndicates whether the connector should update OpCon properties when a task fails.False
DEBUGTurns the connector's diagnostic output on or off. Set to True while defining steps to see how it resolved variables and locate attribute values to extract. Job output contains the request and response either way — refer to Operation.False

[PROXY] section​

Required only if USES_PROXY is True.

PropertyDescription
URLFull proxy server URL (for example, http://proxy server:port).

[OPCON_API] section​

Defines the connection to the OpCon REST API. The values in this section are populated for you by the --setup switch — you do not edit them by hand.

PropertyDescription
SERVERThe address of the host OpCon server.
USESTLSIndicates whether the OpCon REST API server uses TLS.
TOKENThe application-level token. The --setup switch creates a CONNECTORS application token and writes it here.

Example Connector.config​

The [OPCON_API] values below are placeholders. The --setup switch writes the real server address and token for you — refer to OpCon REST API setup.

[GENERAL]
DATA_DIRECTORY=c:\\connectors\\wsrest\\data
USES_PROXY=False
UPDATE_PROPERTIES_ON_FAILURE=False
DEBUG=False

[PROXY]
URL=

[OPCON_API]
SERVER=opcon-server:9010
USESTLS=True
TOKEN=00000000-0000-0000-0000-000000000000

OpCon REST API setup​

The connector connects to the OpCon host through the OpCon REST API to retrieve @JCorrelationid values, set the incident value in daily jobs, and insert or update properties. It uses an application-level token for these calls.

The --setup switch automates the token creation and writes the connection details into the [OPCON_API] section of Connector.config.

Command syntax​

SMAWSConnector.exe --setup -username <user> -password <password> -address <server>:<port> [-tls]
ArgumentDescription
--setupCreates a CONNECTORS application token and updates Connector.config.
-usernameName of an OpCon user that has the ocadm role. Enclose in quotes if it contains special characters.
-passwordPassword of the user. Enclose in quotes if it contains special characters.
-addressAddress and port of the OpCon REST API web server.
-tlsUse TLS to connect.

:::caution TLS requirement From OpCon version 20 onward, only TLS connections are supported. Always include the -tls argument. :::

Examples​

SMAWSConnector.exe --setup -username "ocadm" -password "abc" -address opcon:9010 -tls

FAQs​

Where can the connector be installed? On any Linux or Windows server where an OpCon Agent is installed, or as a Docker image from Docker Hub in the smatechnologies repository.

Which OpCon version is required? OpCon version 21.0.x or greater.

What size limits apply to JSON data? 2000 characters on Linux and 4000 characters on Windows, due to OS command-line and parameter field size limits.

Why might a backslash in a property cause a JSON parse error? When using properties within a JSON definition, OpCon inserts the property value at run time and does not escape backslashes. If the value contains an unescaped backslash, JSON parsing fails when the connector starts. Either escape the backslash (\\) in the property value or use an Environment Variable instead.

How do I create the application token used by the connector? Run SMAWSConnector.exe (Windows) or SMAWSConnector.sh (Linux) with the --setup switch, passing an OpCon user that holds the ocadm role. The connector creates a CONNECTORS application token and writes it to Connector.config.

Which global property points to the connector installation directory?

  • Windows: WS_PATH
  • Linux: WS_UNIX_PATH
  • Docker: WS_UNIX_PATH set to /app

Glossary​

TermDefinition
SMAWSConnectorThe Webservices Connector executable (SMAWSConnector.exe on Windows, SMAWSConnector.sh on Linux).
Connector.configThe configuration file that defines the data directory, proxy settings, and OpCon REST API connection used by the connector.
Web Services job sub-typeThe Enterprise Manager job sub-type, installed by the connector plug-in, used to define Webservices Connector jobs.
--setup switchCommand-line switch that creates the CONNECTORS application token and writes the OpCon host address, TLS, and token values to Connector.config.
WS_PATHGlobal property pointing to the connector root installation directory on Windows.
WS_UNIX_PATHGlobal property pointing to the connector root installation directory on Linux or Docker.
dropinsEnterprise Manager directory used to load the Web Services job sub-type plug-in.
AdoptOpenJRE 11The embedded Java runtime supplied with the connector installation.