This project is based on node-exporter and consul.
When node-exporter started, it would register to consul on local machine.
service_id: ip
service_name: nodes
service_port: 9100
You can change it at here.
-
deregister service
curl http://localhost:8500/v1/agent/service/deregister/SERVICEID
-
query services registed on local agent
curl http://localhost:8500/v1/agent/services?pretty
-
query all services in cluster
curl http://localhost:8500/v1/catalog/services?pretty
-
start consul agent as a server role and join a cluster
consul agent -server --data-dir=/services/data/consul/ --join CLUSTER_MEMBER_IP&