Consul常用操作

注册服务

curl -X PUT -d '{"id": "redis-xxx","name": "redis-xxx","address": "127.0.0.1","port": 9121,"tags": ["test"],"checks": [{"http": "http://127.0.0.1:9121/","interval": "5s"}]}' http://127.0.0.1:8500/v1/agent/service/register

删除服务

  • hahaha

    curl -X PUT http://127.0.0.1:8500/v1/agent/service/deregister/jj-salve-AWprometheus?token=660c7b90-d0dd-ea17-594a-5c735bb3ed70
  • hehehe

    curl -X PUT http://127.0.0.1:8500/v1/agent/service/deregister/jj-salve-AWprometheus?token=660c7b90-d0dd-ea17-594a-5c735bb3ed70

添加服务

hahha

posted @ 2022-11-12 13:01  羊脂玉净瓶  阅读(47)  评论(0编辑  收藏  举报