Dummy GNMI Target #30
Replies: 4 comments 6 replies
-
Hi Adam, If you have a Linux system, I've had a lot of luck with containerlab recently for setting up virtual infrastructure for this type of development work. And if you're looking for an image to run, you can register for account with Arista and get access to their containerized EOS (cEOS) lab images. If the containerlab/cEOS route works for you, give it a try and let me know if you have any trouble setting it up. If not, I'll give you a few more suggestions, but I haven't found a good, easy way of running a local, "fake" gnmi target. mc |
Beta Was this translation helpful? Give feedback.
-
OK, I've got an Ubuntu 20 VM with As this is related to the creation of my exporter, perhaps we can work on this together? Fundamentally, my exporter is going to
The raw data should have one metric per line (limited to 1000 metrics per POST request). The line is in the following format where
Using dimensions would look like this:
|
Beta Was this translation helpful? Give feedback.
-
Hey Adam, just going through this. That gist you wrote was super helpful for getting setup the same as you. You're definitely on the right track with a fake gNMI server or a virtual router to generate test data. I ran your example and I initially didn't see data coming through but upon closer inspection it looks like the fake gNMI server is generating data but the fields that are being generated are deprecated fields that gnmi-gateway does not process correctly. Here's the log output from my setup which is similair to yours, note the line I marked that just contains the value
This marked line is the data being generated by the the fake server but the deprecated path field is not being displayed. It's also only displaying a single update because gnmi-gateway (and the underlying gNMI cache) deduplicates unchanged values. I'm not too familiar with the deprecated fields or the fake server so I can chat with some other OpenConfig folks about what the best way to proceed is: if we should see that the fake server is updated, if we should honor deprecated fields in gnmi-gateway, or something else. Another thing I'll note is that the fake server is very barebones and doesn't generate practical traffic; I think @0xmc had a good suggestion for using containerlab or another virtual router to generate gNMI and that will probably give you a much more realistic (and reliable) test scenario. |
Beta Was this translation helpful? Give feedback.
-
Hi @agardnerIT. Checking back in to see how things are going. Let us know if you'd still like to find some time to chat. |
Beta Was this translation helpful? Give feedback.
-
For anyone building exporters, we need a quick way to get GNMI metrics. We should not need to rely on having a physical device available.
My Usecase
I need a working GNMI target so that the gateway can ingest metrics. Once done, I will build an exporter to export GNMI metrics into my solution.
Beta Was this translation helpful? Give feedback.
All reactions