1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/gnmic-subscribe.md
Alexandre Hassan ec300f80fa
gnmic: add page and subpages (#8367)
* gnmic - add

* Change file extension

* Fix newlines

* update gnmic pages and add gnmic sub alias

* fix link

* add period

* fix missing punctuation

* fix ip:port formatting

* Implemented @adrienthebo suggestions

* missing period

* @EmilySeville7cfg suggestions

* remove --insecure and write out sub
2022-09-02 04:57:16 +10:00

827 B

gnmic subscribe

Subscribe to a gnmic network device state updates. More information: https://gnmic.kmrd.dev/cmd/subscribe.

  • Subscribe to target state updates under the subtree of a specific path:

gnmic --address {{ip:port}} subscribe --path {{path}}

  • Subscribe to a target with a sample interval of 30s (default is 10s):

gnmic -a {{ip:port}} subscribe --path {{path}} --sample-interval 30s

  • Subscribe to a target with sample interval and updates only on change:

gnmic -a {{ip:port}} subscribe --path {{path}} --stream-mode on-change --heartbeat-interval 1m

  • Subscribe to a target for only one update:

gnmic -a {{ip:port}} subscribe --path {{path}} --mode once

  • Subscribe to a target and specify reponse encoding (json_ietf):

gnmic -a {{ip:port}} subscribe --path {{path}} --encoding json_ietf