prometheus.yml 配置

  - job_name: 'node_exporter'
consul_sd_configs:
- server: 'consul_ip:8500'
services: ['node_exporter']
# 匹配service关键字
- job_name: 'service'
consul_sd_configs:
- server: 'consul_ip:8500'
services: []
relabel_configs:
- source_labels: [__meta_consul_tags]
regex: .*service.*
action: keep
注册服务
curl -X PUT -d '{"id": "test1","name": "test1","address": "10.80.229.55","port": 9100,"tags": ["service"],"checks": [{"http": "http:// 10.80.229.55:9100/","interval": "5s"}]}' http://consul_ip:8500/v1/agent/service/register
    查询指定节点以及指定的服务信息
curl http://consul_ip:8500/v1/catalog/service/mysql

删除服务
curl --request PUT http://consul_ip:8500/v1/agent/service/deregister/mysql
列出数据中心
curl http://consul_ip:8500/v1/catalog/datacenters

列出节点
curl http://consul_ip:8500/v1/catalog/nodes

列出服务
curl http://consul_ip:8500/v1/catalog/services

列出服务节点
curl http://consul_ip:8500/v1/catalog/service/my-service

最新文章

  1. hbase-site.xml中HBASE_CLASSPATH 的设置
  2. 备份MySQL数据库
  3. Asp.net Json数据解析的一种思路
  4. cJSON: 一个用c写的一个简单好用的JSON解析器
  5. HDU 3555 数位dp入门
  6. Hibernate解决n+1问题
  7. web开发注意的问题
  8. UISegmentedControl 分段器加载不同的viewcontroller
  9. leetcode第17题--4Sum
  10. Java面试07|Redis数据库
  11. 解决oracle11G密码过期问题
  12. CLOSE_WAIT状态的原因与解决方法
  13. JavaScript内置对象——Math对象
  14. robots.txt、humans.txt、.editorconfig、.gitignore、LICENSE.txt、README.md、CHANGLOG.md
  15. linux tmux 工具使用 tmux.conf 文件
  16. MySQL优化技巧之四:mysql数据库开发常见问题及优化[转]
  17. 一分钟让你学会使用Android AsyncTask
  18. 【python】理想论坛帖子爬虫1.06
  19. R语言查找变量ls函数
  20. 【Java多线程】线程池学习

热门文章

  1. easy ui 常用控件配置
  2. python实现scp功能
  3. 【一起学源码-微服务】Netflix Eureka 源码一:Netflix Eureka 源码初探,我们为什么要读源码?
  4. Part_six:Redis-cluster 实现集群
  5. CSS中常见的布局
  6. HTML Marquee跑马灯
  7. SIM7600CE http post
  8. linux时间格式
  9. MySQL Hardware--FIO压测
  10. layui.js---layer;;前端预览pdf