Introduction

MariaDB replication cluster typically refers to a cluster of MariaDB servers that use replication for data synchronization. MariaDB supports various forms of replication, but a common scenario involves using Galera Cluster for synchronous multi-master replication. There is also a traditional master-slave MariaDB replication setup involving one master server and one or more slave servers. This form of replication is asynchronous, meaning that changes made on the master are propagated to the slaves after some delay.

Galera Cluster

Galera Cluster is a synchronous multi-master cluster for MariaDB. It provides high availability and fault tolerance by allowing multiple nodes to write to the cluster simultaneously. Galera uses a certification-based replication mechanism, ensuring consistency across all nodes.

Traditional master-slave Cluster

  • Master Server:
    • The master server is the primary server where write operations (INSERT, UPDATE, DELETE) are performed.
    • It maintains the original dataset.
    • It logs changes made to the database in the binary log.
  • Slave Server(s):
    • Slave servers are read-only replicas of the master.
    • They replicate changes from the master, effectively mirroring its dataset.
    • Slaves can be used for read scaling and backup purposes.
  • This form of replication is suitable for scenarios where read scaling and data redundancy are primary considerations, and some delay in data consistency is acceptable.

Key Use cases

Discovery Use cases

  • It discovers the MariaDB cluster and its component Mysql instances.
  • Publishes relationships between resources to have a topological view and ease of maintenance.

Monitoring Use cases

  • Provides metrics related to job scheduling time and status etc..
  • Concern alerts will be generated for each metric to notify the administrator regarding the issue with the resource.
Supported Target Version
Validated on MariaDB version 10.3.35-MariaDB

Prerequisites

  • OpsRamp Classic Gateway 14.0.0 and above.
  • OpsRamp Nextgen Gateway version 14.0.0 and above.
  • Provided IpAddress/hostname, Credentials (SSH and MariaDB database) should work for accessing MariaDB cluster.
  • The SSH credentials should be same for all the MariaDB cluster nodes
  • The MariaDB credentials should be the same for all the MariaDB node instances.

Hierarchy of MariaDB Cluster

  • For MariaDB cluster:
    • MariaDB Cluster
      • MariaDB Server
        • MariaDB Database
  • For a standalone MariaDB server:
    • MariaDB Server
      • MariaDB Database

Notes:

  • In the configuration process, input the IP address of the node, whether standalone or part of a cluster (in the case of a cluster), along with the relevant port information.
  • For the execution of remote SSH/CLI commands, ensure the provision of SSH credentials for the MariaDB server and credentials for the specific MariaDB instance.

Supported Metrics

Click here to view the supported metrics
Native TypeMetric NameDisplay NameUnitsApplication VersionDescription
MariaDB Clustermariadb_cluster_NodesCountMariaDB Cluster Nodes Countcount1.0.0The number of nodes in the MariaDB cluster
MariaDB Databasemariadb_database_totalSizeMariaDB Database Total SizeCapacityBytes3.0.0The total size of a database refers to the combined size of all the data stored in the database, including both the data and index files.
mariadb_database_tableCountMariaDB Database Table CountAvailabilitycount3.0.0Counts the number of tables in the specified database.
mariadb_database_totalFreeSpaceMariaDB Database Total Free SpaceUsageBytes3.0.0This represents the amount of free space within the database tables, which can occur due to deletions or updates that leave empty space.
mariadb_database_dataSizeMariaDB Database Data SizeCapacityBytes3.0.0This is the size of the actual data stored in the tables. It represents the amount of space occupied by the rows in the tables.
mariadb_database_indexSizeMariaDB Database Index SizeCapacityBytes3.0.0This is the size of the indexes associated with the tables in the database. Indexes improve the speed of data retrieval operations but also consume additional space.
MariaDB Servermariadb_server_SSLClientConnectsMariaDB Server SSL Client Connectscount1.0.0The number of SSL connection attempts to an SSL-enabled master.
mariadb_server_databasesCountMariaDB Server Databases Countcount3.0.0Total number of databases in MariaDB Server.
mariadb_server_InternalConnectionErrorsMariaDB Server Internal Connection Errorscount1.0.0The number of connections refused due to internal errors in the server, such as failure to start a new thread or an out-of-memory condition.
mariadb_server_ConnectionsMariaDB Server Connectionscount1.0.0The number of connection attempts (successful or not) to the MySQL server.
mariadb_server_MaxConnectionErrorsMariaDB Server Max Connection Errorscount1.0.0The number of connections refused due to internal server errors.
mariadb_server_AbortedConnectsMariaDB Server Aborted Connectscount1.0.0The number of failed attempts to connect to the MySQL server.
mariadb_server_MaxConnectionsMariaDB Server Max Connectionscount1.0.0Max Limit of Connections.
mariadb_server_AbortedClientsMariaDB Server Aborted Clientscount1.0.0The number of connections that were aborted because the client died without closing the connection properly.
mariadb_server_ActiveThreadsMariaDB Server Active Threadscount1.0.0MySQL Connected Threads count
mariadb_server_CreatedThreadsMariaDB Server Created Threadscount1.0.0The number of threads created to handle connections. If Threads_created is big, you may want to increase the thread_cache_size value. The cache miss rate can be calculated as Threads_created/Connections.
mariadb_server_CachedThreadsMariaDB Server Cached Threadscount1.0.0MySQL Cached Threads count
mariadb_server_ThreadsRunningMariaDB Server Threads Runningcount1.0.0The number of threads that are not sleeping.
mariadb_server_UptimeMariaDB Server Uptimem1.0.0MariaDB server uptime in minutes
mariadb_server_SelectCommandsMariaDB Server Select Commandscount1.0.0The number of times SELECT command has been executed
mariadb_server_DeleteCommandsMariaDB Server Delete Commandscount1.0.0The number of times Delete command has been executed
mariadb_server_InsertCommandsMariaDB Server Insert Commandscount1.0.0The number of times Insert command has been executed
mariadb_server_RollbackCommandsMariaDB Server Rollback Commandscount1.0.0The number of times RollBack command has been executed
mariadb_server_DropTableCommandsMariaDB Server DropTable Commandscount1.0.0The number of times Drop Table command has been executed
The number of times Drop Table command has been executedMariaDB Server Drop User Commandscount1.0.0The number of times DROP USER command has been executed.
mariadb_server_DropDatabaseCommandsMariaDB Server Drop Database Commandscount1.0.0The number of times DROP DATABASE command has been executed
mariadb_server_CreateTableCommandsMariaDB Server Create Table Commandscount1.0.0The number of times CREATE TABLE command has been executed
mariadb_server_CreateUserCommandsMariaDB Server Create User Commandscount1.0.0The number of times CREATE USER command has been executed
mariadb_server_CreateDatabaseCommandsMariaDB Server Create Database Commandscount1.0.0The number of times CREATE DATABASE command has been executed
mariadb_server_SlowQueryCountMariaDB Server Slow Query Countcount1.0.0show global status like 'Slow_queries'
mariadb_server_RxBytesMariaDB Server Received BytesBytes1.0.0The number of bytes received from all clients.
mariadb_server_TxBytesMariaDB Server Transfer BytesBytes1.0.0The number of bytes sent to all clients.
mariadb_server_OpenTablesMariaDB Server OpenTablescount1.0.0The number of tables that have been opened with my_open().
mariadb_server_ImmediateTableLocksMariaDB Server Immediate Table Lockscount1.0.0The number of times that a request for a table lock could be granted immediately.
mariadb_server_diskTempTablesCreatedMariaDB Server Disk Temp Tables Createdcount1.0.0The rate of temporary tables created by second.
mariadb_server_OpenFilesMariaDB Server OpenFilescount1.0.0The number of files that have been opened with my_open() (a mysys library function). Parts of the server that open files without using this function do not increment the count
mariadb_server_TempFilesCreatedMariaDB Server Temp Files Createdcount1.0.0The rate of temporary files created by second.
mariadb_server_InnodbBufferPoolWriteRequestsMariaDB Server InnoDB Buffer Pool Write Requestscount1.0.0The number of writes done to the InnoDB buffer pool.
mariadb_server_InnodbRowLockWaitsMariaDB Server InnoDB Row Lock Waitscount1.0.0The number of times operations on InnoDB tables had to wait for a row lock.
mariadb_server_InnodbBufferPoolPagesFreeMariaDB Server InnoDB Buffer Pool Pages Freecount1.0.0The number of free pages in the InnoDB Buffer Pool.
mariadb_server_InnodbBufferPoolPagesTotalMariaDB Server InnoDB Buffer Pool Pages Totalcount1.0.0The total number of pages in the InnoDB Buffer Pool.
mariadb_server_InnodbDataPendingWritesMariaDB Server InnoDB Data Pending Writescount1.0.0The current number of pending writes
mariadb_server_InnodbDataPendingReadsMariaDB Server InnoDB Data Pending Readscount1.0.0The current number of pending reads
mariadb_server_InnodbBufferPoolDirtyPagesMariaDB Server InnoDB Buffer Pool Dirty Pagescount1.0.0The current number of dirty pages in the InnoDB buffer pool.
mariadb_server_InnodbBufferPoolReadsMariaDB Server InnoDB Buffer Pool Readscount1.0.0The number of logical reads that InnoDB could not satisfy from the buffer pool, and had to read directly from the disk.
mariadb_server_InnodbBufferPoolUtilizationMariaDB Server InnoDB Buffer Pool Utilization%1.0.0The utilization of the InnoDB Buffer Pool. shown as fraction
mariadb_server_InnodbRowLockTimeMariaDB Server InnoDB Row Lock Timems1.0.0The total time spent in acquiring row locks for InnoDB tables, in milliseconds.
mariadb_server_InnodbBufferPoolReadRequestsMariaDB Server InnoDB Buffer Pool Read Requestscount1.0.0The number of reads done to the InnoDB buffer pool.
mariadb_server_InnodbDataReadsMariaDB Server InnoDB Data Readscount1.0.0The total number of data reads (OS file reads).
mariadb_server_InnodbDataWritesMariaDB Server InnoDB Data Writescount1.0.0The total number of data writes.

Default Monitoring Configurations

MariaDB has default Global Device Management Policies, Global Templates, Global Monitors and Global metrics in OpsRamp. Users can customize these default monitoring configurations as per their business use cases by cloning respective global templates and global Device Management Policies. OpsRamp recommends doing this activity before installing the app to avoid noise alerts and data.

  1. Default Global Device Management Policies

    OpsRamp has a Global Device Management Policy for each Native Type of MariaDB. You can find those Device Management Policies at Setup > Resources > Device Management Policies, search with suggested names in global scope. Each Device Management Policy follows below naming convention:

    {appName nativeType - version}

    Ex: mariadb MariaDB Cluster - 1(i.e, appName = mariadb, nativeType = MariaDB Cluster , version = 1)

  2. Default Global Templates

    OpsRamp has a Global template for each Native Type of MariaDB. You can find those templates at Setup > Monitoring > Templates, search with suggested names in global scope. Each template follows below naming convention:

    {appName nativeType 'Template' - version}

    Ex: mariadb MariaDB Cluster Template- 1(i.e, appName = mariadb, nativeType = MariaDB Cluster, version = 1)

  3. Default Global Monitors

    OpsRamp has a Global Monitors for each Native Type which has monitoring support. You can find those monitors at Setup > Monitoring > Monitors, search with suggested names in global scope. Each Monitors follows below naming convention:

    {monitorKey appName nativeType - version}

    Ex: MariaDB Cluster Monitor mariadb MariaDB Cluster 1 (i.e, monitorKey =MariaDB Cluster Monitor, appName = mariadb, nativeType = MariaDB Cluster, version = 1)

Configure and Install the MariaDB Integration

  1. From All Clients, select a client.
  2. Go to Setup > Account.
  3. Select the Integrations and Apps tab.
  4. The Installed Integrations page, where all the installed applications are displayed.
    Note: If there are no installed applications, it will navigate to the Available Integrations and Apps page.
  5. Click + ADD on the Installed Integrations page. The Available Integrations and Apps page displays all the available applications along with the newly created application with the version.
    Note: You can even search for the application using the search option available. Also you can use the All Categories option to search.
Veeam
  1. Click ADD in the MariaDB application.
  2. In the Configurations page, click + ADD. The Add Configuration page appears.
  3. Enter the below mentioned BASIC INFORMATION:
FunctionalityDescription
NameEnter the name for the configuration.
IP Address/Host Name of MariaDB ServerEnter the IpAddress/HostName.
SSH PortSSH Port

Note: By default the SSH Port 22 is displayed.
SSH CredentialsSelect the Credential from the drop-down list.

Notes:
  • Click + Add to create a credential. The ADD CREDENTIAL window is displayed. Enter the following information.
    • Name: Credential name.
    • Description: Brief description of the credential.
    • User Name: User name.
    • Password: Password.
    • Confirm Password: Confirm password
MariaDB Instance CredentialsMariaDB Port

Notes: By default the MariaDB Port 3306 is displayed.
SSH CredentialsSelect the MariaDB Instance Credential from the drop-down list.

Notes:
  • Click + Add to create a credential. The ADD CREDENTIAL window is displayed. Enter the following information.
    • Name: Credential name.
    • Description: Brief description of the credential.
    • User Name: User name.
    • Password: Password.
    • Confirm Password: Confirm password

Notes:

  • Ip Address/Host Name and Port should be accessible from Gateway.
  • App Failure Notifications: If turned on, you will be notified in case of an application failure that is, Connectivity Exception, Authentication Exception.
  1. Select the below mentioned Custom Attribute:
FunctionalityDescription
Custom AttributeSelect the custom attribute from the drop down list box.
ValueSelect the value from the drop down list box.

Note: The custom attribute that you add here will be assigned to all the resources that are created by the integration. You can add a maximum of five custom attributes (key and value pair).

  1. In the RESOURCE TYPE section, select:

    • ALL: All the existing and future resources will be discovered.
    • SELECT: You can select one or multiple resources to be discovered.
  2. In the DISCOVERY SCHEDULE section, select Recurrence Pattern to add one of the following patterns:

    • Minutes
    • Hourly
    • Daily
    • Weekly
    • Monthly
  3. Click ADD.

Veeam

Now the configuration is saved and displayed on the configurations page after you save it.
Note: From the same page, you may Edit and Remove the created configuration.

  1. Under the ADVANCED SETTINGS, Select the Bypass Resource Reconciliation option, if you wish to bypass resource reconciliation when encountering the same resources discovered by multiple applications.

    Note: If two different applications provide identical discovery attributes, two separate resources will be generated with those respective attributes from the individual discoveries.

  2. Click NEXT.

  3. (Optional) Click +ADD to create a new collector by providing a name or use the pre-populated name.

Veeam
  1. Select an existing registered profile.
Veeam
  1. Click FINISH.

The application is installed and displayed on the INSTALLED INTEGRATION page. Use the search field to find the installed integration.

Modify the Configuration

View MariaDB details

To discover resources for MariaDB,

  1. Navigate to Infrastructure > Search > DATABASES > MariaDB.
  2. The MARIADB page is displayed, select the application name.
  3. The RESOURCE DETAILS page appears from the right.
  4. Click the ellipsis () on the top right and select View details.
Veeam
  1. Navigate to the Attributes tab to view the discovery details.
Veeam
  1. Click the Metrics tab to view the metric details for MariaDB.

View resource metrics

To confirm MariaDB monitoring, review the following:

  • Metric graphs: A graph is plotted for each metric that is enabled in the configuration.
  • Alerts: Alerts are generated for metrics that are configured as defined for integration.
Veeam

Resource Filter Input Keys

Click here to view the Supported Input Keys
Resource TypeSupported Input Keys
All TypesresourceName
hostName
aliasName
dnsName
ipAddress
macAddress
os
make
model
MariaDB Serverdatadir
MariaDB version
MariaDB DatabaseCATALOG NAME
DEFAULT CHARACTER SET NAME
DEFAULT COLLATION NAME
MariaDB Server Name
SQL PATH

Supported Alert Custom Macros

Customize the alert subject and description with below macros then it will generate alert based on customisation.

Supported macros keys:

Click here to view the alert subject and description with macros

                                ${resource.name}

                                ${resource.ip}

                                ${resource.mac}

                                ${resource.os}

                                ${resource.type}

                                ${resource.make}

                                ${resource.model}

                                ${resource.serialnumber}

                                ${resource.systemId}

                                ${parent.resource.name}

                                    ${Custom attributes on the resource}

Risks, Limitations & Assumptions

  • Application can handle Critical/Recovery failure alert notifications for below two cases when user enables App Failure Notifications in configuration
    • Connectivity Exception
    • Authentication Exception
  • Application cannot control monitoring pause/resume actions based on above alerts. Metrics can be used to monitor PowerMax resources and can generate alerts based on the threshold values.
  • OpsRamp has provided 22 as default Port for SSH and 3306 as default Port for MariaDB. Users can modify this value from the application configuration page at any point of time if required.
  • Component level thresholds can be configured on each resource level.
  • No support of showing activity logs.
  • The Template Applied Time will only be displayed if the collector profile (Classic and NextGen Gateway) is version 18.1.0 or higher.
  • The minimum supported version for the option to get the latest snapshot metric is Nextgen-14.0.0.
  • This application supports both Classic Gateway and NextGen Gateway.

Version History

Application VersionBug fixes / Enhancements
3.0.0Support has been added for MariaDB databases.
2.0.0Persona changes to support Cluster and Standalone MariaDB configurations.
1.0.0Initial version with Discovery and Monitoring Implementations.