openconfig / public

Repository for publishing OpenConfig models, documentation, and other material for the community.
Apache License 2.0
900 stars 656 forks source link

OpenConfig rolling window statistics - error handling for min max and avg calculation #1211

Open jli75024 opened 3 weeks ago

jli75024 commented 3 weeks ago

Hi,

I have a question about OpenConfig rolling window min/max/avg calculation. What is the general approaches to handling error during data reading within a rolling window? For example

  1. Skip the erroneous data
  2. Use a placeholder value
  3. Use a validity flag
  4. Window recalculation
  5. Separate error report

Thanks Jin

dplore commented 3 weeks ago

Hi, could you describe an example scenario, including the gNMI RPC you are using (gnmi.Subscribe SAMPLE mode I guess?) and example OC paths?

jli75024 commented 3 weeks ago

Hi, could you describe an example scenario, including the gNMI RPC you are using (gnmi.Subscribe SAMPLE mode I guess?) and example OC paths?

I am working in Network Element and new to OC. Here is the example of OC model

+--ro output-power +--ro instant? decimal64 +--ro avg? decimal64 +--ro min? decimal64 +--ro max? decimal64 +--ro interval? oc-types:stat-interval +--ro min-time? oc-types:timeticks64 +--ro max-time? oc-types:timeticks64

container output-power { description "The output optical power of this port in units of 0.01dBm. If avg/min/max statistics are not supported, the target is expected to just supply the instant value";

  uses oc-types:avg-min-max-instant-stats-precision2-dBm;
}

grouping avg-min-max-instant-stats-precision2-dBm { description "Common grouping for recording dBm values with 2 decimal precision. Values include the instantaneous, average, minimum, and maximum statistics. Statistics are computed and reported based on a moving time interval (e.g., the last 30s). If supported by the device, the time interval over which the statistics are computed, and the times at which the minimum and maximum values occurred, are also reported.";