The Consul target loader discovers gNMI targets registered as service instances in a Consul Server.
The loader watches services registered in Consul defined by a service name and optionally a set of tags.
When at least one service name is set, gNMIc consul loader will watch the instances registered under that service name and build a target configuration using the service ID as the target name and the registered address and port as the target address.
The remaining configuration can be set under the service name definition.
- name: cluster1-gnmi-server
# address of the loader server
# Consul Data center, defaults to dc1
# Consul username, to be used as part of HTTP basicAuth
# Consul password, to be used as part of HTTP basicAuth
# Consul Token, is used to provide a per-request ACL token which overrides the agent's default token
# the key prefix to watch for targets configuration, defaults to "gnmic/config/targets"
# if true, registers consulLoader prometheus metrics with the provided
# prometheus registry
# list of services to watch and derive target configurations from.
# name of the Consul service
# a list of strings to further filter the service instances
# configuration map to apply to target discovered from this service
# list of actions to run on target discovery
# list of actions to run on target removal
# variable dict to pass to actions to be run
# path to variable file, the variables defined will be passed to the actions to be run
# values in this file will be overwritten by the ones defined in `vars`