Sql type

Expand all | Collapse all

KUMA supports multiple types of databases. When creating a connector of the sql type, you must specify general connector settings and specific database connection settings. Settings for a connector of the sql type are described in the following tables.

Basic settings tab

Setting

Description

Name

Unique name of the resource. Maximum length of the name: 128 Unicode characters.

Required setting.

Type

Connector type. You need to select sql.

Required setting.

Tenant

The name of the tenant that owns the resource.

Required setting.

Default query

SQL query that is executed when connecting to the database.

Required setting.

Reconnect to the database every time a query is sent

The connector reconnects to the database every time a query is sent. This check box is cleared by default.

Poll interval, sec

Interval for executing SQL queries in seconds. The default value is 10 seconds.

Description

Description of the resource. Maximum length of the description: 4000 Unicode characters.

Connection section

Setting

Description

Database type

The type of the database to connect to. When you select a database type, the prefix corresponding to the communication protocol is displayed in the URL field. For example, for a ClickHouse database, the URL field contains the clickhouse:// prefix.

Secret separately

Viewing information about the connection. If this check box is selected, the following settings are displayed in the window:

  • URL is the connection URL.
  • Secret is the secret of the 'credentials' type.

This lets you view connection information without having to re-create a large number of connections if the password of the user account that you used for the connections changes.

If this check box is cleared, only the URL field is available for selecting or creating a secret of the 'urls' type.

This check box is cleared by default.

URL

Field for specifying one of the following values:

  • If you cleared the Secret separately check box, in this field, you need to specify the 'urls' secret containing a list of URLs for connecting to the database.

    If necessary, you can edit or create a secret.

    When creating connections, strings containing account credentials with special characters may be incorrectly processed. If an error occurs when creating a connection, but you are sure that the specified settings are correct, enter the special characters in percent encoding.

    Codes of special characters

  • If the Secret separately check box is selected, you need to specify the connection URL in this field. The URL is used with a secret of the 'credentials' type.

Secret

Secret of the 'credentials' type. This setting is available if you have selected the Secret separately check box.

Authorization

Type of authorization when connecting to the specified URL: Available values:

  • Disabled. The default value.
  • Plain. If this option is selected, you must indicate the secret containing user account credentials for authorization when connecting to the connector.
  • PublicPKI. If you select this value, you must specify the secret containing the base64-encoded PEM private key and the public key.

TLS mode

TLS encryption mode. Available values:

  • Disabled means TLS encryption is not used. The default value.
  • Enabled means TLS encryption is used, but certificates are not verified.
  • Custom CA means TLS encryption is used with verification that the certificate was signed by a Certificate Authority. If you select this value, from the Custom CA drop-down list, select a secret with a certificate signed by the CA.

    How to create a certificate signed by a Certificate Authority?

    When using TLS encryption, you cannot specify an IP address as the URL.

    Special considerations for TLS encryption mode

Identity column

Name of the column that contains the ID for each row of the table.

Required setting.

Identity seed

The value in the identity column for determining the row from which you want to start reading data from the SQL table.

Query

Additional SQL query that is executed instead of the default SQL query.

Poll interval, sec

Interval for executing SQL queries in seconds. The specified interval is used instead of the default interval for the connector. The default value is 10 seconds.

Description

Description of the resource. Maximum length of the description: 4000 Unicode characters.

Advanced settings tab

Setting

Description

Character encoding

Character encoding. The default value is UTF-8.

KUMA converts SQL responses to UTF-8 encoding. You can configure the SQL server to send responses in UTF-8 encoding or change the encoding of incoming messages on the KUMA side.

Debug

Resource logging. The toggle switch is turned off by default.

Within a single connector, you can create a connection for multiple supported databases. If a collector with a connector of the sql type cannot be started, check if the /opt/kaspersky/kuma/collector/<collector ID>/sql/state-<file ID> state file is empty. If the state file is empty, delete it and restart the collector.

Supported SQL types and their specific usage features

The following SQL types are supported:

A sequential request for database information is supported in SQL queries. For example, if in the Query field, you enter select * from <name of data table> where id > <placeholder>, the value of the Identity seed field is used as the placeholder value the first time you query the table. In addition, the service that utilizes the SQL connector saves the ID of the last read entry, and the ID of this entry will be used as the placeholder value in the next query to the database.

Examples of SQL requests

Page top