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

Metrics within prometheus is not real time #1462

Closed
ArtemChekunov opened this Issue Mar 4, 2016 · 5 comments

Comments

Projects
None yet
3 participants
@ArtemChekunov
Copy link

ArtemChekunov commented Mar 4, 2016

I made a bunch with consul, consul_exporter and prometheus.
After that i made alert rule:

ALERT ConsulClientCount
  IF sum(consul_health_node_status{check="serfHealth",node=~".*-services-.*"}) < 100
  FOR 30s
  ANNOTATIONS {description="Consul Client Count value={{$value}})", summary="Consul Client Count LESS 100"}

but in case when consul client is down the alert is worked out only after ~5m

  scrape_interval:     5s 
  evaluation_interval: 5s.

P.S. consul_exporter returns data correctly

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Mar 4, 2016

It sounds like you're running into a staleness issue, as old timeseries that are no longer exported are still considered for 5 minutes. I'd suggest alerting on something that represents direct user experience, rather than trying to catch every possible failure mode such as a drop in clients.

@ArtemChekunov

This comment has been minimized.

Copy link
Author

ArtemChekunov commented Mar 4, 2016

thanx

-query.staleness-delta 5s is solved my issue

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Mar 4, 2016

I'd strongly advise against dropping -query.staleness-delta to that low a value, it'll cause things to break in fun ways.

@fuzzyami

This comment has been minimized.

Copy link

fuzzyami commented Nov 27, 2016

@brian-brazil what would you consider a safe minimum? 1m?

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 24, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.