{
  "name": "mysql",
  "title": "MySQL",
  "version": "1.30.3",
  "release": "ga",
  "description": "Collect error logs, slow logs, and performance metrics from MySQL via Elastic Agent.",
  "type": "integration",
  "download": "/epr/mysql/mysql-1.30.3.zip",
  "path": "/package/mysql/1.30.3",
  "icons": [
    {
      "src": "/img/logo_mysql.svg",
      "path": "/package/mysql/1.30.3/img/logo_mysql.svg",
      "title": "logo mysql",
      "size": "32x32",
      "type": "image/svg+xml"
    }
  ],
  "conditions": {
    "kibana": {
      "version": "^8.19.0 || ^9.2.1"
    },
    "elastic": {
      "subscription": "basic"
    }
  },
  "owner": {
    "type": "elastic",
    "github": "elastic/obs-infraobs-integrations"
  },
  "categories": [
    "datastore",
    "observability"
  ],
  "signature_path": "/epr/mysql/mysql-1.30.3.zip.sig",
  "group": "mysql",
  "format_version": "3.4.0",
  "readme": "/package/mysql/1.30.3/docs/README.md",
  "license": "basic",
  "screenshots": [
    {
      "src": "/img/kibana-mysql.png",
      "path": "/package/mysql/1.30.3/img/kibana-mysql.png",
      "title": "kibana mysql",
      "size": "1227x1026",
      "type": "image/png"
    },
    {
      "src": "/img/metricbeat-mysql.png",
      "path": "/package/mysql/1.30.3/img/metricbeat-mysql.png",
      "title": "metricbeat mysql",
      "size": "2562x2540",
      "type": "image/png"
    },
    {
      "src": "/img/mysql-replica_status-dashboard.png",
      "path": "/package/mysql/1.30.3/img/mysql-replica_status-dashboard.png",
      "title": "mysql replica status",
      "size": "1898x1190",
      "type": "image/png"
    }
  ],
  "assets": [
    "/package/mysql/1.30.3/LICENSE.txt",
    "/package/mysql/1.30.3/changelog.yml",
    "/package/mysql/1.30.3/manifest.yml",
    "/package/mysql/1.30.3/docs/README.md",
    "/package/mysql/1.30.3/img/kibana-mysql.png",
    "/package/mysql/1.30.3/img/logo_mysql.svg",
    "/package/mysql/1.30.3/img/metricbeat-mysql.png",
    "/package/mysql/1.30.3/img/mysql-replica_status-dashboard.png",
    "/package/mysql/1.30.3/data_stream/error/manifest.yml",
    "/package/mysql/1.30.3/data_stream/error/sample_event.json",
    "/package/mysql/1.30.3/data_stream/galera_status/manifest.yml",
    "/package/mysql/1.30.3/data_stream/galera_status/sample_event.json",
    "/package/mysql/1.30.3/data_stream/performance/manifest.yml",
    "/package/mysql/1.30.3/data_stream/performance/sample_event.json",
    "/package/mysql/1.30.3/data_stream/replica_status/manifest.yml",
    "/package/mysql/1.30.3/data_stream/replica_status/sample_event.json",
    "/package/mysql/1.30.3/data_stream/slowlog/manifest.yml",
    "/package/mysql/1.30.3/data_stream/slowlog/sample_event.json",
    "/package/mysql/1.30.3/data_stream/status/manifest.yml",
    "/package/mysql/1.30.3/data_stream/status/sample_event.json",
    "/package/mysql/1.30.3/kibana/alerting_rule_template/mysql-galera-cluster-state.json",
    "/package/mysql/1.30.3/kibana/alerting_rule_template/mysql-replication-lag.json",
    "/package/mysql/1.30.3/kibana/alerting_rule_template/mysql-slow-queries.json",
    "/package/mysql/1.30.3/kibana/dashboard/mysql-57b3fb50-6309-11ea-a83e-25b8612d00cc.json",
    "/package/mysql/1.30.3/kibana/dashboard/mysql-Logs-MySQL-Dashboard.json",
    "/package/mysql/1.30.3/kibana/dashboard/mysql-df471c8c-e8d0-4a06-8a3c-44a4e0429bca.json",
    "/package/mysql/1.30.3/data_stream/error/fields/agent.yml",
    "/package/mysql/1.30.3/data_stream/error/fields/base-fields.yml",
    "/package/mysql/1.30.3/data_stream/error/fields/fields.yml",
    "/package/mysql/1.30.3/data_stream/error/fields/package-fields.yml",
    "/package/mysql/1.30.3/data_stream/galera_status/fields/agent.yml",
    "/package/mysql/1.30.3/data_stream/galera_status/fields/base-fields.yml",
    "/package/mysql/1.30.3/data_stream/galera_status/fields/ecs.yml",
    "/package/mysql/1.30.3/data_stream/galera_status/fields/fields.yml",
    "/package/mysql/1.30.3/data_stream/performance/fields/agent.yml",
    "/package/mysql/1.30.3/data_stream/performance/fields/base-fields.yml",
    "/package/mysql/1.30.3/data_stream/performance/fields/ecs.yml",
    "/package/mysql/1.30.3/data_stream/performance/fields/fields.yml",
    "/package/mysql/1.30.3/data_stream/replica_status/fields/base-fields.yml",
    "/package/mysql/1.30.3/data_stream/replica_status/fields/ecs.yml",
    "/package/mysql/1.30.3/data_stream/replica_status/fields/fields.yml",
    "/package/mysql/1.30.3/data_stream/slowlog/fields/agent.yml",
    "/package/mysql/1.30.3/data_stream/slowlog/fields/base-fields.yml",
    "/package/mysql/1.30.3/data_stream/slowlog/fields/fields.yml",
    "/package/mysql/1.30.3/data_stream/slowlog/fields/package-fields.yml",
    "/package/mysql/1.30.3/data_stream/status/fields/agent.yml",
    "/package/mysql/1.30.3/data_stream/status/fields/base-fields.yml",
    "/package/mysql/1.30.3/data_stream/status/fields/ecs.yml",
    "/package/mysql/1.30.3/data_stream/status/fields/fields.yml",
    "/package/mysql/1.30.3/data_stream/error/agent/stream/stream.yml.hbs",
    "/package/mysql/1.30.3/data_stream/error/elasticsearch/ingest_pipeline/default.yml",
    "/package/mysql/1.30.3/data_stream/galera_status/agent/stream/stream.yml.hbs",
    "/package/mysql/1.30.3/data_stream/performance/agent/stream/stream.yml.hbs",
    "/package/mysql/1.30.3/data_stream/performance/elasticsearch/ingest_pipeline/default.yml",
    "/package/mysql/1.30.3/data_stream/replica_status/agent/stream/stream.yml.hbs",
    "/package/mysql/1.30.3/data_stream/replica_status/elasticsearch/ingest_pipeline/default.yml",
    "/package/mysql/1.30.3/data_stream/slowlog/agent/stream/stream.yml.hbs",
    "/package/mysql/1.30.3/data_stream/slowlog/elasticsearch/ingest_pipeline/default.json",
    "/package/mysql/1.30.3/data_stream/status/agent/stream/stream.yml.hbs"
  ],
  "policy_templates": [
    {
      "name": "mysql",
      "title": "MySQL logs and metrics",
      "description": "Collect logs and metrics from MySQL instances",
      "inputs": [
        {
          "type": "logfile",
          "vars": [
            {
              "name": "condition",
              "type": "text",
              "title": "Condition",
              "description": "Condition to filter when to collect this datastream. See [Dynamic Input Configuration](https://www.elastic.co/guide/en/fleet/current/dynamic-input-configuration.html) for details.",
              "multi": false,
              "required": false,
              "show_user": false
            }
          ],
          "title": "Collect logs from MySQL hosts",
          "description": "Collecting MySQL error and slowlog logs"
        },
        {
          "type": "mysql/metrics",
          "vars": [
            {
              "name": "hosts",
              "type": "text",
              "title": "MySQL DSN",
              "multi": true,
              "required": true,
              "show_user": true,
              "default": [
                "tcp(127.0.0.1:3306)/"
              ]
            },
            {
              "name": "username",
              "type": "text",
              "title": "Username",
              "multi": false,
              "required": false,
              "show_user": false,
              "default": "root"
            },
            {
              "name": "password",
              "type": "password",
              "title": "Password",
              "multi": false,
              "required": false,
              "show_user": false,
              "default": "test"
            },
            {
              "name": "ssl",
              "type": "yaml",
              "title": "SSL Configuration",
              "description": "SSL configuration options. See [documentation](https://www.elastic.co/guide/en/fleet/current/elastic-agent-ssl-configuration.html) for details.",
              "multi": false,
              "required": false,
              "show_user": false,
              "default": "#certificate_authorities:\n#  - |\n#    -----BEGIN CERTIFICATE-----\n#    MIIDCjCCAfKgAwIBAgITJ706Mu2wJlKckpIvkWxEHvEyijANBgkqhkiG9w0BAQsF\n#    ADAUMRIwEAYDVQQDDAlsb2NhbGhvc3QwIBcNMTkwNzIyMTkyOTA0WhgPMjExOTA2\n#    MjgxOTI5MDRaMBQxEjAQBgNVBAMMCWxvY2FsaG9zdDCCASIwDQYJKoZIhvcNAQEB\n#    BQADggEPADCCAQoCggEBANce58Y/JykI58iyOXpxGfw0/gMvF0hUQAcUrSMxEO6n\n#    fZRA49b4OV4SwWmA3395uL2eB2NB8y8qdQ9muXUdPBWE4l9rMZ6gmfu90N5B5uEl\n#    94NcfBfYOKi1fJQ9i7WKhTjlRkMCgBkWPkUokvBZFRt8RtF7zI77BSEorHGQCk9t\n#    /D7BS0GJyfVEhftbWcFEAG3VRcoMhF7kUzYwp+qESoriFRYLeDWv68ZOvG7eoWnP\n#    PsvZStEVEimjvK5NSESEQa9xWyJOmlOKXhkdymtcUd/nXnx6UTCFgnkgzSdTWV41\n#    CI6B6aJ9svCTI2QuoIq2HxX/ix7OvW1huVmcyHVxyUECAwEAAaNTMFEwHQYDVR0O\n#    BBYEFPwN1OceFGm9v6ux8G+DZ3TUDYxqMB8GA1UdIwQYMBaAFPwN1OceFGm9v6ux\n#    8G+DZ3TUDYxqMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAG5D\n#    874A4YI7YUwOVsVAdbWtgp1d0zKcPRR+r2OdSbTAV5/gcS3jgBJ3i1BN34JuDVFw\n#    3DeJSYT3nxy2Y56lLnxDeF8CUTUtVQx3CuGkRg1ouGAHpO/6OqOhwLLorEmxi7tA\n#    H2O8mtT0poX5AnOAhzVy7QW0D/k4WaoLyckM5hUa6RtvgvLxOwA0U+VGurCDoctu\n#    8F4QOgTAWyh8EZIwaKCliFRSynDpv3JTUwtfZkxo6K6nce1RhCWFAsMvDZL8Dgc0\n#    yvgJ38BRsFOtkRuAGSf6ZUwTO8JJRRIFnpUzXflAnGivK9M13D5GEQMmIl6U9Pvk\n#    sxSmbIUfc2SGJGCJD4I=\n#    -----END CERTIFICATE-----\n"
            },
            {
              "name": "condition",
              "type": "text",
              "title": "Condition",
              "description": "Condition to filter when to collect this datastream. See [Dynamic Input Configuration](https://www.elastic.co/guide/en/fleet/current/dynamic-input-configuration.html) for details.",
              "multi": false,
              "required": false,
              "show_user": false
            }
          ],
          "title": "Collect metrics from MySQL hosts",
          "description": "Collecting MySQL status and galera_status metrics"
        },
        {
          "type": "sql/metrics",
          "vars": [
            {
              "name": "hosts",
              "type": "text",
              "title": "MySQL DSN",
              "multi": true,
              "required": true,
              "show_user": true,
              "default": [
                "username:password@tcp(localhost:3306)/"
              ]
            },
            {
              "name": "replication_status_query",
              "type": "text",
              "title": "Replica status query",
              "description": "If MySQL version is less than or equal to 8.0.22 then replace the query \"SHOW REPLICA STATUS;\" with \"SHOW SLAVE STATUS;\"",
              "multi": false,
              "required": true,
              "show_user": true,
              "default": "SHOW REPLICA STATUS;"
            },
            {
              "name": "ssl",
              "type": "yaml",
              "title": "SSL Configuration",
              "description": "SSL configuration options. See [documentation](https://www.elastic.co/guide/en/fleet/current/elastic-agent-ssl-configuration.html) for details.",
              "multi": false,
              "required": false,
              "show_user": false,
              "default": "#certificate_authorities:\n#  - |\n#    -----BEGIN CERTIFICATE-----\n#    MIIDCjCCAfKgAwIBAgITJ706Mu2wJlKckpIvkWxEHvEyijANBgkqhkiG9w0BAQsF\n#    ADAUMRIwEAYDVQQDDAlsb2NhbGhvc3QwIBcNMTkwNzIyMTkyOTA0WhgPMjExOTA2\n#    MjgxOTI5MDRaMBQxEjAQBgNVBAMMCWxvY2FsaG9zdDCCASIwDQYJKoZIhvcNAQEB\n#    BQADggEPADCCAQoCggEBANce58Y/JykI58iyOXpxGfw0/gMvF0hUQAcUrSMxEO6n\n#    fZRA49b4OV4SwWmA3395uL2eB2NB8y8qdQ9muXUdPBWE4l9rMZ6gmfu90N5B5uEl\n#    94NcfBfYOKi1fJQ9i7WKhTjlRkMCgBkWPkUokvBZFRt8RtF7zI77BSEorHGQCk9t\n#    /D7BS0GJyfVEhftbWcFEAG3VRcoMhF7kUzYwp+qESoriFRYLeDWv68ZOvG7eoWnP\n#    PsvZStEVEimjvK5NSESEQa9xWyJOmlOKXhkdymtcUd/nXnx6UTCFgnkgzSdTWV41\n#    CI6B6aJ9svCTI2QuoIq2HxX/ix7OvW1huVmcyHVxyUECAwEAAaNTMFEwHQYDVR0O\n#    BBYEFPwN1OceFGm9v6ux8G+DZ3TUDYxqMB8GA1UdIwQYMBaAFPwN1OceFGm9v6ux\n#    8G+DZ3TUDYxqMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAG5D\n#    874A4YI7YUwOVsVAdbWtgp1d0zKcPRR+r2OdSbTAV5/gcS3jgBJ3i1BN34JuDVFw\n#    3DeJSYT3nxy2Y56lLnxDeF8CUTUtVQx3CuGkRg1ouGAHpO/6OqOhwLLorEmxi7tA\n#    H2O8mtT0poX5AnOAhzVy7QW0D/k4WaoLyckM5hUa6RtvgvLxOwA0U+VGurCDoctu\n#    8F4QOgTAWyh8EZIwaKCliFRSynDpv3JTUwtfZkxo6K6nce1RhCWFAsMvDZL8Dgc0\n#    yvgJ38BRsFOtkRuAGSf6ZUwTO8JJRRIFnpUzXflAnGivK9M13D5GEQMmIl6U9Pvk\n#    sxSmbIUfc2SGJGCJD4I=\n#    -----END CERTIFICATE-----\n"
            },
            {
              "name": "condition",
              "type": "text",
              "title": "Condition",
              "description": "Condition to filter when to collect this datastream. See [Dynamic Input Configuration](https://www.elastic.co/guide/en/fleet/current/dynamic-input-configuration.html) for details.",
              "multi": false,
              "required": false,
              "show_user": false
            }
          ],
          "title": "Collect replica status metrics from MySQL hosts",
          "description": "Collecting replica status metrics"
        }
      ],
      "multiple": true
    }
  ],
  "data_streams": [
    {
      "type": "logs",
      "dataset": "mysql.error",
      "title": "MySQL error logs",
      "release": "ga",
      "ingest_pipeline": "default",
      "streams": [
        {
          "input": "logfile",
          "vars": [
            {
              "name": "paths",
              "type": "text",
              "title": "Error log paths",
              "multi": true,
              "required": true,
              "show_user": true,
              "default": [
                "/var/log/mysql/error.log*",
                "/var/log/mysqld.log*"
              ]
            },
            {
              "name": "tags",
              "type": "text",
              "title": "Tags",
              "multi": true,
              "required": true,
              "show_user": false,
              "default": [
                "mysql-error"
              ]
            },
            {
              "name": "preserve_original_event",
              "type": "bool",
              "title": "Preserve original event",
              "description": "Preserves a raw copy of the original event, added to the field `event.original`",
              "multi": false,
              "required": true,
              "show_user": true,
              "default": false
            },
            {
              "name": "processors",
              "type": "yaml",
              "title": "Processors",
              "description": "Processors are used to reduce the number of fields in the exported event or to enhance the event with metadata. This executes in the agent before the logs are parsed. See [Processors](https://www.elastic.co/guide/en/beats/filebeat/current/filtering-and-enhancing-data.html) for details.",
              "multi": false,
              "required": false,
              "show_user": false
            }
          ],
          "template_path": "stream.yml.hbs",
          "title": "MySQL error logs",
          "description": "Collect MySQL error logs",
          "enabled": true,
          "ingestion_method": "File"
        }
      ],
      "package": "mysql",
      "path": "error"
    },
    {
      "type": "metrics",
      "dataset": "mysql.galera_status",
      "title": "MySQL galera_status metrics",
      "release": "beta",
      "streams": [
        {
          "input": "mysql/metrics",
          "vars": [
            {
              "name": "period",
              "type": "text",
              "title": "Period",
              "multi": false,
              "required": true,
              "show_user": true,
              "default": "10s"
            },
            {
              "name": "raw",
              "type": "bool",
              "title": "Raw",
              "description": "When enabled, in addition to the existing data structure, all fields available from the mysql service through \"SHOW /*!50002 GLOBAL */ STATUS;\" will be added to the event.\n",
              "multi": false,
              "required": false,
              "show_user": false,
              "default": false
            },
            {
              "name": "processors",
              "type": "yaml",
              "title": "Processors",
              "description": "Processors are used to reduce the number of fields in the exported event or to enhance the event with metadata. This executes in the agent before the events are shipped. See [Processors](https://www.elastic.co/guide/en/fleet/current/elastic-agent-processor-configuration.html) for details.\n",
              "multi": false,
              "required": false,
              "show_user": false
            }
          ],
          "template_path": "stream.yml.hbs",
          "title": "MySQL galera_status metrics",
          "description": "Collect MySQL galera_status metrics",
          "enabled": false,
          "ingestion_method": "Database"
        }
      ],
      "package": "mysql",
      "elasticsearch": {},
      "path": "galera_status"
    },
    {
      "type": "metrics",
      "dataset": "mysql.performance",
      "title": "MySQL performance metrics",
      "release": "beta",
      "ingest_pipeline": "default",
      "streams": [
        {
          "input": "mysql/metrics",
          "vars": [
            {
              "name": "period",
              "type": "text",
              "title": "Period",
              "multi": false,
              "required": true,
              "show_user": true,
              "default": "10s"
            },
            {
              "name": "raw",
              "type": "bool",
              "title": "Raw",
              "multi": false,
              "required": true,
              "show_user": true,
              "default": false
            },
            {
              "name": "processors",
              "type": "yaml",
              "title": "Processors",
              "description": "Processors are used to reduce the number of fields in the exported event or to enhance the event with metadata. This executes in the agent before the events are shipped. See [Processors](https://www.elastic.co/guide/en/fleet/current/elastic-agent-processor-configuration.html) for details.\n",
              "multi": false,
              "required": false,
              "show_user": false
            }
          ],
          "template_path": "stream.yml.hbs",
          "title": "MySQL performance metrics",
          "description": "Collect MySQL performance metrics",
          "enabled": true,
          "ingestion_method": "Database"
        }
      ],
      "package": "mysql",
      "elasticsearch": {
        "ingest_pipeline.name": "default"
      },
      "path": "performance"
    },
    {
      "type": "metrics",
      "dataset": "mysql.replica_status",
      "title": "Collect replica status metrics from mysql",
      "release": "beta",
      "ingest_pipeline": "default",
      "streams": [
        {
          "input": "sql/metrics",
          "vars": [
            {
              "name": "period",
              "type": "text",
              "title": "Period",
              "description": "Period of fetching metrics. Supported units for this parameter are h/m/s.",
              "multi": false,
              "required": true,
              "show_user": true,
              "default": "10m"
            },
            {
              "name": "tags",
              "type": "text",
              "title": "Tags",
              "multi": true,
              "required": true,
              "show_user": false,
              "default": [
                "mysql-replica_status"
              ]
            },
            {
              "name": "processors",
              "type": "yaml",
              "title": "Processors",
              "description": "Processors are used to reduce the number of fields in the exported event or to enhance the event with metadata. This executes in the agent before the logs are parsed. See [Processors](https://www.elastic.co/guide/en/fleet/current/elastic-agent-processor-configuration.html) for details.",
              "multi": false,
              "required": false,
              "show_user": false
            }
          ],
          "template_path": "stream.yml.hbs",
          "title": "MySQL replica status metrics",
          "description": "Collect replica status metrics from MySQL.",
          "enabled": true,
          "ingestion_method": "Database"
        }
      ],
      "package": "mysql",
      "elasticsearch": {
        "ingest_pipeline.name": "default"
      },
      "path": "replica_status"
    },
    {
      "type": "logs",
      "dataset": "mysql.slowlog",
      "title": "MySQL slowlog logs",
      "release": "ga",
      "ingest_pipeline": "default",
      "streams": [
        {
          "input": "logfile",
          "vars": [
            {
              "name": "paths",
              "type": "text",
              "title": "Slowlog paths",
              "multi": true,
              "required": true,
              "show_user": true,
              "default": [
                "/var/log/mysql/*-slow.log*",
                "/var/lib/mysql/*-slow.log*"
              ]
            },
            {
              "name": "tags",
              "type": "text",
              "title": "Tags",
              "multi": true,
              "required": true,
              "show_user": false,
              "default": [
                "mysql-slowlog"
              ]
            },
            {
              "name": "preserve_original_event",
              "type": "bool",
              "title": "Preserve original event",
              "description": "Preserves a raw copy of the original event, added to the field `event.original`",
              "multi": false,
              "required": true,
              "show_user": true,
              "default": false
            },
            {
              "name": "processors",
              "type": "yaml",
              "title": "Processors",
              "description": "Processors are used to reduce the number of fields in the exported event or to enhance the event with metadata. This executes in the agent before the logs are parsed. See [Processors](https://www.elastic.co/guide/en/beats/filebeat/current/filtering-and-enhancing-data.html) for details.",
              "multi": false,
              "required": false,
              "show_user": false
            }
          ],
          "template_path": "stream.yml.hbs",
          "title": "MySQL slowlog logs (log)",
          "description": "Collect MySQL slowlog logs using log input",
          "enabled": true,
          "ingestion_method": "File"
        }
      ],
      "package": "mysql",
      "path": "slowlog"
    },
    {
      "type": "metrics",
      "dataset": "mysql.status",
      "title": "MySQL status metrics",
      "release": "ga",
      "streams": [
        {
          "input": "mysql/metrics",
          "vars": [
            {
              "name": "period",
              "type": "text",
              "title": "Period",
              "multi": false,
              "required": true,
              "show_user": true,
              "default": "10s"
            },
            {
              "name": "raw",
              "type": "bool",
              "title": "Raw",
              "multi": false,
              "required": true,
              "show_user": true,
              "default": false
            },
            {
              "name": "processors",
              "type": "yaml",
              "title": "Processors",
              "description": "Processors are used to reduce the number of fields in the exported event or to enhance the event with metadata. This executes in the agent before the events are shipped. See [Processors](https://www.elastic.co/guide/en/fleet/current/elastic-agent-processor-configuration.html) for details.\n",
              "multi": false,
              "required": false,
              "show_user": false
            }
          ],
          "template_path": "stream.yml.hbs",
          "title": "MySQL status metrics",
          "description": "Collect MySQL status metrics",
          "enabled": true,
          "ingestion_method": "Database"
        }
      ],
      "package": "mysql",
      "elasticsearch": {},
      "path": "status"
    }
  ]
}
