mysql - 关于 Docker-Prometheus mysql exporter 数据库
问题描述
我正在尝试在普罗米修斯上显示来自 mysql 数据库的数据。但我找不到显示我的数据库数据的查询。我使用过 docker,这就是我连接 prometheus 和 mysql exporter 的方式。
-普罗米修斯-
docker run -d --name prometheus -h prometheus -p 9090:9090 -v C:\Docker\prometheus\prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus --config.file=/etc/prometheus/prometheus.yml
-mysql-(*是我的ip和数据库ip)
docker run -d --name mysqld_exporter -p 9104:9104 -e DATA_SOURCE_NAME="***************@(***.***.*.***:****)/prometheus" prom/mysqld-exporter --collect.auto_increment.columns --collect.binlog_size --collect.engine_innodb_status --collect.engine_tokudb_status --collect.global_status --collect.global_variables --collect.info_schema.tables
-prometheus.yml-
- job_name : 'mysql'
static_configs:
- targets: ['***.**.***.*:9104']
- job_name : 'prometheus'
static_configs:
- targets: ['***.**.***.*:9104']
-数据库-
名称:普罗米修斯
表:covid_19
列:数量,温度
所以关键是我想每 15 秒通过普罗米修斯显示温度,但我不知道我应该怎么做。
谢谢。
解决方案
推荐阅读
- sat - 为什么 MAX-SAT 是 SAT 问题的推广?
- typescript - ReferenceError:找不到变量:networkRequest
- php - Laravel Custom PasswordBroker 不发送密码重置链接电子邮件
- java - 重复调用将 Retrofit 网络调用排入队列的静态方法是否会相应地维护传递参数的值?
- php - 访问页面时根据用户角色重定向 WordPress 用户
- angular - Angular 6.10.0 - @Directive 和响应式表单
- typescript - 如何从角度8中的字符串中删除所有空格
- php - 如何使用codeigniter增加模型中的计数并保存在数据库中?
- django - 是否可以修复 graphql altair 的端口号?
- c++ - 函数的返回类型