openconfig/public

Telemetry sample-interval and avg-min-max-instant-stats interval relationship

telecomdevel opened this issue · 2 comments

Hi,

If I use telemetry to stream an OpenConfig attribute that has the avg-min-max-instant-stats type, the data that gets streamed out will contain avg, min, max, and interval. Interval is the time interval over which avg, min, and max are calculated.

Does this interval have any relationship with the telemetry sample-interval? For example, if I have two telemetry subscriptions that use 1 sec and 5 sec sample-intervals, will the interval values in the avg-min-max-instant-stats group show 1 sec and 5 sec?

My understanding is that they are not related. Sample-interval defines how often data is streamed out to the collectors, and its value can be different from the avg-min-max-instant-stats group interval.

openconfig-telemetry.yang:
grouping telemetry-stream-frequency-config {
...
leaf sample-interval {
...

openconfig-terminal-device.yang:
container pre-fec-ber {
...
uses oc-opt-types:avg-min-max-instant-stats-precision18-ber;

openconfig-transport-types.yang:
grouping avg-min-max-instant-stats-precision18-ber {
...
leaf avg {
...
leaf min {
...
leaf max {
...
uses oc-types:stat-interval-state;

openconfig-types.yang:
grouping stat-interval-state {
...
leaf interval {
type oc-types:stat-interval;
description
"If supported by the system, this reports the time interval
over which the min/max/average statistics are computed by
the system.";
}
}

Thanks,

Calvin

The question was answered in another group.

Hi Calvin,

The two are unrelated. The gNMI fields are about how often you'd like the data sampled from the management plane (usually, some cache that has been populated from polling underlying hardware data sources, or the daemons on the device that are calculating their own state). The type that you're referring to is to model cases where the data collection from the underlying hardware is collected at a specific interval with more than just a single value. I am not aware of any implementations where the former changes the latter's behaviour -- and I can't imagine that this would be a robust design because different gNMI clients can have different intervals specified.

Cheers,
r.

dplore commented

Thanks for sharing the issue here. I will close this as I think this answers the question. If not, please feel free to reopen.