perconagrafanaprometheus

Prometheus Monitoring Issue for MySQL


I'm trying to setup a monitoring for MySQL as mentioned in this Percona link

I'm setting this up for the first time.

This is my Prometheus config file:

    global:
  scrape_interval:     5s
  evaluation_interval: 5s
scrape_configs:
- job_name: linux
  static_configs:
  - targets:
    - '172.19.36.189:3306'
    labels:
      alias: db1

Prometheus version:

prometheus, version 1.1.2 (branch: master, revision: 36fbdcc)
build user: root@a74d279
build date: 20160908-13:12:43
go version: go1.6.3

While I check in Prometheus targets page: I get the following error:

Error

There are no errors reported in Prometheus logs.

When I click the metric link, the metrics page is not opening. And the state of the target is DOWN.

I have started mysqld and node exporters properly as well.

Where is the issue?


Solution

  • You need to scrape the mysqld exporter (usually port 9104), not mysqld itself.