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

Add simple algorithm draft #8

Merged
merged 1 commit into from
Jun 10, 2020
Merged

Add simple algorithm draft #8

merged 1 commit into from
Jun 10, 2020

Conversation

wpjunior
Copy link
Member

This simple algorithm will cover four first alert methods.

example:

slos:
  - name: myteam-a.service-a
    objectives:
      availability: 99
      latency:
      - le: 5.0 # 95% < 5s
        target: 95

      - le: 10.0 # 97% < 10s
        target: 97
    labels:
      slack_channel: '_team_a'
      platform: myplatform
    annotations:
      message: Service A Error Budget consumption
      link: https://grafana.myservice.com/URL

    trafficRateRecord:
      expr: |
        sum (rate(http_requests_total{job="service-a"}[$window]))
    errorRateRecord:
      alertMethod: simple
      alertWindow: 30m
      alertWait: 10m
      expr: |
        sum (rate(http_requests_total{job="service-a", status="5xx"}[$window])) /
        sum (rate(http_requests_total{job="service-a"}[$window]))
    latencyRecord:
      alertMethod: simple
      alertWindow: 30m
      alertWait: 10m
      expr: |
        sum (rate(http_request_duration_seconds_bucket{job="service-a", le="$le"}[$window])) /
        sum (rate(http_requests_total{job="service-a"}[$window]))

@pedrokiefer and @vierno could you review my merge request ?

@freeseacher
Copy link

up ?

Copy link
Contributor

@pedrokiefer pedrokiefer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wpjunior wpjunior merged commit 1a4e198 into master Jun 10, 2020
@freeseacher
Copy link

@wpjunior wow! can you please update docs and example to reflect changes ?

@wpjunior
Copy link
Member Author

sure @freeseacher, I've been updated de README.md, any question that you have, please ask me.

Thanks.

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 this pull request may close these issues.

None yet

3 participants