Skip to content


gnmic supports dynamic loading of gNMI targets from external systems. This feature allows adding and deleting gNMI targets without the need to restart gnmic.

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.


  1. Only one discovery type is supported at a time.

  2. 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:

File Loader#

Watches changes to a local file containing gNMI targets definitions.

Consul Server Loader#

Subscribes to Consul KV key prefix changes, the keys and their value represent a target configuration fields.

Docker Engine Loader#

Polls containers from a Docker Engine host matching some predefined criteria (docker filters).

HTTP Loader#

Queries an HTTP endpoint periodically, expected a well formatted JSON dict of targets configurations.

Back to top