openconfig / gnmic

gNMIc is a gNMI CLI client and collector
https://gnmic.openconfig.net
Apache License 2.0
171 stars 55 forks source link

gnmic dropping certain paths when using event/prometheous output that do show up in json formatted output #335

Closed mdebord-dlr closed 7 months ago

mdebord-dlr commented 8 months ago

I am having an issue with gnmic not presenting a value when using prometheus output. The data definitely exists in gnmi data when querying gnmi directly.

In order to debug, I changed the output to file, using event format. The data does not exist in my event formatted debug output.

So I then changed to json format, and the desired metric shows up:

      {
        "Path": "defaultStats/latency",
        "values": {
          "defaultStats/latency": 0.2329999953508377
        }
      },

From what I can tell, 0.2329999953508377 looks like it would be a valid value. I've tried various versions of gnmic, including the latest 0.34.3

I am using json/event solely for debugging. My end goal is to use a subscribe and processors to get prometheus output.

karimra commented 8 months ago

Can you share the output with format prototext?

mdebord-dlr commented 8 months ago

HI @karimra , thanks, here is a snip using prototext:

  update:  {
    path:  {
      elem:  {
        name:  "defaultStats"
      }
      elem:  {
        name:  "latency"
      }
    }
    val:  {
      double_val:  0.05999999865889549
    }
  }
karimra commented 8 months ago

Thanks, double values are not handled when using the event format, will fix that shortly.

mdebord-dlr commented 8 months ago

will fix that shortly.

You are amazing!!! Life saver.

karimra commented 8 months ago

@mdebord-dlr can you give v0.35.0 a try ? Thanks

mdebord-dlr commented 7 months ago

@mdebord-dlr can you give v0.35.0 a try ? Thanks

I'm seeing results now @karimra thanks. Looking good. FYI this was on Arista EOS 4.3x platform if you were wondering.