Skip to content
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

perf_schema_events_statements was collected before with the same name and label values #456

Open
ostavnaas opened this issue Mar 17, 2020 · 2 comments

Comments

@ostavnaas
Copy link

ostavnaas commented Mar 17, 2020

Host operating system: output of uname -a

Linux 4.19.0-0.bpo.6-amd64 #1 SMP Debian 4.19.67-2+deb10u2~bpo9+1 (2019-11-12) x86_64 GNU/Linux

mysqld_exporter version: output of mysqld_exporter --version

mysqld_exporter, version 0.12.1 (branch: HEAD, revision: 48667bf)
build user: root@0b3e56a7bc0a
build date: 20190729-12:35:58
go version: go1.12.7

MySQL server version

mysql Ver 14.14 Distrib 5.6.32-78.0, for debian-linux-gnu (x86_64) using 6.3

mysqld_exporter command line flags

ARGS='--config.my-cnf /etc/mysql/debian.cnf --collect.auto_increment.columns --collect.binlog_size --collect.global_status --collect.global_variables --collect.info_schema.innodb_metrics --collect.info_schema.processlist --collect.info_schema.query_response_time --collect.info_schema.tables --collect.info_schema.tablestats --collect.info_schema.userstats --collect.info_schema.clientstats --collect.perf_schema.eventsstatements --collect.perf_schema.eventswaits --collect.perf_schema.file_events --collect.mysql.user --collect.slave_status'

What did you do that produced an error?

I did not write the code that operates on this database, so I don't know what queries that was ran.
But there seems to be related to a BEGIN statement.
When I ran this query while the error occurred i got two result with the same digest, digest_text and schema. This is there for not uniq

Result from query:

SCHEMA_NAME     DIGEST  DIGEST_TEXT     COUNT_STAR      SUM_TIMER_WAIT  SUM_ERRORS      SUM_WARNINGS    SUM_ROWS_AFFECTED       SUM_ROWS_SENT   SUM_ROWS_EXAMINED       SUM_CREATED_TMP_DISK_TABLES     SUM_CREATED_TMP_TABLES  SUM_SORT_MERGE_PASSES   SUM_SORT_ROWS   SUM_NO_IND
EX_USED
myschema   a9d847b1b646cdc5781d41422ffb4aa2        BEGIN   6158074 102564392895000 0       0       0       0       0       0       0       0       0       0
myschema   a9d847b1b646cdc5781d41422ffb4aa2        BEGIN   1243374 21878792674000  0       0       0       0       0       0       0       0       0       0
**CROPPED

What did you expect to see?

A successful scrape

What did you see instead?

An error has occurred while serving metrics:

12 error(s) occurred:
* [from Gatherer #2] collected metric "mysql_perf_schema_events_statements_total" { label:<name:"digest" value:"a9d847b1b646cdc5781d41422ffb4aa2" > label:<name:"digest_text" value:"BEGIN " > label:<name:"schema" value:"myschema" > counter:<value:1.144321e+06 > } was collected before with the same name and label values
* [from Gatherer #2] collected metric "mysql_perf_schema_events_statements_seconds_total" { label:<name:"digest" value:"a9d847b1b646cdc5781d41422ffb4aa2" > label:<name:"digest_text" value:"BEGIN " > label:<name:"schema" value:"myschema" > counter:<value:20.17862139 > } was collected before with the same name and label values
* [from Gatherer #2] collected metric "mysql_perf_schema_events_statements_errors_total" { label:<name:"digest" value:"a9d847b1b646cdc5781d41422ffb4aa2" > label:<name:"digest_text" value:"BEGIN " > label:<name:"schema" value:"myschema" > counter:<value:0 > } was collected before with the same name and label values
* [from Gatherer #2] collected metric "mysql_perf_schema_events_statements_warnings_total" { label:<name:"digest" value:"a9d847b1b646cdc5781d41422ffb4aa2" > label:<name:"digest_text" value:"BEGIN " > label:<name:"schema" value:"myschema" > counter:<value:0 > } was collected before with the same name and label values
* [from Gatherer #2] collected metric "mysql_perf_schema_events_statements_rows_affected_total" { label:<name:"digest" value:"a9d847b1b646cdc5781d41422ffb4aa2" > label:<name:"digest_text" value:"BEGIN " > label:<name:"schema" value:"myschema" > counter:<value:0 > } was collected before with the same name and label values
* [from Gatherer #2] collected metric "mysql_perf_schema_events_statements_rows_sent_total" { label:<name:"digest" value:"a9d847b1b646cdc5781d41422ffb4aa2" > label:<name:"digest_text" value:"BEGIN " > label:<name:"schema" value:"myschema" > counter:<value:0 > } was collected before with the same name and label values
* [from Gatherer #2] collected metric "mysql_perf_schema_events_statements_rows_examined_total" { label:<name:"digest" value:"a9d847b1b646cdc5781d41422ffb4aa2" > label:<name:"digest_text" value:"BEGIN " > label:<name:"schema" value:"myschema" > counter:<value:0 > } was collected before with the same name and label values
* [from Gatherer #2] collected metric "mysql_perf_schema_events_statements_tmp_tables_total" { label:<name:"digest" value:"a9d847b1b646cdc5781d41422ffb4aa2" > label:<name:"digest_text" value:"BEGIN " > label:<name:"schema" value:"myschema" > counter:<value:0 > } was collected before with the same name and label values
* [from Gatherer #2] collected metric "mysql_perf_schema_events_statements_tmp_disk_tables_total" { label:<name:"digest" value:"a9d847b1b646cdc5781d41422ffb4aa2" > label:<name:"digest_text" value:"BEGIN " > label:<name:"schema" value:"myschema" > counter:<value:0 > } was collected before with the same name and label values
* [from Gatherer #2] collected metric "mysql_perf_schema_events_statements_sort_merge_passes_total" { label:<name:"digest" value:"a9d847b1b646cdc5781d41422ffb4aa2" > label:<name:"digest_text" value:"BEGIN " > label:<name:"schema" value:"myschema" > counter:<value:0 > } was collected before with the same name and label values
* [from Gatherer #2] collected metric "mysql_perf_schema_events_statements_sort_rows_total" { label:<name:"digest" value:"a9d847b1b646cdc5781d41422ffb4aa2" > label:<name:"digest_text" value:"BEGIN " > label:<name:"schema" value:"myschema" > counter:<value:0 > } was collected before with the same name and label values
* [from Gatherer #2] collected metric "mysql_perf_schema_events_statements_no_index_used_total" { label:<name:"digest" value:"a9d847b1b646cdc5781d41422ffb4aa2" > label:<name:"digest_text" value:"BEGIN " > label:<name:"schema" value:"myschema" > counter:<value:0 > } was collected before with the same name and label values
@voidhofer
Copy link

Is there any solution to this problem? Already tried setting remove_prefix to false but it did not help.

@jeremy
Copy link

jeremy commented Jan 20, 2022

Duplicate of #127. Looks like the workaround fix in #173 does not remove the duplicates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants