Skip to content

Instantly share code, notes, and snippets.

@2color

2color/notes.md

Last active Oct 30, 2017
Embed
What would you like to do?
Prometheus Queries
  • Get rid of pushgateway
  • Saturation - Load testing to determine upper threshold (up 10 rq/sec)
  • Imminent
  • Should we use summeries
    • Historical
    • There might be situation where you don't care about aggregation
  • Historgrams
    • Use up to 10 bukcets
    • Some use cases if you don't know the
    • Aggregations, quantile, timewindow at query time
    • Problem is that you need to choose buckets up from with latency expectations
    • AppDex - Good latency, acceptanceable , bad latency aggregated
    • Even simpler, two buckets

USE - Utilization Saturation Errors RED - requests errors durations LEST - Latency Errors Saturation Traffic

  • List the number of timeseries per metric name/job sort_desc(count by (__name__, job) ({__name__=~".+"}) )

  • Sum the number of nginx connections per instances sum by (instance)(nginx_http_connections{instance=~"185.+"})

  • Rule for DST IF ( (month() => 3 and day_of_month() => 26) or (month() <= 10 and day_of_month() < 29) ) and hour() == 10 and minute() >= 35

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