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 connections count off by millions #4812

Closed
williamoverton opened this issue Aug 2, 2017 · 8 comments · Fixed by #5401
Closed

Mysql connections count off by millions #4812

williamoverton opened this issue Aug 2, 2017 · 8 comments · Fixed by #5401
Labels
bug good first issue Indicates a good issue for first-time contributors Hacktoberfest Metricbeat Metricbeat

Comments

@williamoverton
Copy link

All other metrics are correct but for some reason, active mysql connections is huge:
image

We currently (according to the AWS RDS panel) have 5 connections open.

Version
MySQL 5.6.34 (AWS) -> metricbeat 5.4.1 -> logstash 5.4.2

Config

metricbeat.modules:
- module: system
  metricsets:
    - cpu
    - filesystem
    - memory
    - network
    - process
  enabled: true
  period: 30s
  processes: ['.*']
  cpu_ticks: false

- module: docker
  metricsets: ["container", "cpu", "diskio", "healthcheck", "info", "memory", "network"]
  hosts: ["unix:///var/run/docker.sock"]
  enabled: true
  period: 30s

- module: mysql
  metricsets: ["status"]
  enabled: true
  period: 30s
  hosts: ["${MYSQL_USER}:${MYSQL_PASS}@tcp(${MYSQL_HOST}:${MYSQL_PORT})/"]

output.logstash:
  hosts: ["127.0.0.1:3005"]

#output.console.pretty: true

Let me know if there is anything else you need!

Cheers

@exekias
Copy link
Contributor

exekias commented Aug 2, 2017

Hi @mrminecart ,

Connections is an always growing value, see https://docs.oracle.com/cd/E17952_01/mysql-5.0-en/server-status-variables.html#statvar_Connections. You have to graph its derivative to show number of new connections per bucket.

Perhaps you are more interested in threads.connected, as it will give you the number of current connections: https://docs.oracle.com/cd/E17952_01/mysql-5.0-en/server-status-variables.html#statvar_Threads_connected

@williamoverton
Copy link
Author

Ah okay, I was confused by the term "MySQL active connections" in the kibana template

@exekias
Copy link
Contributor

exekias commented Aug 2, 2017

Uhm, I see, perhaps the example dashboard is not clear enough, what version of metricbeat are you using?

@williamoverton
Copy link
Author

metricbeat 5.4.1

@exekias exekias added bug Metricbeat Metricbeat labels Aug 2, 2017
@exekias
Copy link
Contributor

exekias commented Aug 2, 2017

Ok, thanks for the report, I'm flagging this as a bug as I think we need to clarify that graph, either change the title or the metric we show

@williamoverton
Copy link
Author

I don't find the metric very useful personally, for now I have changed the title.

Thanks for being very responsive!

@tsg tsg added the good first issue Indicates a good issue for first-time contributors label Oct 12, 2017
@danleerunk
Copy link
Contributor

@exekias Okay if I take this on? As a suggestion, perhaps changing the title of the viz to "MySQL total connections" would make this a bit more clear.

@exekias
Copy link
Contributor

exekias commented Oct 14, 2017

sure, go ahead! just ping us if you need any help :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good first issue Indicates a good issue for first-time contributors Hacktoberfest Metricbeat Metricbeat
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants