解压即可
nohup ./prometheus > /dev/null 2>&1 &
系统状态监控
解压即可
nohup ./node_exporter > /dev/null 2>&1 &
- 到
prometheus
根目录 - 编辑配置文件
vim prometheus.yml
scrape_configs: # (省略其他配置) - job_name: "node" static_configs: - targets: ["192.168.31.201:9100","192.168.31.202:9100","192.168.31.203:9100"]
- 重启
prometheus
MySQL监控
- 解压
- 配置账号
vim .my.cnf
[client] user = root password = 123456
nohup ./mysqld_exporter > /dev/null 2>&1 &
- 到
prometheus
根目录 - 编辑配置文件
vim prometheus.yml
scrape_configs: # (省略其他配置) - job_name: "mysql" static_configs: - targets: ["192.168.31.201:9104"]
- 重启
prometheus
- spring
management: endpoints: web: exposure: include: 'prometheus, health, info' metrics: export: prometheus: enabled: true
- Prometheus
scrape_configs: # (省略其他配置) - job_name: "mysql" metrics_path: "/actuator/prometheus" static_configs: - targets: ["192.168.31.218:8080"]
解压即可
nohup bin/grafana server > /dev/null 2>&1 &
- 第一次登录账号
admin
密码admin
- 个人资料可改语言
- 链接->数据源添加
prometheus
。HTTP method
选择GET