# MaxScale 24.02 Configuring the MariaDB Monitor

This document describes how to configure a MariaDB primary-replica cluster monitor\
to be used with MaxScale.

### Configuring the Monitor

Define the monitor that monitors the servers.

```
[Replication-Monitor]
type=monitor
module=mariadbmon
servers=dbserv1, dbserv2, dbserv3
user=monitor_user
password=my_password
monitor_interval=2000ms
```

The mandatory parameters are the object type, the monitor module to use, the\
list of servers to monitor and the username and password to use when connecting\
to the servers. The `monitor_interval` parameter controls for how long\
the monitor waits between each monitoring loop.

### Monitor User

The monitor user requires the REPLICATION CLIENT privileges to do basic\
monitoring. To create a user with the proper grants, execute the following SQL.

```
CREATE USER 'monitor_user'@'%' IDENTIFIED BY 'my_password';
GRANT REPLICATION CLIENT ON *.* TO 'monitor_user'@'%';
```

**Note:** If the automatic failover of the MariaDB Monitor will used, the user\
will require additional grants. Execute the following SQL to grant them.

```
GRANT SUPER, RELOAD on *.* to 'monitor_user'@'%';
```

<sub>*This page is licensed: CC BY-SA / Gnu FDL*</sub>

{% @marketo/form formId="4316" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/maxscale/maxscale-archive/archive/mariadb-maxscale-24-02/maxscale-24-02tutorials/mariadb-maxscale-2402-maxscale-2402-configuring-the-mariadb-monitor.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
