MariaDB Agent Manager Credentials File Reference
This page is part of MariaDB's Documentation.
The parent of this page is: Reference for MariaDB Agent Manager
Topics on this page:
Overview
The MariaDB Agent Manager credentials file stores credentials required by some exporters that authenticate with a user and password to scrape their targets, such as mariadb_exporter
and maxscale_exporter
.
Encryption and Ingestion
The credentials file must be ingested using the mariadb_agent_manager encrypt-creds
sub-command, which also encrypts the credentials:
$ mariadb_agent_manager encrypt-creds -p ~/credentials.json
The following files have been successfully created:
Encrypted credentials: /home/USER/.config/mariadb-agent-manager/cred.json
Secret key: /home/USER/.config/mariadb-agent-manager/.key.txt
The
-p
option specifies the path to the credentials file. Alternatively, theREMOTE_AGENT_CREDENTIALS
environment variable can be used.
MariaDB Agent Manager encrypts the credentials and saves the encrypted credentials to its configuration directory.
After the credentials have been encrypted, MariaDB Agent Manager deletes the credentials file. If you need to preserve the credentials file, ensure that you have a backup.
Path
When executing the mariadb_agent_manager encrypt-creds
sub-command, the path to the credentials file can be specified using the -p
flag or by setting the REMOTE_AGENT_CREDENTIALS
environment variable.
Consistency
The MariaDB Agent Manager credential file is not required to be consistent on all hosts. Each host can have a separate credentials file, containing only the credentials required by that host's components.
Format
The MariaDB Agent Manager credentials file uses the JSON format.
Sections
The MariaDB Agent Manager credentials file contains two types of sections:
Section Purpose | Section Name | Description |
---|---|---|
Database Credentials |
| This section can be used to configure credentials for MariaDB Enterprise Server or MariaDB Xpand. |
MaxScale Credentials |
| This section can be used to configure credentials for MariaDB MaxScale. |
Example
Expand the sections below to see examples of credentials files.
Enterprise Server credentials
{
"cred_store": {
"mariadb": {
"user": "ros",
"pwd": "USER_PASSWORD"
}
}
}
Xpand credentials
{
"cred_store": {
"mariadb": {
"user": "ros",
"pwd": "USER_PASSWORD"
}
}
}
MaxScale credentials
{
"cred_store": {
"maxscale": {
"user": "ros",
"pwd": "USER_PASSWORD"
}
}
}