Skip to main content

import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';

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

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

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

  1. Copy SMAWebServicesConnector-linux.zip to a directory on the server.

  2. Unzip the file and extract the contents to a directory on the server.

  3. Create a config directory off the root installation directory and copy Connector.config into it.

  4. Set execute options on SMAWSConnector.sh and /java/bin/java:

    chmod +x SMAWSConnector.sh
    chmod +x java/bin/java

The image is published to Docker Hub in the smatechnologies repository and contains a Linux SMA Agent and the connector Linux implementation.

To pull the image, reference it from your Docker Compose or Kubernetes yaml:

containers:
- image: smatechnologies/connector-webservices:latest

To deploy the connector in an OpCon Kubernetes cluster, use the following yaml:

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: ws-config
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Mi
---
apiVersion: apps/v1
kind: ReplicaSet
metadata:
name: ws-connector
spec:
replicas: 1
selector:
matchExpressions:
- key: app
operator: In
values:
- wsconnectorservices
template:
metadata:
labels:
app: wsconnectorservices
spec:
containers:
- image: smaengineering/connector-webservices:latest
name: ws-connector
ports:
- containerPort: 3100
protocol: TCP
- containerPort: 3110
protocol: TCP
volumeMounts:
- name: ws-config
mountPath: /app/config
hostname: ws-connector
volumes:
- name: ws-config
persistentVolumeClaim:
claimName: ws-config
---
apiVersion: v1
kind: Service
metadata:
name: ws-connector
spec:
type: LoadBalancer
ports:
- name: wswork
port: 3100
targetPort: 3100
- name: wsjors
port: 3110
targetPort: 3110
selector:
app: wsconnectorservices

After deployment, run kubectl get svc to display the load balancer address for the ws-connector POD:

NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.0.0.1 <none> 443/TCP 22d
opcon LoadBalancer 10.0.199.201 52.171.228.74 9010:331702/TCP 66s
ws-connector LoadBalancer 10.0.34.38 52.171.228.113 3100:30641/TCP,3110:31161/TCP 66s

Log in to the OpCon instance and create the UNIX machine definition for the connector container using the EXTERNAL-IP of the ws-connector POD. Remember to include the JORS port.

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.

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 debug output on or off. Set to True while defining steps to dump returned data so you can locate attribute values to extract.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.
USETLSIndicates 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

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

[PROXY]
URL=

[OPCON_API]
SERVER=BVHTEST02:9010
USESTLS=True
TOKEN=e4185480-7137-4bca-8220-0dccc555a946

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.
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
SMAWSConnector.sh --setup -username "ocadm" -password "abc" -address opcon:9010 -tls

Run from inside the container, using the EXTERNAL-IP of the OpCon container as the address:

[[WS_UNIX_PATH]]/SMAWSConnector.sh --setup -username ocadm -password abc -address 52.249.57.233: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.