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.
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.
config.ymlYAML
sources:
- name: orders_db
type: database_postgres
params:
host: db.internal
port: 5432
user: vaurd
password: <password>
database: orders
sslmode: requireThe 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.
config.ymlYAML
sources:
- name: inventory_db
type: database_mysql
params:
host: mysql.internal
port: 3306
user: vaurd
password: <password>
database: inventory
tls: true