Create a Data Source

Procedure

  1. In the main navigation menu, select DATASOURCES.
    The DATASOURCES workspace appears, displaying a list of data sources.
  2. Select Add New Data Source, and then enter values as specified in the following table.
    Item Description
    Name Enter the unique name of the data source.
    Description Enter the description of the data source.
    Datasource Type Select one of the following types of the data sources:
    • Historian
    • Relational Database
    • Custom
  3. For a Relational Database data source, enter the following:
    Item Description
    Database Type Observe that this field defaults to Microsoft SQL Server, currently the only supported database type.
    Host Enter the IP address or host name of database server. For example: 10.181.213.211 or databaseserver01.

    This field only appears if you select Relational Database as the Datasource Type.

    Port Enter the port you want to use to connect to the SQL Server.

    This field only appears if you select Relational Database as the Datasource Type.

    Database Enter the database name that you want to connect to.

    This field only appears if you select Relational Database as the Datasource Type.

    Certificates Required Select the check box if connecting to the data source requires SSL certificates. If you select this check box, the Choose Certificate button appears, allowing you to select the certificate.
    User Name In the SQL Authentication section, provide the user name for the database you want to access.
    Password In the SQL Authentication section, provide the password of the user configured in the database.
    Test button

    After the required fields are filled in, click the Test button.

    On a successful connection check, a message is shown beside the Test button as "Successfully connected to the Database” indicating that test connection to database can be established using the above details.

    If it fails, it reads: “Failed to connect to the Database. More Details.” Click the “More Details ”link to view detailed reason in a popup.

    The following example shows a successful SQL Database connection.

  4. For a Historian or Custom REST data source enter the following:
    Item Description
    Base URL Enter the URL of the data source in the following format: https://<host name or IP address of the data source>:<port number>
    Note: The port number should not be used if your data source is Historian 8.x.
    This field only appears if you select Historian or Custom for the Datasource Type.
    Certificates Required Select the check box if connecting to the data source requires SSL certificates. If you select this check box, the Choose Certificate button appears, allowing you to select the certificate.
    Ignore TLS/SSL Select the check box if verifying SSL certification can be ignored. Normally, this check box is cleared when using the data source in a production environment, which implies that SSL certification will be verified while connecting to the data source. If, however, you want to troubleshoot issues with connecting to a data source, you may select this check box to isolate certification issues.

    This field only appears if you select Historian or Custom for the Datasource Type.

  5. If authentication to the Historian system API is required, perform the following steps:
    1. Select the System API Authentication Required check box. This check box is applicable only for a Historian data source. If you want to use a Historian data source in a trend chart, you must select this check box.
      The User Name and Password boxes appear, allowing you to enter the credentials to authenticate system API.
    2. Enter values in the User Name and Password boxes, and then select Test.
      A message appears, confirming whether connection to the system API is established. The connection is tested using the data source base URL and the authentication details of the system APIs.
  6. If authentication to a REST API is required, perform the following steps:
    1. Select the REST Authentication Required check box. If this check box is selected, Operations Hub sends authorization details along with a request while connecting to a data source.
      The Auth Type box appears.
    2. Select one of the following types of authentication:
      • Basic Auth: Sends a verified user name and password along with the request.
      • Bearer Token: Sends an access key along with the request.
      • OAuth: Retrieves an access key to access an API, and then uses the key to authenticate future requests.
      Depending on the authentication type you select, a few boxes appear.
    3. Enter values in the available boxes as specified in the following table.
      Box Applicable Authentication Types Description
      Auth Grant Type OAuth Select one of the following types of granting the authentication:
      • client_credentials
      • password
      Auth Token Bearer Token Enter the access key required to authenticate the APIs. The access key is included in the request header.
      Username OAuth and Basic Auth Enter the user name of the user who can access the APIs.
      Password OAuth and Basic Auth Enter the password of the user who can access the APIs.
      Auth URL Bearer Token Enter the URL for the endpoint of the authentication server. This value is used to exchange the authorization code for an access token.
      Auth Client ID OAuth The client identifier issued to the client during the application registration process.
      Auth Client Secret OAuth The client secret issued to the client during the application registration process.
    4. If you want to provide a certificate for authentication, select Choose Certificate and navigate to the certificate. Alternatively, you can select the Use DataSource Cert check box if you want to use the same certificate that is used by the data source.
      Note: You can use certificates only in the base-64-encoded format. A DER-encoded certificate is not supported.
    5. If you want to use the OAuth authentication type, select Test. Otherwise, skip to the next step.
      A message appears, confirming whether token from the OAuth data source is retrieved. The connection is tested using the authentication details of the REST APIs, including the authentication URL; the data source base URL is not used.
      Note: You can create multiple data sources with the same URL. After you restart the services, the Data Distributor service uses the most recently saved System API authentication settings for the URL. Therefore, if the most recently saved credentials do not work, you cannot connect to the data source. To fix this issue, modify the data source to specify working credentials, and then test the data source. We recommend that you do not save the data sources that do not pass the test or data sources with the same URL.
  7. Select Save.

    Look at the following examples for configuring a data source for Historian 7.x and Historian 8.x.

    Historian 7.x requires entry of port used – in this instance, port 8443 – whereas Historian 8.x does not require any port to be specified.

    The Auth Client ID is admin for Historian 7.x, whereas Historian 8.x requires the Auth Client ID to be of the form MachineName.admin, where MachineName is case sensitive.

    Example of Historian 7.2 Data Source:

    Example of Historian 8 Data Source:

    Note: The Auth Client ID field is case sensitive. For example, if the Historian server name is hist8Server, the user must use hist8Server.admin and not HIST8Server.admin or Hist8Server.admin, otherwise REST authentication will fail.