如果在调试的时候需要查看请求的日志, 在启动脚本中新增--log.level=debug
配置
在prometheus.yaml
中增加:
一般uri格式为/metrics/job/<job_name>/instance/<instance_name>
添加Prometheus
,修改HTTP
中的url
为http://10.0.18.2:9090
在https://grafana.com/grafana/dashboards/
中寻找模板
推荐模板:
postgres:https://grafana.com/grafana/dashboards/9628-postgresql-database/
mysql:https://grafana.com/grafana/dashboards/7362-mysql-overview/
在mysql的仪表盘中可以添加一个监控项
mysql_version_info{instance="$host"}
options
中选择instant
,legend
填写{{version}}
右侧选择stat
,Text mode
选择Name