Skip to content

[BUG] Missing tags from MySQL metrics #51280

@orange-kao

Description

@orange-kao

Agent version

7.79.0

Bug Report

MySQL related metrics does no longer carry tags specified from "tags" in datadog config. The content of host tag also changed.

This issue started on 7.79.0. Datadog-agent 7.78.4 is unaffected.

Reproduction Steps

  1. Create a Fedora 43 x86_64 cloud VM on AWS (AMI ID ami-00e68de54950d69a2, ap-southeast-2 region)
  2. Install MySQL server sudo dnf install mysql-server
  3. Start MySQL server sudo systemctl start mysqld
  4. Set MySQL server root password mysqladmin -u root -p password
  5. Install datadog-agent 7.79.0 wget https://s3.amazonaws.com/yum.datadoghq.com/stable/7/x86_64/datadog-agent-7.79.0-1.x86_64.rpm and sudo dnf install datadog-agent-7.79.0-1.x86_64.rpm
  6. Configure /etc/datadog-agent/datadog.yaml with content below
{
    "api_key": "XXXXXXXXXXXXXXXXXXXXXX",
    "apm_config": {
        "enabled": false
    },
    "bind_host": "localhost",
    "disable_file_logging": true,
    "enable_metadata_collection": true,
    "hostname": "mysql-hostname-1.test",
    "log_level": "warn",
    "site": "datadoghq.com",
    "tags": [
        "aiven-cloud-az:australia-southeast1-b",
        "aiven-cloud:google-australia-southeast1",
        "aiven-node-state:RUNNING",
        "aiven-primary-node:true",
        "aiven-project:test",
        "aiven-service-type:mysql",
        "aiven-service:orange-test-service"
    ]
}
  1. Configure /etc/datadog-agent/conf.d/mysql.yaml with content below
{
    "init_config": {},
    "instances": [
        {
            "server": "::1",
            "ssl": {
                "require": true
            },
            "username": "root",
            "password": "YOUR_MYSQL_ROOT_PASSWORD"
        }
    ]
}
  1. Restart datadog-agent sudo systemctl restart datadog-agent
  2. Go to "Quick Graph" page at Datadog HQ, to show metrics mysql.net.connections from (everywhere) avg by host aiven-service

Expected result (also the behaviour of DD 7.78.4)

Metrics displayed with tag host:mysql-hostname-1.test and aiven-service:orange-test-service

Actual result (behaviour of DD 7.79.0)

Metrics displayed with tag host:::1 and aiven-service:N/A

Additional information:

  • "system" metrics (e.g. system.load.5) are unaffected (still carry expected tags)
  • "postgresql" metrics (e.g. postgresql.connections) are unaffected (still carry expected tags)

Operating System

Fedora 43 x86_64 on AWS, AMI ID ami-00e68de54950d69a2 (AWS ap-southeast-2 region)

Other environment details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    oss/0External contributions priority 0pendingLabel for issues waiting a Datadog member's response.team/database-monitoring

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions