-
Notifications
You must be signed in to change notification settings - Fork 492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TICK script - how to find elapsed time between two measurement points #384
Comments
@vlasov01 There is no clean way to do this within Kapacitor at the moment. One way I can think to do this is to use the Since the above method is really confusing and fragile we should probably add a method for computing elapsed times. Maybe something as simple as:
Would that fit your needs? Can you provide more context about what you are trying to do with the elapsed time as this seems like an interesting use case? |
@nathanielc Thank you for the prompt reply! I've implemented script based on your code sample.
A bit about my use case: |
@nathanielc It seems the proposal #388 looks a bit similar. |
I'm having difficulties to create a TICK script, that can find elapsed time between two measurement points. My Influx Measurement contains state points with values "on" and "off" (always in this order). I'd like to trigger event once "off" state arrives and calculates elapsed time between "on" and "off" state.
The text was updated successfully, but these errors were encountered: