add rates TX and RX BPS and PPS to telemetry gnmi #142
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why I did it
We need in telemetry TX and RX BPS and PPS
How I did it
Added in telemetry new options for mapping the RATES table in REDIS COUNTERS_DB
How to verify it
manual test using gnmi client to the new virtual paths
Description for the changelog
Added new virtual paths for TX and RX BPS and PPS in telemetry gnmi
examples:
RATES/Ethernet1/RX_BPS
RATES/Ethernet1/RX_PPS
RATES/Ethernet1/TX_BPS
RATES/Ethernet1/TX_PPS
How to test it
gnmi_get -xpath_target COUNTERS_DB -xpath RATES/Ethernet1 -target_addr 127.0.0.1:8080 -notls
== getRequest:
prefix: <
target: "COUNTERS_DB"
path: <
elem: <
name: "RATES"
elem: <
name: "Ethernet1"
elem: <
name: "RX_BPS"
encoding: JSON_IETF
== getResponse:
notification: <
timestamp: 1691002490789736143
prefix: <
target: "COUNTERS_DB"
update: <
path: <
elem: <
name: "RATES"
>
elem: <
name: "Ethernet1"
>
elem: <
name: "RX_BPS"
>
>
val: <
string_val: "0"
>
== getRequest:
prefix: <
target: "COUNTERS_DB"
path: <
elem: <
name: "RATES"
elem: <
name: "Ethernet1"
elem: <
name: "RX_PPS"
encoding: JSON_IETF
== getResponse:
notification: <
timestamp: 1691002497547321105
prefix: <
target: "COUNTERS_DB"
update: <
path: <
elem: <
name: "RATES"
>
elem: <
name: "Ethernet1"
>
elem: <
name: "RX_PPS"
>
>
val: <
string_val: "0"
>
== getRequest:
prefix: <
target: "COUNTERS_DB"
path: <
elem: <
name: "RATES"
elem: <
name: "Ethernet1"
elem: <
name: "TX_BPS"
encoding: JSON_IETF
== getResponse:
notification: <
timestamp: 1691002505032332775
prefix: <
target: "COUNTERS_DB"
update: <
path: <
elem: <
name: "RATES"
>
elem: <
name: "Ethernet1"
>
elem: <
name: "TX_BPS"
>
>
val: <
string_val: "0"
>
== getRequest:
prefix: <
target: "COUNTERS_DB"
path: <
elem: <
name: "RATES"
elem: <
name: "Ethernet1"
elem: <
name: "TX_PPS"
encoding: JSON_IETF
== getResponse:
notification: <
timestamp: 1691002510736128394
prefix: <
target: "COUNTERS_DB"
update: <
path: <
elem: <
name: "RATES"
>
elem: <
name: "Ethernet1"
>
elem: <
name: "TX_PPS"
>
>
val: <
string_val: "0"
>