Skip to main content
Sumo Logic

Install the MariaDB Monitors, App, and view the Dashboards

This page provides instructions for installing the MariaDB Monitors, App, as well as examples of each of the App dashboards.

This page provides instructions for installing the MariaDB Monitors, App, as well as examples of each of the App dashboards. These instructions assume you have already set up the collection as described in the Collect Logs and Metrics for the MariaDB App page.

Pre-Packaged Alerts

Sumo Logic has provided out-of-the-box alerts available through Sumo Logic monitors to help you monitor your MariaDB clusters. These alerts are built based on metrics and logs datasets and include preset thresholds based on industry best practices and recommendations.

For details on the individual alerts, see this page.

Installing Monitors

  • To install these alerts, you need to have the Manage Monitors role capability.
  • Alerts can be installed by either importing a JSON file or a Terraform script.
Install the monitors by importing a JSON file Method:
  1. Download the JSON file that describes the monitors. 

  2. The JSON contains the alerts that are based on Sumo Logic searches that do not have any scope filters and therefore will be applicable to all MariaDB clusters, the data for which has been collected via the instructions in the previous sections.  However, if you would like to restrict these alerts to specific clusters or environments, update the JSON file by replacing the text ‘db_system=mariadb with ‘<Your Custom Filter>.  

Custom filter examples: 

  1. For alerts applicable only to a specific cluster, your custom filter would be,  ‘db_cluster=mariadb-prod.01‘.
  2. For alerts applicable to all clusters that start with Kafka-prod, your custom filter would be, db_cluster=mariadb-prod*.
  3. For alerts applicable to a specific cluster within a production environment, your custom filter would be,db_cluster=mariadb-1 and environment=prod (This assumes you have set the optional environment tag while configuring collection).
  4. Go to Manage Data > Alerts > Monitors.
  5. Click Add.
    Add monitors page.png
  6. Click Import and then copy-paste the above JSON to import monitors.
Install the alerts using a Terraform script Method
  1. Generate a Sumo Logic access key and ID.
    Generate an access key and access ID for a user that has the Manage Monitors role capability in Sumo Logic using these instructions. Identify which deployment your Sumo Logic account is in, using this link
  2. Download and install Terraform 0.13 or later. 
  3.  Download the Sumo Logic Terraform package for MariaDB alerts.
    The alerts package is available in the Sumo Logic GitHub repository. You can either download it through the “git clone” command or as a zip file. 
  4. Alert Configuration. After the package has been extracted, navigate to the package directory terraform-sumologic-sumo-logic-monitor/monitor_packages/MariaDB/.

    Edit the file and add the Sumo Logic Access Key, Access Id, and Deployment from Step 1.

access_id   = "<SUMOLOGIC ACCESS ID>"
access_key  = "<SUMOLOGIC ACCESS KEY>"
environment = "<SUMOLOGIC DEPLOYMENT>"

The Terraform script installs the alerts without any scope filters, if you would like to restrict the alerts to specific clusters or environments, update the variable ’mariadb_data_source’. Custom filter examples: 

  1. A specific cluster
  2. All clusters in an environment environment=prod
  3. For alerts applicable to all clusters that start with mariadb-prod, your custom filter would be: ‘db_cluster=mariadb-prod*
  4. For alerts applicable to a specific cluster within a production environment, your custom filter would be: 
    db_cluster=mariadb-1 and environment=prod (This assumes you have set the optional environment tag while configuring collection)

All monitors are disabled by default on installation, if you would like to enable all the monitors, set the parameter monitors_disabled to false in this file.
By default, the monitors are configured in a monitor folder called “MariaDB”, if you would like to change the name of the folder, update the monitor folder name in “folder” key at file.
If you would like the alerts to send email or connection notifications, configure these in the file For configuration examples, refer to the next section.

  1. Email and Connection Notification Configuration Examples

Modify the file and populate connection_notifications and email_notifications as per below examples.

Pagerduty Connection Example:
connection_notifications = [
      connection_type       = "PagerDuty",
      connection_id         = "<CONNECTION_ID>",
      payload_override      = "{\"service_key\": \"your_pagerduty_api_integration_key\",\"event_type\": \"trigger\",\"description\": \"Alert: Triggered {{TriggerType}} for Monitor {{Name}}\",\"client\": \"Sumo Logic\",\"client_url\": \"{{QueryUrl}}\"}",
      run_for_trigger_types = ["Critical", "ResolvedCritical"]
      connection_type       = "Webhook",
      connection_id         = "<CONNECTION_ID>",
      payload_override      = "",
      run_for_trigger_types = ["Critical", "ResolvedCritical"]

Replace <CONNECTION_ID> with the connection id of the webhook connection. The webhook connection id can be retrieved by calling the Monitors API.

For overriding payload for different connection types, refer to this document.

Email Notifications Example:
email_notifications = [
      connection_type       = "Email",
      recipients            = [""],
      subject               = "Monitor Alert: {{TriggerType}} on {{Name}}",
      time_zone             = "PST",
      message_body          = "Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}",
      run_for_trigger_types = ["Critical", "ResolvedCritical"]
  1.  Install the Alerts
    1. Navigate to the package directory terraform-sumologic-sumo-logic-monitor/monitor_packages/MariaDB/ and run terraform init. This will initialize Terraform and will download the required components.

    2. Run terraform plan to view the monitors which will be created/modified by Terraform.

    3. Run terraform apply.

  2.  Post Installation

If you haven’t enabled alerts and/or configured notifications through the Terraform procedure outlined above, we highly recommend enabling alerts of interest and configuring each enabled alert to send notifications to other users or services. This is detailed in Step 4 of this document.

Install the Sumo Logic App

This section demonstrates how to install the MariaDB App.

To install the app:

Locate and install the app you need from the App Catalog. If you want to see a preview of the dashboards included with the app before installing, click Preview Dashboards.

  1. From the App Catalog, search for and select the app. 

  2. Select the service version you're using and click Add to Library.

  1. To install the app, complete the following fields.

    1. App Name. You can retain the existing name or enter the app's name of your choice.

    2. Advanced. Select the Location in the Library (the default is the Personal folder in the library), or click New Folder to add a new folder.
  2. Click Add to Library.

Once an app is installed, it will appear in your Personal folder or another folder that you specified. From here, you can share it with your organization. 

Panels will start to fill automatically. It's important to note that each panel slowly fills with data matching the time range query received since the panel was created. Results won't immediately be available, but with a bit of time, you'll see full graphs and maps. 

Dashboard Filter with Template Variables 

Template variables provide dynamic dashboards that rescope data on the fly. As you apply variables to troubleshoot through your dashboard, you can view dynamic changes to the data for a fast resolution to the root cause. For more information, see the Filter with template variables help page.


MariaDB - Overview

The MariaDB - Overview dashboard gives you an at-a-glance view of the state of your database clusters by monitoring key cluster information such as errors, failed logins, errors, queries executed, slow queries, lock waits, uptime, and more. 

Use this dashboard to:

  • Quickly identify the state of a given database cluster

MariaDB - Error Logs

The MariaDB - Error Logs dashboard provides insight into database error logs by specifically monitoring database shutdown/start events, errors over time, errors, warnings, and crash recovery attempts.

Use this dashboard to

  • Quickly identify errors and patterns in logs for troubleshooting
  • Monitor trends in the error log and identify outliers 
  • Ensure that server start, server stop, and crash recovery events are in line with expectations
  • Dashboard filters allow you to narrow a search for the database clusters.

MariaDB - Failed Logins

The MariaDB - Failed Logins dashboard provides insights into all failed login attempts by location, users and hosts.

Use this dashboard to:

  • Monitor all failed login attempts and identify any unusual or suspicious activity

MariaDB - Replication

The MariaDB - Replication dashboard provides insights into the state of database replication.

Use this dashboard to:

  • Quickly determine reasons for replication failures
  • Monitor replication status trends 

MariaDB - Slow Queries

The MariaDB - Slow Queries dashboard provides insights into all slow queries executed on the database.

Use this dashboard to:

  • Identify all slow queries
  • Quickly determine which queries have been identified as slow or excessive slow queries
  • Monitor users and hosts running slow queries
  • Determine which SQL commands are slower than others
  • Examine slow query trends to determine if there are periodic performance bottlenecks in your database clusters

MariaDB - Performance and Resource Metrics

The MariaDB - Performance and Resource Metrics dashboard allows you to monitor the performance and resource usage of your database clusters.

Use this dashboard to:

  • Understand the behavior and performance of your database clusters
  • Monitor key operational metrics around connections, network traffic, threads running, innodb waits and locks.
  • Monitor query execution trends to ensure they match up with expectations
  • Dashboard filters allow you to narrow a search for a specific database cluster

MariaDB - Performance Schema Metrics

The MariaDB - Performance Schema Metrics Dashboard provides insights into the metrics provided by the MariaDB Performance Schema, which is a feature for monitoring MariaDB Server execution at a low level.

Use this dashboard to:

  • Monitor errors and warning for SQL statements 
  • Monitor statements running without use of index columns
  • Monitor statistics such as Table and Index waits and read and write lock waits to optimize the performance of your database

MariaDB - Replication Metrics

The MariaDB - Replication Metrics dashboard shows replication events, errors, warnings, and nodes.

MariaDB - InnoDB Metrics

The MariaDB - InnoDB Metrics dashboard shows replication events, errors, warnings, and nodes.

MariaDB - Table Peformance Metrics

The MariaDB - Table Performance Metrics dashboard provides insights into performance like table i/o wait and table lock waits.

Use this dashboard to

  • Identify root cause of slow queries performed on database table
  • Compare read and write lock waits time with timeshift operator to compare baseline and current trend.