diff --git a/plugins/inputs/gnmi/path.go b/plugins/inputs/gnmi/path.go index 0392b9cec..a48d5f51d 100644 --- a/plugins/inputs/gnmi/path.go +++ b/plugins/inputs/gnmi/path.go @@ -81,10 +81,9 @@ func newInfoFromPath(paths ...*gnmi.Path) *pathInfo { continue } for _, elem := range p.Elem { - if elem.Name == "" { - continue + if elem.Name != "" { + info.segments = append(info.segments, segment{id: elem.Name}) } - info.segments = append(info.segments, segment{id: elem.Name}) if len(elem.Key) == 0 { continue @@ -133,10 +132,9 @@ func (pi *pathInfo) append(paths ...*gnmi.Path) *pathInfo { // Add the new segments for _, p := range paths { for _, elem := range p.Elem { - if elem.Name == "" { - continue + if elem.Name != "" { + path.segments = append(path.segments, segment{id: elem.Name}) } - path.segments = append(path.segments, segment{id: elem.Name}) if len(elem.Key) == 0 { continue diff --git a/plugins/inputs/gnmi/testcases/issue_16515/expected.out b/plugins/inputs/gnmi/testcases/issue_16515/expected.out new file mode 100644 index 000000000..202d73636 --- /dev/null +++ b/plugins/inputs/gnmi/testcases/issue_16515/expected.out @@ -0,0 +1,11 @@ +qmon,name=xe-0/0/0:0,path=/junos/system/linecard/qmon-sw,source=127.0.0.1 state/parent_ae_name="" 1739811071353000000 +qmon,name=xe-0/0/0:0,path=/junos/system/linecard/qmon-sw,queue_number=0,source=127.0.0.1 egress/bytes=25084650213u,egress/packets=97812973u,egress/peak_buffer_occupancy_bytes=416u,egress/peak_buffer_occupancy_percent=0u,egress/red_drop_bytes_color_0=0u,egress/red_drop_bytes_color_1=0u,egress/red_drop_bytes_color_2=0u,egress/red_drop_bytes_color_3=0u,egress/red_drop_packets_color_0=0u,egress/red_drop_packets_color_1=0u,egress/red_drop_packets_color_2=0u,egress/red_drop_packets_color_3=0u,egress/tail_drop_bytes=0u,egress/tail_drop_packets=0u 1739811071353000000 +qmon,name=xe-0/0/0:0,path=/junos/system/linecard/qmon-sw,queue_number=1,source=127.0.0.1 egress/bytes=0u,egress/packets=0u,egress/peak_buffer_occupancy_bytes=0u,egress/peak_buffer_occupancy_percent=0u,egress/red_drop_bytes_color_0=0u,egress/red_drop_bytes_color_1=0u,egress/red_drop_bytes_color_2=0u,egress/red_drop_bytes_color_3=0u,egress/red_drop_packets_color_0=0u,egress/red_drop_packets_color_1=0u,egress/red_drop_packets_color_2=0u,egress/red_drop_packets_color_3=0u,egress/tail_drop_bytes=0u,egress/tail_drop_packets=0u 1739811071353000000 +qmon,name=xe-0/0/0:0,path=/junos/system/linecard/qmon-sw,queue_number=2,source=127.0.0.1 egress/bytes=10957969881u,egress/packets=105352268u,egress/peak_buffer_occupancy_bytes=208u,egress/peak_buffer_occupancy_percent=0u,egress/red_drop_bytes_color_0=0u,egress/red_drop_bytes_color_1=0u,egress/red_drop_bytes_color_2=0u,egress/red_drop_bytes_color_3=0u,egress/red_drop_packets_color_0=0u,egress/red_drop_packets_color_1=0u,egress/red_drop_packets_color_2=0u,egress/red_drop_packets_color_3=0u,egress/tail_drop_bytes=0u,egress/tail_drop_packets=0u 1739811071353000000 +qmon,name=xe-0/0/0:0,path=/junos/system/linecard/qmon-sw,queue_number=3,source=127.0.0.1 egress/bytes=0u,egress/packets=0u,egress/peak_buffer_occupancy_bytes=0u,egress/peak_buffer_occupancy_percent=0u,egress/red_drop_bytes_color_0=0u,egress/red_drop_bytes_color_1=0u,egress/red_drop_bytes_color_2=0u,egress/red_drop_bytes_color_3=0u,egress/red_drop_packets_color_0=0u,egress/red_drop_packets_color_1=0u,egress/red_drop_packets_color_2=0u,egress/red_drop_packets_color_3=0u,egress/tail_drop_bytes=0u,egress/tail_drop_packets=0u 1739811071353000000 +qmon,name=xe-0/0/0:0,path=/junos/system/linecard/qmon-sw,queue_number=4,source=127.0.0.1 egress/bytes=0u,egress/packets=0u,egress/peak_buffer_occupancy_bytes=0u,egress/peak_buffer_occupancy_percent=0u,egress/red_drop_bytes_color_0=0u,egress/red_drop_bytes_color_1=0u,egress/red_drop_bytes_color_2=0u,egress/red_drop_bytes_color_3=0u,egress/red_drop_packets_color_0=0u,egress/red_drop_packets_color_1=0u,egress/red_drop_packets_color_2=0u,egress/red_drop_packets_color_3=0u,egress/tail_drop_bytes=0u,egress/tail_drop_packets=0u 1739811071353000000 +qmon,name=xe-0/0/0:0,path=/junos/system/linecard/qmon-sw,queue_number=5,source=127.0.0.1 egress/bytes=1020800306u,egress/packets=12027619u,egress/peak_buffer_occupancy_bytes=0u,egress/peak_buffer_occupancy_percent=0u,egress/red_drop_bytes_color_0=0u,egress/red_drop_bytes_color_1=0u,egress/red_drop_bytes_color_2=0u,egress/red_drop_bytes_color_3=0u,egress/red_drop_packets_color_0=0u,egress/red_drop_packets_color_1=0u,egress/red_drop_packets_color_2=0u,egress/red_drop_packets_color_3=0u,egress/tail_drop_bytes=0u,egress/tail_drop_packets=0u 1739811071353000000 +qmon,name=xe-0/0/0:0,path=/junos/system/linecard/qmon-sw,queue_number=6,source=127.0.0.1 egress/bytes=1257881347u,egress/packets=4773346u,egress/peak_buffer_occupancy_bytes=624u,egress/peak_buffer_occupancy_percent=0u,egress/red_drop_bytes_color_0=0u,egress/red_drop_bytes_color_1=0u,egress/red_drop_bytes_color_2=0u,egress/red_drop_bytes_color_3=0u,egress/red_drop_packets_color_0=0u,egress/red_drop_packets_color_1=0u,egress/red_drop_packets_color_2=0u,egress/red_drop_packets_color_3=0u,egress/tail_drop_bytes=0u,egress/tail_drop_packets=0u 1739811071353000000 +qmon,name=xe-0/0/0:0,path=/junos/system/linecard/qmon-sw,queue_number=7,source=127.0.0.1 egress/bytes=0u,egress/packets=0u,egress/peak_buffer_occupancy_bytes=0u,egress/peak_buffer_occupancy_percent=0u,egress/red_drop_bytes_color_0=0u,egress/red_drop_bytes_color_1=0u,egress/red_drop_bytes_color_2=0u,egress/red_drop_bytes_color_3=0u,egress/red_drop_packets_color_0=0u,egress/red_drop_packets_color_1=0u,egress/red_drop_packets_color_2=0u,egress/red_drop_packets_color_3=0u,egress/tail_drop_bytes=0u,egress/tail_drop_packets=0u 1739811071353000000 +qmon,name=xe-0/0/0:0,path=/junos/system/linecard/qmon-sw,queue_number=8,source=127.0.0.1 egress/bytes=8898987190u,egress/packets=75415151u,egress/peak_buffer_occupancy_bytes=208u,egress/peak_buffer_occupancy_percent=0u,egress/red_drop_bytes_color_0=0u,egress/red_drop_bytes_color_1=0u,egress/red_drop_bytes_color_2=0u,egress/red_drop_bytes_color_3=0u,egress/red_drop_packets_color_0=0u,egress/red_drop_packets_color_1=0u,egress/red_drop_packets_color_2=0u,egress/red_drop_packets_color_3=0u,egress/tail_drop_bytes=0u,egress/tail_drop_packets=0u 1739811071353000000 +qmon,name=xe-0/0/0:0,path=/junos/system/linecard/qmon-sw,queue_number=9,source=127.0.0.1 egress/bytes=16919364168u,egress/packets=157255632u,egress/peak_buffer_occupancy_bytes=208u,egress/peak_buffer_occupancy_percent=0u,egress/red_drop_bytes_color_0=0u,egress/red_drop_bytes_color_1=0u,egress/red_drop_bytes_color_2=0u,egress/red_drop_bytes_color_3=0u,egress/red_drop_packets_color_0=0u,egress/red_drop_packets_color_1=0u,egress/red_drop_packets_color_2=0u,egress/red_drop_packets_color_3=0u,egress/tail_drop_bytes=0u,egress/tail_drop_packets=0u 1739811071353000000 diff --git a/plugins/inputs/gnmi/testcases/issue_16515/responses.json b/plugins/inputs/gnmi/testcases/issue_16515/responses.json new file mode 100644 index 000000000..09eee555a --- /dev/null +++ b/plugins/inputs/gnmi/testcases/issue_16515/responses.json @@ -0,0 +1,2853 @@ +[ + { + "update": { + "timestamp": "1739811071353000000", + "prefix": { + "elem": [ + { + "name": "junos" + }, + { + "name": "system" + }, + { + "name": "linecard" + }, + { + "name": "qmon-sw" + }, + { + "key": { + "name": "xe-0/0/0:0" + } + } + ] + }, + "update": [ + { + "path": { + "elem": [ + { + "name": "state" + }, + { + "name": "parent_ae_name" + } + ] + }, + "val": { + "stringVal": "" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "0" + } + }, + { + "name": "peak-buffer-occupancy-bytes" + } + ] + }, + "val": { + "uintVal": "416" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "0" + } + }, + { + "name": "peak-buffer-occupancy-percent" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "0" + } + }, + { + "name": "packets" + } + ] + }, + "val": { + "uintVal": "97812973" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "0" + } + }, + { + "name": "bytes" + } + ] + }, + "val": { + "uintVal": "25084650213" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "0" + } + }, + { + "name": "tail-drop-packets" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "0" + } + }, + { + "name": "tail-drop-bytes" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "0" + } + }, + { + "name": "red-drop-packets-color-0" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "0" + } + }, + { + "name": "red-drop-bytes-color-0" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "0" + } + }, + { + "name": "red-drop-packets-color-1" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "0" + } + }, + { + "name": "red-drop-bytes-color-1" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "0" + } + }, + { + "name": "red-drop-packets-color-2" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "0" + } + }, + { + "name": "red-drop-bytes-color-2" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "0" + } + }, + { + "name": "red-drop-packets-color-3" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "0" + } + }, + { + "name": "red-drop-bytes-color-3" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "1" + } + }, + { + "name": "peak-buffer-occupancy-bytes" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "1" + } + }, + { + "name": "peak-buffer-occupancy-percent" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "1" + } + }, + { + "name": "packets" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "1" + } + }, + { + "name": "bytes" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "1" + } + }, + { + "name": "tail-drop-packets" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "1" + } + }, + { + "name": "tail-drop-bytes" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "1" + } + }, + { + "name": "red-drop-packets-color-0" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "1" + } + }, + { + "name": "red-drop-bytes-color-0" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "1" + } + }, + { + "name": "red-drop-packets-color-1" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "1" + } + }, + { + "name": "red-drop-bytes-color-1" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "1" + } + }, + { + "name": "red-drop-packets-color-2" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "1" + } + }, + { + "name": "red-drop-bytes-color-2" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "1" + } + }, + { + "name": "red-drop-packets-color-3" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "1" + } + }, + { + "name": "red-drop-bytes-color-3" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "2" + } + }, + { + "name": "peak-buffer-occupancy-bytes" + } + ] + }, + "val": { + "uintVal": "208" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "2" + } + }, + { + "name": "peak-buffer-occupancy-percent" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "2" + } + }, + { + "name": "packets" + } + ] + }, + "val": { + "uintVal": "105352268" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "2" + } + }, + { + "name": "bytes" + } + ] + }, + "val": { + "uintVal": "10957969881" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "2" + } + }, + { + "name": "tail-drop-packets" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "2" + } + }, + { + "name": "tail-drop-bytes" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "2" + } + }, + { + "name": "red-drop-packets-color-0" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "2" + } + }, + { + "name": "red-drop-bytes-color-0" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "2" + } + }, + { + "name": "red-drop-packets-color-1" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "2" + } + }, + { + "name": "red-drop-bytes-color-1" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "2" + } + }, + { + "name": "red-drop-packets-color-2" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "2" + } + }, + { + "name": "red-drop-bytes-color-2" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "2" + } + }, + { + "name": "red-drop-packets-color-3" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "2" + } + }, + { + "name": "red-drop-bytes-color-3" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "3" + } + }, + { + "name": "peak-buffer-occupancy-bytes" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "3" + } + }, + { + "name": "peak-buffer-occupancy-percent" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "3" + } + }, + { + "name": "packets" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "3" + } + }, + { + "name": "bytes" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "3" + } + }, + { + "name": "tail-drop-packets" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "3" + } + }, + { + "name": "tail-drop-bytes" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "3" + } + }, + { + "name": "red-drop-packets-color-0" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "3" + } + }, + { + "name": "red-drop-bytes-color-0" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "3" + } + }, + { + "name": "red-drop-packets-color-1" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "3" + } + }, + { + "name": "red-drop-bytes-color-1" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "3" + } + }, + { + "name": "red-drop-packets-color-2" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "3" + } + }, + { + "name": "red-drop-bytes-color-2" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "3" + } + }, + { + "name": "red-drop-packets-color-3" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "3" + } + }, + { + "name": "red-drop-bytes-color-3" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "4" + } + }, + { + "name": "peak-buffer-occupancy-bytes" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "4" + } + }, + { + "name": "peak-buffer-occupancy-percent" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "4" + } + }, + { + "name": "packets" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "4" + } + }, + { + "name": "bytes" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "4" + } + }, + { + "name": "tail-drop-packets" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "4" + } + }, + { + "name": "tail-drop-bytes" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "4" + } + }, + { + "name": "red-drop-packets-color-0" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "4" + } + }, + { + "name": "red-drop-bytes-color-0" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "4" + } + }, + { + "name": "red-drop-packets-color-1" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "4" + } + }, + { + "name": "red-drop-bytes-color-1" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "4" + } + }, + { + "name": "red-drop-packets-color-2" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "4" + } + }, + { + "name": "red-drop-bytes-color-2" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "4" + } + }, + { + "name": "red-drop-packets-color-3" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "4" + } + }, + { + "name": "red-drop-bytes-color-3" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "5" + } + }, + { + "name": "peak-buffer-occupancy-bytes" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "5" + } + }, + { + "name": "peak-buffer-occupancy-percent" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "5" + } + }, + { + "name": "packets" + } + ] + }, + "val": { + "uintVal": "12027619" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "5" + } + }, + { + "name": "bytes" + } + ] + }, + "val": { + "uintVal": "1020800306" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "5" + } + }, + { + "name": "tail-drop-packets" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "5" + } + }, + { + "name": "tail-drop-bytes" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "5" + } + }, + { + "name": "red-drop-packets-color-0" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "5" + } + }, + { + "name": "red-drop-bytes-color-0" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "5" + } + }, + { + "name": "red-drop-packets-color-1" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "5" + } + }, + { + "name": "red-drop-bytes-color-1" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "5" + } + }, + { + "name": "red-drop-packets-color-2" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "5" + } + }, + { + "name": "red-drop-bytes-color-2" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "5" + } + }, + { + "name": "red-drop-packets-color-3" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "5" + } + }, + { + "name": "red-drop-bytes-color-3" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "6" + } + }, + { + "name": "peak-buffer-occupancy-bytes" + } + ] + }, + "val": { + "uintVal": "624" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "6" + } + }, + { + "name": "peak-buffer-occupancy-percent" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "6" + } + }, + { + "name": "packets" + } + ] + }, + "val": { + "uintVal": "4773346" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "6" + } + }, + { + "name": "bytes" + } + ] + }, + "val": { + "uintVal": "1257881347" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "6" + } + }, + { + "name": "tail-drop-packets" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "6" + } + }, + { + "name": "tail-drop-bytes" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "6" + } + }, + { + "name": "red-drop-packets-color-0" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "6" + } + }, + { + "name": "red-drop-bytes-color-0" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "6" + } + }, + { + "name": "red-drop-packets-color-1" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "6" + } + }, + { + "name": "red-drop-bytes-color-1" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "6" + } + }, + { + "name": "red-drop-packets-color-2" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "6" + } + }, + { + "name": "red-drop-bytes-color-2" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "6" + } + }, + { + "name": "red-drop-packets-color-3" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "6" + } + }, + { + "name": "red-drop-bytes-color-3" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "7" + } + }, + { + "name": "peak-buffer-occupancy-bytes" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "7" + } + }, + { + "name": "peak-buffer-occupancy-percent" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "7" + } + }, + { + "name": "packets" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "7" + } + }, + { + "name": "bytes" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "7" + } + }, + { + "name": "tail-drop-packets" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "7" + } + }, + { + "name": "tail-drop-bytes" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "7" + } + }, + { + "name": "red-drop-packets-color-0" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "7" + } + }, + { + "name": "red-drop-bytes-color-0" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "7" + } + }, + { + "name": "red-drop-packets-color-1" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "7" + } + }, + { + "name": "red-drop-bytes-color-1" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "7" + } + }, + { + "name": "red-drop-packets-color-2" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "7" + } + }, + { + "name": "red-drop-bytes-color-2" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "7" + } + }, + { + "name": "red-drop-packets-color-3" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "7" + } + }, + { + "name": "red-drop-bytes-color-3" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "8" + } + }, + { + "name": "peak-buffer-occupancy-bytes" + } + ] + }, + "val": { + "uintVal": "208" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "8" + } + }, + { + "name": "peak-buffer-occupancy-percent" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "8" + } + }, + { + "name": "packets" + } + ] + }, + "val": { + "uintVal": "75415151" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "8" + } + }, + { + "name": "bytes" + } + ] + }, + "val": { + "uintVal": "8898987190" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "8" + } + }, + { + "name": "tail-drop-packets" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "8" + } + }, + { + "name": "tail-drop-bytes" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "8" + } + }, + { + "name": "red-drop-packets-color-0" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "8" + } + }, + { + "name": "red-drop-bytes-color-0" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "8" + } + }, + { + "name": "red-drop-packets-color-1" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "8" + } + }, + { + "name": "red-drop-bytes-color-1" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "8" + } + }, + { + "name": "red-drop-packets-color-2" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "8" + } + }, + { + "name": "red-drop-bytes-color-2" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "8" + } + }, + { + "name": "red-drop-packets-color-3" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "8" + } + }, + { + "name": "red-drop-bytes-color-3" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "9" + } + }, + { + "name": "peak-buffer-occupancy-bytes" + } + ] + }, + "val": { + "uintVal": "208" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "9" + } + }, + { + "name": "peak-buffer-occupancy-percent" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "9" + } + }, + { + "name": "packets" + } + ] + }, + "val": { + "uintVal": "157255632" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "9" + } + }, + { + "name": "bytes" + } + ] + }, + "val": { + "uintVal": "16919364168" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "9" + } + }, + { + "name": "tail-drop-packets" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "9" + } + }, + { + "name": "tail-drop-bytes" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "9" + } + }, + { + "name": "red-drop-packets-color-0" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "9" + } + }, + { + "name": "red-drop-bytes-color-0" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "9" + } + }, + { + "name": "red-drop-packets-color-1" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "9" + } + }, + { + "name": "red-drop-bytes-color-1" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "9" + } + }, + { + "name": "red-drop-packets-color-2" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "9" + } + }, + { + "name": "red-drop-bytes-color-2" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "9" + } + }, + { + "name": "red-drop-packets-color-3" + } + ] + }, + "val": { + "uintVal": "0" + } + }, + { + "path": { + "elem": [ + { + "name": "egress" + }, + { + "key": { + "queue-number": "9" + } + }, + { + "name": "red-drop-bytes-color-3" + } + ] + }, + "val": { + "uintVal": "0" + } + } + ] + }, + "extension": [ + { + "registeredExt": { + "id": 1, + "msg": "ChBBQkJWRFBBSjAxLkJSLkJSIgtzZW5zb3JfMTAwNSofL2p1bm9zL3N5c3RlbS9saW5lY2FyZC9xbW9uLXN3LzIfL2p1bm9zL3N5c3RlbS9saW5lY2FyZC9xbW9uLXN3LzoDUEZFQICAgAFggsvIptEy" + } + } + ] + } +] \ No newline at end of file diff --git a/plugins/inputs/gnmi/testcases/issue_16515/telegraf.conf b/plugins/inputs/gnmi/testcases/issue_16515/telegraf.conf new file mode 100644 index 000000000..39d4b0342 --- /dev/null +++ b/plugins/inputs/gnmi/testcases/issue_16515/telegraf.conf @@ -0,0 +1,9 @@ +[[inputs.gnmi]] + addresses = ["dummy"] + + [[inputs.gnmi.subscription]] + name = "qmon" + origin = "openconfig" + path = "/junos/system/linecard/qmon-sw" + subscription_mode = "sample" + sample_interval = "60s"