Docs » Supported integrations in Splunk Observability Cloud » Collector components: Receivers » MySQL receiver

MySQL receiver ๐Ÿ”—

The MySQL receiver queries and retrieves metrics about MySQLโ€™s global status and InnoDB tables. The supported pipeline type is metrics. See Process your data with pipelines for more information.

Prerequisites and requirements ๐Ÿ”—

This receiver supports MySQL version 8.0.

Requirements to collect metrics ๐Ÿ”—

The following applies:

  • To collect most metrics, you need to be able to execute SHOW GLOBAL STATUS.

  • Some metrics donโ€™t appear if their corresponding feature is inactive.

  • To collect optional metrics you must specify them your configuration.

For the full list of available metrics, see Metrics.

Get started ๐Ÿ”—

Follow these steps to configure and activate the component:

  1. Deploy the Splunk Distribution of the OpenTelemetry Collector to your host or container platform:

  1. Configure the MySQL receiver as described in the next section.

  2. Restart the Collector.

Sample configuration ๐Ÿ”—

To activate the receiver, add mysql to the receivers section of your configuration file:

    endpoint: localhost:3306
    username: otel
    password: ${env:MYSQL_PASSWORD}
    database: otel
    collection_interval: 10s
    initial_delay: 1s
      digest_text_limit: 120
      time_limit: 24h
      limit: 250

Next, include the receiver in the metrics pipeline of the service section of your configuration file:

        - mysql

The following settings are optional:

  • endpoint. localhost:3306 by default.

  • tls. Defines the TLS configuration to use. If tls is not set, the default is to disable TLS connections.

    • insecure. false by default. Set to true to disable TLS connections.

    • insecure_skip_verify. false by default. Set to true to enable TLS but not verify the certificate.

    • server_name_override. Use this to set the ServerName in the TLSConfig.

  • username. root by default.

  • password. The password to the username.

  • allow_native_passwords. true by default.

  • database. The database name. If unspecified, metrics are collected for all databases.

  • collection_interval. 10s by default. This receiver collects metrics on this interval.

    • This value must be a string readable by Golangโ€™s ParseDuration function. Learn more at Golangโ€™s official documentation at ParseDuration .

    • Valid time units are ns, us (or ยตs), ms, s, m, or h.

  • initial_delay. 1s by default. Defines how long this receiver waits before starting.

  • transport. tcp by default. Defines the network to use to connect to the server.

  • statement_events. Additional configuration for the queries that build mysql.statement_events.count and mysql.statement_events.wait.time metrics:

    • digest_text_limit. 120 by default. Maximum length of digest_text. Longer text is truncated.

    • time_limit. 24h by default. Maximum time from since the statements have been observed last time.

    • limit. 250 by default. Limit of records, which is maximum number of generated metrics.

Settings ๐Ÿ”—

The following table shows the configuration options for the MySQL receiver:

Metrics ๐Ÿ”—

The following metrics, resource attributes, and attributes, are available.

Activate or deactivate specific metrics ๐Ÿ”—

You can activate or deactivate specific metrics by setting the enabled field in the metrics section for each metric. For example:

        enabled: true
        enabled: false

The following is an example of host metrics receiver configuration with activated metrics:

            enabled: true


Deactivated metrics arenโ€™t sent to Splunk Observability Cloud.

Troubleshooting ๐Ÿ”—

If you are a Splunk Observability Cloud customer and are not able to see your data in Splunk Observability Cloud, you can get help in the following ways.

Available to Splunk Observability Cloud customers

Available to prospective customers and free trial users

  • Ask a question and get answers through community support at Splunk Answers .

  • Join the Splunk #observability user group Slack channel to communicate with customers, partners, and Splunk employees worldwide. To join, see Chat groups in the Get Started with Splunk Community manual.

This page was last updated on May 29, 2024.