Docs/Agent management
Docs/Agent management

Data source parameters

The connection parameters each supported database type accepts, and which of them the agent requires.

Every type takes the same five required parameters, plus its own optional extras.

Parameters every type needs

Leave one of these out and the connection fails with missing required param.

ParameterTypeWhat it is
hoststringHostname or IP address of the database. Cannot be empty.
portnumberPort the database listens on.
userstringUsername the agent connects as. Cannot be empty.
passwordstringPassword for that user. The key must be present, but an empty value is accepted.
databasestringName of the database to read from. Cannot be empty.
Do not quote the port

port is validated as a number, so port: "5432" fails with port must be a number. It is easy to miss in a file where every neighbouring value is a string.

PostgreSQL

Set type: database_postgres. One optional parameter on top of the five above.

ParameterTypeDefaultWhat it does
sslmodestringdisableHow TLS is negotiated. Takes the standard PostgreSQL values, such as require, verify-ca or verify-full.
config.ymlYAML
sources:
  - name: orders_db
    type: database_postgres
    params:
      host: db.internal
      port: 5432
      user: vaurd
      password: <password>
      database: orders
      sslmode: require

The default of disable means the connection is not encrypted. Set it to require or stricter for anything crossing a network you do not fully control.

MySQL

Set type: database_mysql. Two optional parameters on top of the five above.

ParameterTypeDefaultWhat it does
protocolstringtcpHow the server is reached. Set it to unix to connect over a socket instead.
tlsbooleanfalseWhether to connect over TLS. Only enabled when set to exactly true.
config.ymlYAML
sources:
  - name: inventory_db
    type: database_mysql
    params:
      host: mysql.internal
      port: 3306
      user: vaurd
      password: <password>
      database: inventory
      tls: true