{"id":21423289,"url":"https://github.com/nleiva/gnmi-streamer","last_synced_at":"2026-05-17T13:04:09.012Z","repository":{"id":263038552,"uuid":"888691147","full_name":"nleiva/gnmi-streamer","owner":"nleiva","description":"Simple gNMI server to stream arbitrary data paths","archived":false,"fork":false,"pushed_at":"2024-11-25T16:46:23.000Z","size":67,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-16T20:26:39.103Z","etag":null,"topics":["gnmi","go","golang","grpc","network","networkautomation","telemetry"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nleiva.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-14T20:49:09.000Z","updated_at":"2024-11-25T16:47:06.000Z","dependencies_parsed_at":"2024-11-15T19:19:31.067Z","dependency_job_id":"34b3ad8f-fb77-4d8f-b1d9-7b93eaba97c1","html_url":"https://github.com/nleiva/gnmi-streamer","commit_stats":null,"previous_names":["nleiva/gnmi-streamer"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/nleiva/gnmi-streamer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nleiva%2Fgnmi-streamer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nleiva%2Fgnmi-streamer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nleiva%2Fgnmi-streamer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nleiva%2Fgnmi-streamer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nleiva","download_url":"https://codeload.github.com/nleiva/gnmi-streamer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nleiva%2Fgnmi-streamer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33139590,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T09:28:26.183Z","status":"ssl_error","status_checked_at":"2026-05-17T09:27:52.702Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gnmi","go","golang","grpc","network","networkautomation","telemetry"],"created_at":"2024-11-22T21:15:50.792Z","updated_at":"2026-05-17T13:04:08.978Z","avatar_url":"https://github.com/nleiva.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gNMI Streamer\n\n[![GoDoc](https://godoc.org/github.com/nleiva/gnmi-streamer?status.svg)](https://godoc.org/github.com/nleiva/gnmi-streamer) \n[![Test](https://github.com/nleiva/gnmi-streamer/actions/workflows/test.yml/badge.svg)](https://github.com/nleiva/gnmi-streamer/actions/workflows/test.yml)\n[![codecov](https://codecov.io/gh/nleiva/gnmi-streamer/branch/main/graph/badge.svg)](https://codecov.io/gh/nleiva/gnmi-streamer) \n[![Go Report Card](https://goreportcard.com/badge/github.com/nleiva/gnmi-streamer)](https://goreportcard.com/report/github.com/nleiva/gnmi-streamer)\n\ngNMI Server to stream arbitrary data. It produces a random metric for the targets and data paths listed in a JSON file.\n\n## Server\n\nIf you have Go installed in your system, run the server on a tab with `make server`.\n\n```bash\n$ make server\nI1119 09:02:54.822880   29014 main.go:149] listening on [::]:9339\nI1119 09:03:02.164796   29014 subscribe.go:283] peer: 127.0.0.1:51101 target: \"dev2\" subscription: subscribe:{prefix:{target:\"dev2\"} subscription:{path:{element:\"a\" elem:{name:\"a\"}}}}\nI1119 09:03:07.014033   29014 subscribe.go:323] peer: 127.0.0.1:51101 target \"dev2\" subscription: end: \"subscribe:{prefix:{target:\\\"dev2\\\"} subscription:{path:{element:\\\"a\\\" elem:{name:\\\"a\\\"}}}}\"\n```\n\nYou can configure the following environmental variables:\n\n- `GNMI_HOST`: Server IP address. Default `\"\"`.\n- `GNMI_PORT`: Server port. Default `\"9339\"`.\n- `GNMI_FILE`: JSON file with list of devices and paths to stream. Default `\"updates.json\"`.\n- `GNMI_CADENCE`: How often to generate a metric for the device path. Default `5`.\n\nIf you don't have Go installed, you can run one of the executable files available in the [releases](https://github.com/nleiva/gnmi-streamer/releases). For example for a RHEL system:\n\n```bash\nwget https://github.com/nleiva/gnmi-streamer/releases/download/v0.1.0/gnmi-streamer_0.1.0_Linux_x86_64.rpm ## Download RPM\nrpm -i gnmi-streamer_0.1.0_Linux_x86_64.rpm # Install RPM\ngnmi-streamer -logtostderr # Run the server and log to stdout\n```\n\n## Client\n\nRun the server on a different tab with `make client`.\n\n```bash\n$ make client\n2024/11/19 09:03:02 Subscribing\nRESPONSE:\n  PATH: elem:{name:\"a\"}  elem:{name:\"b\"  key:{key:\"n\"  value:\"c\"}}  elem:{name:\"d\"}\n  VALUE: int_val:929\nRESPONSE:\n  PATH: elem:{name:\"a\"}  elem:{name:\"b\"  key:{key:\"n\"  value:\"c\"}}  elem:{name:\"d\"}\n  VALUE: int_val:18\n...\n```\n\n### gNMIc\n\nYou can alternatively subscribe to the server with [gNMIc](https://gnmic.openconfig.net).\n\n\n```bash\nbash -c \"$(curl -sL https://get-gnmic.openconfig.net)\"\n```\n\n```bash\n$ gnmic -a [::]:9339 --skip-verify --target dev1 subscribe --path \"/state/router[router-name=*]/interface[interface-name=*]/statistics/ip/in-octets\"\n{\n  \"sync-response\": true\n}\n{\n  \"source\": \":9339\",\n  \"subscription-name\": \"default-1732025210\",\n  \"timestamp\": 1732025204640357001,\n  \"time\": \"2024-11-19T09:06:44.640357001-05:00\",\n  \"target\": \"dev1\",\n  \"updates\": [\n    {\n      \"Path\": \"state/router[router-name=dev1]/interface[interface-name=*]/statistics/ip/in-octets\",\n      \"values\": {\n        \"state/router/interface/statistics/ip/in-octets\": 213\n      }\n    }\n  ]\n}\n```\n\n\n```bash\n$ gnmic -a [::]:9339 --skip-verify --target dev2 subscribe --path \"a\" --format prototext\nsync_response: true\n\nupdate: {\n  timestamp: 1732025259640538002\n  prefix: {\n    target: \"dev2\"\n  }\n  update: {\n    path: {\n      elem: {\n        name: \"a\"\n      }\n      elem: {\n        name: \"b\"\n        key: {\n          key: \"n\"\n          value: \"c\"\n        }\n      }\n      elem: {\n        name: \"d\"\n      }\n    }\n    val: {\n      int_val: 424\n    }\n  }\n}\n...\n```\n\n## Credits\n\nThis is copy \u0026 paste from the following packages.\n\n- [SUBSCRIBE SERVER](https://github.com/openconfig/gnmi/tree/master/subscribe)\n- [COLLECTOR](https://github.com/openconfig/gnmi/tree/master/collector)\n- [gNMI PATH](https://github.com/openconfig/gnmic/tree/main/pkg/api/path)\n\n## References\n\n- [SNMP is dead](https://pc.nanog.org/static/published/meetings/NANOG73/1677/20180625_Shakir_Snmp_Is_Dead_v1.pdf): Describes the a gNMI caching collector from multiple gNMI sources (targets) to multiple gNMI clients. [recording](https://youtu.be/McNm_WfQTHw?si=lPy5a7qIdIKMW7ne)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnleiva%2Fgnmi-streamer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnleiva%2Fgnmi-streamer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnleiva%2Fgnmi-streamer/lists"}