-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Error monitoring MySQL - list index out of range #13942
Comments
Same issue happening with mariadb 10.11.2 and agent v7.43.0. |
Similar issue: Oracle Linux 7
|
Will anyone from maintainers be able to at least triage the issue? |
Similar issue: |
This is happening also on mariadb v10.11.2, ubuntu 22.04 LTS and datadog 7.43.1. |
This needs fixing, it was fine with mariadb 10.6.11 but having moved to 10.11.2 it also break in that way Rocky 8.7 This will become an increasing problem as 10.11.2 went GA LTS just recently |
This problem exists because of a change in the output of : SHOW ENGINE INNODB STATUS; Rocky 8.7 The datadog agent under previous versions of MariaDB decodes the following output from that command :
The new output looks like this :
In /opt/datadog-agent/embedded/lib/python3.8/site-packages/datadog_checks/mysql/innodb_metrics.py line 205 :
Is where the issue lies A workaround for this is to change that section to the following (with a loss of some stats but the agent will at least work for key indicators like replication lag) :
I'll report this issue through the support channel also so hopefully it will get some attention |
I can also confirm this, for:
An easier workaround is to set "disable_innodb_metrics" to true, then "only" the InnoDB metrics are missing. |
There is an optional mysql integration package available which solves this issue, to install on centos/rhel/rocky do the following (cannot be run as root though - the below allow it run run as datadog agent while executing as root as dd-agent has no shell) : su --shell=/bin/bash --session-command="export TERM=xterm;datadog-agent integration install datadog-mysql==10.2.0" dd-agent systemctl restart datadog-agent datadog-agent check mysql |
Also, if needed, there is this page dedicated to the commands needed to install this version. The key is being able to run something similar to These changes were just implemented last week after work done on this PR Hope this helps get everyone back up and running! |
Agent Environment
Agent 7.42.0 - Commit: 1b72bcf - Serialization version: v5.0.46 - Go version: go1.18.9
Describe what happened:
ERROR | (pkg/collector/worker/check_logger.go:69 in Error) | check:mysql | Error running check: [{"message": "list index out of range", "traceback": "Traceback (most recent call last):\n File \"/opt/datadog-agent/embedded/lib/python3.8/site-packages/datadog_checks/base/checks/base.py\", line 1122, in run\n self.check(instance)\n File \"/opt/datadog-agent/embedded/lib/python3.8/site-packages/datadog_checks/mysql/mysql.py\", line 248, in check\n raise e\n File \"/opt/datadog-agent/embedded/lib/python3.8/site-packages/datadog_checks/mysql/mysql.py\", line 229, in check\n self._collect_metrics(db, tags=tags)\n File \"/opt/datadog-agent/embedded/lib/python3.8/site-packages/datadog_checks/mysql/mysql.py\", line 378, in _collect_metrics\n results.update(self.innodb_stats.get_stats_from_innodb_status(db))\n File \"/opt/datadog-agent/embedded/lib/python3.8/site-packages/datadog_checks/mysql/innodb_metrics.py\", line 207, in get_stats_from_innodb_status\n results['Innodb_pending_log_flushes'] = long(row[4])\nIndexError: list index out of range\n"}]
Describe what you expected:
Monitoring InnoDB data from mariadb
Steps to reproduce the issue:
initi_config
instances:
server: 127.0.0.1
user: datadog
pass: "pass" # from the CREATE USER step earlier
port: "3306" # e.g. 3306
options:
replication: false
galera_cluster: true
extra_status_metrics: true
extra_innodb_metrics: true
extra_performance_metrics: true
schema_size_metrics: false
disable_innodb_metrics: false
Additional environment details (Operating System, Cloud provider, etc):
Ubuntu 20.04
Kernel 5.4.0-136-generic
MariaDB 10.10.2
The text was updated successfully, but these errors were encountered: