openconfig / gnmic

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

Feature: on rate-of-change event monitoring #257

Open jbemmel opened 1 year ago

jbemmel commented 1 year ago

For certain paths, it may make sense to filter updates unless the value is changing more frequently than expected. For example, a counter for dropped packets might change occasionally, but if it happens too often the user would want to know

Is there a way to specify a rate-of-change filter for subscriptions? e.g. if a path changes more often than "n times per second/minute/hour"

karimra commented 1 year ago

gNMIc exposes a prometheus counter called number_of_received_subscribe_response_messages_total. This metrics is tracked per target/per subscription. If you want to calculate it per path (not per subscription) you can use the starlark processor to keep track of certain received paths and calculate their rate of change. The rate can be emitted as a new metric by the processor.