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

mysql_exporter_last_scrape_error 0 when mysql_up is 0 #216

Closed
guidoiaquinti opened this issue Jul 3, 2017 · 4 comments
Closed

mysql_exporter_last_scrape_error 0 when mysql_up is 0 #216

guidoiaquinti opened this issue Jul 3, 2017 · 4 comments
Assignees
Labels

Comments

@guidoiaquinti
Copy link
Contributor

guidoiaquinti commented Jul 3, 2017

mysql_exporter_last_scrape_error is reporting 0 (success) also when mysql_up is 0 (down).

This is a bit confusing if we rely on mysql_exporter_last_scrape_error to check for failures.

Steps to reproduce:

  • start mysqld_exporter
  • saturate the connection pool of the MySQL user used
  • mysqld_exporter will report:
Jul 03 06:21:41 bash[14316]: time="2017-07-03T06:21:41-07:00" level=error msg="Error pinging mysqld: Error 1226: User 'monitoring_a' has exceeded the 'max_user_connections' resource (current value: 3)" source="mysqld_exporter.go:269"

while returning

mysql_exporter_last_scrape_error 0
mysql_up 0
mysql_exporter_scrapes_total 6716
@SuperQ
Copy link
Member

SuperQ commented Jul 3, 2017

Ahh, good catch. Looking at the code, I'm not sure this mysql_exporter_last_scrape_error does anything at all. 😬 I can't find any point in the exporter where we use it.

@SuperQ SuperQ self-assigned this Jul 19, 2017
@SuperQ SuperQ added the bug label Jul 19, 2017
@SuperQ SuperQ mentioned this issue Jul 19, 2017
@siavashs
Copy link
Contributor

siavashs commented Oct 15, 2017

I can look into this.
Should we set this metric to 1 even if one of the collectors fail? Or is it for general failures like connection issues with MySQL?

@SuperQ
Copy link
Member

SuperQ commented Oct 15, 2017

Any collector error should set this metric to 1.

@s4wet
Copy link

s4wet commented Jan 2, 2019

in my.cnf add line
bind-address = 127.0.0.1

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

No branches or pull requests

4 participants