Description

The SQL Database sender sends messages (events and metrics) from 1Gateway into a database table that is already defined, using a JDBC connection. The messages will appear as rows in a database table. To insert messages in multiple tables, more than one instantiation of the SQL Database sender plugin is needed. 


Prerequisites

  • JDBC Driver
    • The JDBC driver for the database has to be installed in the 1Gateway lib directory.
  • Table
    • Create a database and table with the wanted message fields.

Installation

Make sure you have the 1gateway zip file that includes the plugin files and valid licences information ready. This file has been provided to you with the installation files.

1 - Login

Login to 1gateway, and make sure you are in "Advanced mode". If this is the first time you log in, the default user and password are both 'admin' (without the quotes).

2 - System Maintenance

Click on the menu icon and choose the option "System maintenance"


3 - Upload file


In the System maintenance view you can either drag and drop the downloaded zip file or select it by clicking the "choose file" button.

4 - Restart

After the upload installation will be confirmed. Restart 1Gateway to ensure any locked files are updated.

Configuration


Open the main menu and click on "New plugin"

Select the plugin you want to configure. Use the Filter field if needed.

Field name

Supported values

Description

Example

Databse host

Any string

Host where the database is

localhost

Database port

Any string

Port number

1433

Database type

Any string

Database type

sqlserver, sqlite

Database user

Any string

Database user

sa

Database password

Any string

Database user's password

abc123

Database name

Any string

Database name

TestDB

Database table name

Any string

Database table name

TestTable
Connection stringValid connection stringConnection string to the database

jdbc:sqlserver://localhost:1433;user=sa;password=abc123;databaseName=TestDB;

jdbc:sqlite:C:\\Temp\metric.db

If a connectionString is defined, the rest of the parameters don't have to be set, and will be ignored. If no connectionString is set, the rest of the parameters have to be defined. To properly configure the database sender, a mapper is needed. The mapper needs to include mappings to convert fields from normalized messages to field names that match the table column names.

See also