gtjadsonsantos / consul

home-assistant service for control the consul πŸ”΄

Home Page:https://www.consul.io/docs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CONSUL

This custom integration permits Home Assistant to communicate with consul through http requests.

GETTING STARTED

Paste this property consul: in your configuration file

Services

consul.catalog_register

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

consul.catalog_deregister

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'

consul: kv_create_or_update

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'

consul: kv_delete

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

consul: agent_service_register

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

consul: agent_service_deregister

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

LICENSE πŸ“

This project use license MIT - see file LICENSE for more details

AUTOR


Jadson Santos

πŸ’» 🎨

About

home-assistant service for control the consul πŸ”΄

https://www.consul.io/docs/


Languages

Language:Python 98.9%Language:Dockerfile 1.1%