Skip to content
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

absent_over_time and absent #2893

Closed
cyriltovena opened this issue Nov 6, 2020 · 2 comments · Fixed by #3053
Closed

absent_over_time and absent #2893

cyriltovena opened this issue Nov 6, 2020 · 2 comments · Fixed by #3053

Comments

@cyriltovena
Copy link
Contributor

cyriltovena commented Nov 6, 2020

Like for Prometheus https://prometheus.io/docs/prometheus/latest/querying/functions/#absent_over_time

absent_over_time can be useful for alerting when a stream disappears for too long. aka something stopped logging.

absent() should also be implemented for vectors generated by range aggregations.

@cyriltovena cyriltovena changed the title absent_over_time absent_over_time and absent Nov 6, 2020
@tabnul
Copy link

tabnul commented Dec 2, 2020

eagerly waiting for this too.
what are possible workarounds?
I am thinking of a time function like in prometheus (Extract last log record time from current time and alert if there is a result bigger than 5 minutes), but this doesnt seem possible either.

@ruanbekker
Copy link

Hey @tabnul , I made a workaround that fits my use-case, where I alert to slack when log content is not visible within one minute using AWS Lambda and CloudWatch Events:

cyriltovena added a commit to cyriltovena/loki that referenced this issue Dec 7, 2020
This adds absent_over_time which is super useful when alerting, it can be combine with any logql selector including parsers and filter to returns a timeseries with 1  when logs go missing.

Fixes grafana#2893

Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
cyriltovena added a commit that referenced this issue Dec 8, 2020
* Add absent_over_time

This adds absent_over_time which is super useful when alerting, it can be combine with any logql selector including parsers and filter to returns a timeseries with 1  when logs go missing.

Fixes #2893

Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>

* Adds comment.

Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants