mtakaki / cachet-url-monitor

URL monitor plugin for cachethq.io
MIT License
124 stars 48 forks source link

Allowed_fails behaviour #111

Closed MeStrak closed 3 years ago

MeStrak commented 3 years ago

This isn't actually an issue, I just want to check the behaviour of allowed_fails. I'm not sure if it applies to a number of retries when timeout is exceeded, or if it retries again at the next frequency interval, up to the number of allowed_fails before creating an incident.

If I have the configuration below with allowed_fails: 10, does it mean ...

  1. URL test will run, and timeout after 10 seconds if unreachable. Then it will retry immediately 10 more times before creating an incident or
  2. URL test will run, and timeout after 10 seconds if unreachable. Then it will wait 300 seconds for the next check, and it would be 3000 seconds before an incident is created ?
  - name: my test test
    url: https://mytest-test.com/
    method: GET
    timeout: 10 # seconds
    expectation:
      - type: HTTP_STATUS
        status_range: 200
      - type: LATENCY
        threshold: 5 # seconds
    allowed_fails: 10
    component_id: 7
    action:
      - CREATE_INCIDENT
      - UPDATE_STATUS
    public_incidents: true
    frequency: 300 # seconds