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

Update Teams Notifications for NonHTTTP Probes #1080

Merged
merged 2 commits into from
Jul 21, 2023

Conversation

sapiderman
Copy link
Contributor

@sapiderman sapiderman commented Jul 18, 2023

Monika Pull Request (PR)

What feature/issue does this PR add

  1. Empty URL field in Notification
  2. Fixes issue Missing Field in Redis notification #962

How did you implement / how did you fix it

  1. Display URL or ProbeID if URL not exist.

How to test

  1. Use a config where you probe a postgre db or a redis cache:
probes:
  - id: 'redis-1'
    name: 'redis-test'
    redis:
      - host: 192.168.0.1
        port: 6379
    alerts:
      - assertion: response.status < 200 or response.status > 299
        message: HTTP Status is not 200
    incidentThreshold: 3
    recoveryThreshold: 3

  - id: postgres-111
    interval: 3
    incidentThreshold: 1
    recoveryThreshold: 1
    postgres:
      - uri: postgres://user:[email protected]:5432/mydb
    alerts:
      - assertion: response.status < 200 or response.status > 299
        message: HTTP Status is not 200

notifications:
  - id: desktop
    type: desktop
  - id: teams-001
    type: teams
    data:
      url: https://yourcompany.webhook.office.com/webhookb2/1122335566aabbccdded/IncomingWwebhood/aabbccddeefffgg
  1. Spinup your postgresql or redis database
  2. Run the probe: npm start -- -c config.yaml

Before PR

For Postgres
image

After PR

For Postgres
image

For Redis
image

@codecov
Copy link

codecov bot commented Jul 18, 2023

Codecov Report

Merging #1080 (7c3f0c9) into main (109e68a) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 7c3f0c9 differs from pull request most recent head ec0e98a. Consider uploading reports for the commit ec0e98a to get more accurate results

@@           Coverage Diff           @@
##             main    #1080   +/-   ##
=======================================
  Coverage   55.86%   55.86%           
=======================================
  Files          85       85           
  Lines        2590     2590           
  Branches      536      536           
=======================================
  Hits         1447     1447           
  Misses        952      952           
  Partials      191      191           
Impacted Files Coverage Δ
src/components/probe/prober/http/index.ts 61.01% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@dennypradipta dennypradipta merged commit d740af7 into hyperjumptech:main Jul 21, 2023
4 checks passed
@sapiderman sapiderman deleted the fix/teams-notifications branch November 21, 2023 17:02
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.

3 participants