Hi,This sounds more like what I was looking for when I replied to a different post. I should have looked further in the forum. I tried to create a recording rule similar to the "nighttime" rule that was suggested but it is getting "no data" when I run a query on it. If I look at the data on the right side it gives a result. Am I mistaken in the syntax?workhours=day_of_week() < bool 6 or hour() >= bool 13 or hour() < bool 22
Once I have the recording rule working, would this be the proper syntax for the alert?IF workhours * my_alert_condition
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/d57c9d68-5959-43b9-9f13-426326ce9232%40googlegroups.com.--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsub...@googlegroups.com.
To post to this group, send email to prometheus-developers@googlegroups.com.
To post to this group, send email to prometheus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/d57c9d68-5959-43b9-9f13-426326ce9232%40googlegroups.com.
Hi Brian,Yeah, thanks, I had been a little indecisive with the rule. It went fromworkhours=day_of_week() < bool 6 and hour() >= bool 13 and hour() < bool 22tooffhours=day_of_week() >= bool 6 or hour() < bool 13 or hour() > bool 21and then when I changed it back I forgot to change the ors to ands. I never restarted Prometheus after the first one, though, so that's what's running and giving me "no data" in the query console. Thanks for catching that! This is what my current Prometheus Rule display shows:workhours{} = day_of_week() < BOOL 6 and hour() >= BOOL 13 and hour() < BOOL 21
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsubscri...@googlegroups.com.
To post to this group, send email to prometheus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/d57c9d68-5959-43b9-9f13-426326ce9232%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsub...@googlegroups.com.
To post to this group, send email to prometheus-developers@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/c0f431a3-f68f-4f56-aa09-60439e20f200%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsub...@googlegroups.com.
To post to this group, send email to prometheus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/d57c9d68-5959-43b9-9f13-426326ce9232%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsub...@googlegroups.com.
To post to this group, send email to prometheus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/c0f431a3-f68f-4f56-aa09-60439e20f200%40googlegroups.com.
Hey Brian,This has been a great help! That resolves the recording rule.When I tried your recommendation on IF statement, though, promtool was not kind:IF rate(datafeed[10m]) == 0 and by () workhours == 1FAILED: parse error at line 4, char 36: no valid expression foundAny thoughts?
Thanks!Kris.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsubscri...@googlegroups.com.
To post to this group, send email to prometheus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/d57c9d68-5959-43b9-9f13-426326ce9232%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsubscri...@googlegroups.com.
To post to this group, send email to prometheus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/c0f431a3-f68f-4f56-aa09-60439e20f200%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsub...@googlegroups.com.
To post to this group, send email to prometheus-developers@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/b5832e1d-6744-4d74-be7e-ce840c7e37c5%40googlegroups.com.
Thanks!Kris.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsub...@googlegroups.com.
To post to this group, send email to prometheus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/d57c9d68-5959-43b9-9f13-426326ce9232%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsub...@googlegroups.com.
To post to this group, send email to prometheus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/c0f431a3-f68f-4f56-aa09-60439e20f200%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsub...@googlegroups.com.
To post to this group, send email to prometheus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/b5832e1d-6744-4d74-be7e-ce840c7e37c5%40googlegroups.com.
I understand about the language thing!When I enter "rate(datafeed[10m]) == 0 and on () workhours == 1" on the Prometheus query window it returns the proper value when the feed is not active during those hours. When I add that into the rules file and restart Prometheus, though, it is removing "on ()" from the rules and it shows up as just "rate(datafeed[10m]) == 0 and workhours == 1". That query is not returning "no data". Is that a bug? Or does it need to be expressed differently in the rules file?
Thanks!Kris.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsubscri...@googlegroups.com.
To post to this group, send email to prometheus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/d57c9d68-5959-43b9-9f13-426326ce9232%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsubscri...@googlegroups.com.
To post to this group, send email to prometheus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/c0f431a3-f68f-4f56-aa09-60439e20f200%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsubscri...@googlegroups.com.
To post to this group, send email to prometheus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/b5832e1d-6744-4d74-be7e-ce840c7e37c5%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsub...@googlegroups.com.
To post to this group, send email to prometheus-developers@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/1f3cb141-cbe3-490f-8500-baba10901e73%40googlegroups.com.
Thanks!Kris.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsub...@googlegroups.com.
To post to this group, send email to prometheus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/d57c9d68-5959-43b9-9f13-426326ce9232%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsub...@googlegroups.com.
To post to this group, send email to prometheus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/c0f431a3-f68f-4f56-aa09-60439e20f200%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsub...@googlegroups.com.
To post to this group, send email to prometheus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/b5832e1d-6744-4d74-be7e-ce840c7e37c5%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsub...@googlegroups.com.
To post to this group, send email to prometheus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/1f3cb141-cbe3-490f-8500-baba10901e73%40googlegroups.com.