MariaDB Agent Manager Configuration 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 configuration file defines the on-premises database infrastructure and all required parameters.
Path
When running MariaDB Agent Manager, the path to the configuration file can be specified using the -c
flag or by setting the REMOTE_AGENT_CONFIG
environment variable.
Consistency
The MariaDB Agent Manager configuration file must be consistent on all servers. Each host can have an identical copy of the configuration file or all hosts could share a single copy of the file via shared storage.
Format
The MariaDB Agent Manager configuration file uses the JSON format.
Sections
The MariaDB Agent Manager configuration file consists of the following sections:
Section | Description |
---|---|
The set of parameters clusters and servers in your data center and the corresponding exporters that MariaDB Agent Manager should use for each. | |
Prometheus-related settings. |
Configuration Attributes for "datacenter"
Section
The "datacenter"
section contains a nested database_services
section with an array defining each database service within the data center.
The following configuration attributes are currently supported in the "datacenter"
section:
Attribute Key Name | Description | Type | Recommended Value |
---|---|---|---|
|
| String | Any |
|
| String | Any |
|
| String | Any |
Configuration Attributes for "datacenter.database_services[]"
Section
The "datacenter.database_services[]"
section contains a nested servers
section with an array defining each server within the database service.
The following configuration attributes are currently supported in the "datacenter.database_services[]"
section for each database service defined:
Attribute Key Name | Description | Type | Recommended Value |
---|---|---|---|
|
| String | See description |
|
| String | Any |
Configuration Attributes for "datacenter.database_services[].servers[]"
Section
The "datacenter.database_services[].servers[]"
section contains a nested exporters
section that configures the exporters at the server level.
The following configuration attributes are currently supported in the "datacenter.database_services[].servers[]"
section for each server defined in the database service:
Attribute Key Name | Description | Type | Recommended Value |
---|---|---|---|
|
| String | Any |
|
| String | See description |
|
| String | Any |
|
| Object | See description |
|
| String | Any |
|
| String | See description |
Configuration Attributes for "datacenter.database_services[].servers[].exporters"
Sections
The "exporters"
section is an optional section that can be added to the "datacenter.database_services[].servers[]
section. The section defines configuration attributes for each exporter for the server:
Configuration Attributes for "mariadb_exporter"
Sections
The "mariadb_exporter"
section is optional. This section can be used to override default values.
The "mariadb_exporter"
configuration attributes can appear in the "datacenter.database_services[].servers[].exporters"
section:
Attribute Key Name | Description | Type | Recommended Value |
---|---|---|---|
|
| String |
|
|
| Integer |
|
|
| Integer |
|
|
| String |
|
Configuration Attributes for "maxscale_exporter"
Sections
The "maxscale_exporter"
section is optional. This section can be used to override default values.
The "maxscale_exporter"
configuration attributes can appear in the "datacenter.database_services[].servers[].exporters"
section:
Attribute Key Name | Description | Type | Recommended Value |
---|---|---|---|
|
| String | |
|
| Integer |
|
|
| Integer |
|
"route" |
| String |
|
Configuration Attributes for "node_exporter"
Sections
The "node_exporter"
section is optional. This section can be used to override default values.
The "node_exporter"
configuration attributes can appear in the "datacenter.database_services[].servers[].exporters"
section:
Attribute Key Name | Description | Type | Recommended Value |
---|---|---|---|
|
| Integer |
|
|
| String |
|
Configuration Attributes for "skysql_uni_exporter"
Sections
The "skysql_uni_exporter"
configuration attributes can appear in the "datacenter.database_services[].servers[].exporters"
section:
Attribute Key Name | Description | Type | Recommended Value |
---|---|---|---|
|
| String |
|
|
| Integer |
|
|
| Integer |
|
Configuration Attributes for "prometheus"
Section
The "prometheus"
section is optional. This section can be used to override default values.
The following configuration attributes are currently supported in the "prometheus"
section:
Attribute Key Name | Description | Type | Recommended Value |
---|---|---|---|
|
| Integer |
|
|
| Integer |
|
|
| Integer |
|
|
| String | See description |
Configuration Wizard
A configuration file can be created using the configuration wizard by executing the mariadb_agent_manager init
sub-command.
$ mariadb_agent_manager init
Please specify a file name for the config output (configuration.json):
Please enter the Data Center Name (PDC):
Please enter the Data Center Location (USA):
Please enter the service Name: catalogdb
Please select a service type:
1. ColumnStore(columnstore)
2. Xpand(distributed)
3. Galera(galera)
4. MariaDB with Replicas(replicated)
5. MariaDB(standalone)
4
Does your service include a MaxScale server: (Y/n) y
Please enter the MaxScale server Name: max1
Please enter the hostname: catalog-max1
Do you have another MaxScale server: (Y/n) n
Please enter the MariaDB server Name: vm1
Please enter the hostname: catalog-vm1
Do you want to use unix_socket authentication for MariaDB: (Y/n) y
Please enter the path to Unix socket file (/run/mysqld/mysqld.sock):
Finished adding servers: (Y/n) n
Please enter the MariaDB server Name: vm2
Please enter the hostname: catalog-vm2
Do you want to use unix_socket authentication for MariaDB: (Y/n) n
Finished adding servers: (Y/n) y
Please enter the user name for MariaDB servers or leave it empty: admin
Please enter a password for MariaDB servers or leave it empty: admin
Please enter the user name for MaxScale servers or leave it empty: admin
Please enter a password for MaxScale servers or leave it empty: admin
URL: https://id.mariadb.com/account/api/
Please use provided URL to obtain the API key; paste it below (for security, it will not be visible) and press 'Enter'
API Key length: xxxx
Initial files have been created successfully:
configuration file: configuration.json
API Key file: api_token.txt
credentials file: mariadb-credentials.json
credentials file: maxscale-credentials.json
Next steps:
1. Run the agent manager installation command on all service's servers:
./mariadb_agent_manager install
2. Run the agent manager credentials encryption command on database and Maxscale servers that require user/password to login:
./mariadb_agent_manager encrypt-creds -p ./credentials.json
with the generated credentials files (edit for each server as needed).
3. Run:
./mariadb_agent_manager start -c ./configuration.json -k ./api_token.txt -f
on a server that will serve as Forwarding Host and
./mariadb_agent_manager start -c ./configuration.json
on all other servers
Example Configuration Files
Single Node Enterprise Server
{
"datacenter": {
"name": "Example Data Center",
"location": "Oregon, US",
"database_services": [
{
"name": "example-standalone",
"type": "standalone",
"servers": [
{
"name": "mdb1",
"type": "server",
"hostname": "mdb1.example.com"
}
]
}
]
}
}
Replicated Transactions Topology
{
"datacenter": {
"name": "Example Data Center",
"location": "Oregon, US",
"database_services": [
{
"name": "example-replicated",
"type": "replicated",
"servers": [
{
"name": "mxs1",
"type": "maxscale",
"hostname": "mxs1.example.com"
},
{
"name": "mdb1",
"type": "server",
"hostname": "mdb1.example.com"
},
{
"name": "mdb2",
"type": "server",
"hostname": "mdb2.example.com"
},
{
"name": "mdb3",
"type": "server",
"hostname": "mdb3.example.com"
}
]
}
]
}
}
Distributed Transactions Topology
{
"datacenter": {
"name": "Example Data Center",
"location": "Oregon, US",
"database_services": [
{
"name": "example-distributed",
"type": "distributed",
"servers": [
{
"name": "mxs1",
"type": "maxscale",
"hostname": "mxs1.example.com"
},
{
"name": "xpand1",
"type": "xpand-backend",
"hostname": "xpand1.example.com"
},
{
"name": "xpand2",
"type": "xpand-backend",
"hostname": "xpand2.example.com"
},
{
"name": "xpand3",
"type": "xpand-backend",
"hostname": "xpand3.example.com"
}
]
}
]
}
}
Multi-Node Analytics Topology
{
"datacenter": {
"name": "Example Data Center",
"location": "Oregon, US",
"database_services": [
{
"name": "example-columnstore",
"type": "columnstore",
"servers": [
{
"name": "mxs1",
"type": "maxscale",
"hostname": "mxs1.example.com"
},
{
"name": "cs_node1",
"type": "server",
"hostname": "mdb1.example.com"
},
{
"name": "cs_node2",
"type": "server",
"hostname": "mdb2.example.com"
},
{
"name": "cs_node3",
"type": "server",
"hostname": "mdb3.example.com"
}
]
}
]
}
}
Galera Cluster Topology
{
"datacenter": {
"name": "Example Data Center",
"location": "Oregon, US",
"database_services": [
{
"name": "example-galera",
"type": "galera",
"servers": [
{
"name": "mxs1",
"type": "maxscale",
"hostname": "mxs1.example.com"
},
{
"name": "mdb1",
"type": "server",
"hostname": "mdb1.example.com"
},
{
"name": "mdb2",
"type": "server",
"hostname": "mdb2.example.com"
},
{
"name": "mdb3",
"type": "server",
"hostname": "mdb3.example.com"
}
]
}
]
}
}