This custom integration permits Home Assistant to communicate with consul
through http requests.
Paste this property consul:
in your configuration file
A a low level mechanism for directly registering or updating entries in the catalog.
service: consul.catalog_register
data:
host: 192.168.0.21
host_port: 8500
token: 57c5d69a-5f19-469b-0543-12a487eecc66
datacenter: dc1
address: "192.168.0.21"
node: jadson
service:
id: jadson
service: jadson
tags:
- master
- v1
port: 8000
check:
node: jadson
checkid: 'service:jadson'
name: Redis health check
notes: Script based health check
status: passing
serviceid: jadson
Directly remove entries in the catalog.
service: consul.catalog_deregister
data:
host: 192.168.0.21
host_port: 8500
token: 57c5d69a-5f19-469b-0543-12a487eecc66
node: raspberry
datacenter: prod
service_id: freepbx
check_id: 'service:freepbx'
The /kv endpoints access Consul's simple key/value store, useful for storing service configuration or other metadata
service: consul.kv_create_or_update
data:
host: 192.168.0.21
host_port: 8500
token: 57c5d69a-5f19-469b-0543-12a487eecc66
key: jadson179
value: 'https://github.com/jadson179'
This endpoint deletes a single key or all keys sharing a prefix.
service: consul.kv_delete
data:
host: 192.168.0.21
host_port: 8500
token: 57c5d69a-5f19-469b-0543-12a487eecc66
key: jadson179
datacenter: prod
ns: default
This endpoint adds a new service, with optional health checks, to the local agent
service: consul.kv_delete
data:
host: 192.168.0.21
host_port: 8500
token: 57c5d69a-5f19-469b-0543-12a487eecc66
id: redis1
name: redis
tags:
- primary
- v1
address: 127.0.0.1
port: 8000
meta:
redis_version: "4.0"
enabletagoverride: False
weights:
passing: 10
warning: 1
This endpoint removes a service from the local agent. If the service does not exist, no action is taken.
service: consul.kv_delete
data:
host: 192.168.0.21
host_port: 8500
token: 57c5d69a-5f19-469b-0543-12a487eecc66
service_id: redis1
This project use license MIT - see file LICENSE for more details
Jadson Santos 💻 🎨 |