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

Failed to read assertion Error #1330

Closed
sapiderman opened this issue Dec 9, 2024 · 2 comments · Fixed by #1340
Closed

Failed to read assertion Error #1330

sapiderman opened this issue Dec 9, 2024 · 2 comments · Fixed by #1340
Assignees
Labels
bug Something isn't working

Comments

@sapiderman
Copy link
Contributor

sapiderman commented Dec 9, 2024

Describe the bug
Getting some error message "Failed request assertion is not found" when probing.

To Reproduce
Steps to reproduce the behavior:

  1. Use the following config.yaml
probes:
  - id: 'http-1'
    name: 'mock-test'
    requests:
      - url: http://0.0.0.0:7001/v1/hello
    alerts:
      - assertion: response.status < 200 or response.status > 308
        message: HTTP Status is not 200
      - assertion: response.ime > 2000
        message: Too sloow
  1. Start probing using: npm start -- -c config.yaml
  2. Start your local mock server
  3. Then disable/turn off the mock server

Expected behavior

  1. Assertion exist, should have no problem finding it even when connection is refused

Screenshots
image

Desktop (please complete the following information):

  • OS: WIndows 11 and WSL (Ubuntu 24.04 LTS)
  • Lateest monika from main branch

Additional context
Seems to appear when disconnected/ERCONNREFUSED error

@sapiderman sapiderman added the bug Something isn't working label Dec 9, 2024
@syamsudotdev syamsudotdev self-assigned this Dec 29, 2024
@dennypradipta
Copy link
Contributor

@syamsudotdev unfortunately this bug rises again.

Try this config:

notifications:
  - id: 97a34fe1-73ff-4c93-93d6-df6aea9e44c8
    type: desktop
probes:
  - id: 5d115693-4264-4ce8-bc03-6c228b38e3a6
    name: BadSSL
    description: ''
    interval: 10
    requests:
      - url: https://self-signed.badssl.com/
        body: {}
        timeout: 10000
        headers: {}
        method: GET
    incidentThreshold: 5
    recoveryThreshold: 5
    alerts:
      - assertion: response.status < 200 or response.status > 299
        message: Target is not healthy. It has not been returning status code 2xx.
      - assertion: response.time > 2000
        message: >-
          Target is not healthy. The response time has been greater than 2000
          ms.

Then run

Image

@dennypradipta dennypradipta reopened this Feb 4, 2025
@dennypradipta
Copy link
Contributor

Found the issue: just delete the monika-logs.db

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants