What is the difference between `count`, `count_over_time` and `count_values`?
IntermediateConceptPromQL & Recording Rules
Answer
count(up == 1): number of series at this instant (targets up now).count_over_time(up[1h]): number of samples per series in the last hour (detects missed scrapes).count_values("version", build_info): counts series grouped by their value, writing the value into a label; useful for "how many pods run each version" when versions are numeric.
More on PromQL & Recording Rules
What are the PromQL data types?BeginnerWhat label matchers does PromQL support?BeginnerExplain `rate()`.Beginner`rate()` vs `irate()`: what is the difference?IntermediateWhat does `increase()` return and why is it sometimes a non-integer?IntermediateWhy must you `rate()` before `sum()`, never the reverse?Intermediate