In my last I was looking for a way to do performance monitoring and I stumbled upon Prometheus. Prometheus is much more than monitoring a single node service. Anyway let’s get the idea of gathering metrics using MySQL as example.
This how a simple configuration of Prometheus could look like:
global:
scrape_interval: 1m
scrape_timeout: 10s
evaluation_interval: 1m
scrape_configs:
- job_name: mysql
scheme: http
target_groups:
- targets:
- '10.17.148.31:9104'
labels:
zone: mysql
Every minute Prometheus accesses 172.17.148.31:9104/metrics
(/metrics is a Prometheus convention) and labels the result with
zone=mysql. Querying the data you can use the
labels.
This is a simple configuration. The fun of Prometheus is to have a lot of targets/jobs.
Let’s have a look at our specific endpoint: …
[Read more]