gnmic supports dynamic loading of gNMI targets from external systems. This feature allows adding and deleting gNMI targets without the need to restart
Depending on the discovery method,
gnmic will either:
- Subscribe to changes on the remote system,
- Or poll the defined targets from the remote systems.
When a change is detected, the new targets are added and the corresponding subscriptions are immediately established. The removed targets are deleted together with their subscriptions.
Only one discovery type is supported at a time.
Target updates are not supported, delete and re-add is the way to update a target configuration.
Four types of target discovery methods are supported:
Watches changes to a local file containing gNMI targets definitions.
Subscribes to Consul KV key prefix changes, the keys and their value represent a target configuration fields.
Polls containers from a Docker Engine host matching some predefined criteria (docker filters).
Queries an HTTP endpoint periodically, expected a well formatted JSON dict of targets configurations.