[GH-ISSUE #363] Can't not receive notification but Test message #279

Closed
opened 2026-02-25 23:41:52 +03:00 by kerem · 4 comments
Owner

Originally created by @db045 on GitHub (Apr 29, 2020).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/363

OS:Debian GNU/Linux 10 (buster)

I have installed twice and encounter the same problem: HC did not send notifications if any check fails. But I really was able to get test messages from INTERGRATIONS.

  • [x ] Test notification(telegram): got test message
  • Test slack: got test message
  • Last Notification of CHECKS: Never

I run manager.py test and got the above message. Please advice how I could adject any setting to run Healthchecks well.
Thanks.

(hc-venv) root@DUMA:/opt/healthchecks/healthchecks# ./manage.py test
Creating test database for alias 'default'...
System check identified no issues (0 silenced).
..............................................................................FF..F..............................................................................................................................................................................................................................................................F..F........................................................................F......................................................................................................................................................................................................................................................
======================================================================
FAIL: test_it_checks_for_existing_users (hc.accounts.tests.test_signup.SignupTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/healthchecks/healthchecks/hc/accounts/tests/test_signup.py", line 61, in test_it_checks_for_existing_users
    self.assertContains(r, "already exists")
  File "/opt/healthchecks/hc-venv/lib/python3.7/site-packages/django/test/testcases.py", line 446, in assertContains
    response, text, status_code, msg_prefix, html)
  File "/opt/healthchecks/hc-venv/lib/python3.7/site-packages/django/test/testcases.py", line 418, in _assert_contains
    " (expected %d)" % (response.status_code, status_code)
AssertionError: 403 != 200 : Couldn't retrieve content: Response code was 403 (expected 200)

======================================================================
FAIL: test_it_checks_syntax (hc.accounts.tests.test_signup.SignupTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/healthchecks/healthchecks/hc/accounts/tests/test_signup.py", line 66, in test_it_checks_syntax
    self.assertContains(r, "Enter a valid email address")
  File "/opt/healthchecks/hc-venv/lib/python3.7/site-packages/django/test/testcases.py", line 446, in assertContains
    response, text, status_code, msg_prefix, html)
  File "/opt/healthchecks/hc-venv/lib/python3.7/site-packages/django/test/testcases.py", line 418, in _assert_contains
    " (expected %d)" % (response.status_code, status_code)
AssertionError: 403 != 200 : Couldn't retrieve content: Response code was 403 (expected 200)

======================================================================
FAIL: test_it_sends_link (hc.accounts.tests.test_signup.SignupTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/healthchecks/healthchecks/hc/accounts/tests/test_signup.py", line 15, in test_it_sends_link
    self.assertContains(r, "Account created")
  File "/opt/healthchecks/hc-venv/lib/python3.7/site-packages/django/test/testcases.py", line 446, in assertContains
    response, text, status_code, msg_prefix, html)
  File "/opt/healthchecks/hc-venv/lib/python3.7/site-packages/django/test/testcases.py", line 418, in _assert_contains
    " (expected %d)" % (response.status_code, status_code)
AssertionError: 403 != 200 : Couldn't retrieve content: Response code was 403 (expected 200)

======================================================================
FAIL: test_instructions_work (hc.front.tests.test_add_email.AddEmailTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/healthchecks/healthchecks/hc/front/tests/test_add_email.py", line 19, in test_instructions_work
    self.assertContains(r, "Requires confirmation")
  File "/opt/healthchecks/hc-venv/lib/python3.7/site-packages/django/test/testcases.py", line 454, in assertContains
    self.assertTrue(real_count != 0, msg_prefix + "Couldn't find %s in response" % text_repr)
AssertionError: False is not true : Couldn't find 'Requires confirmation' in response

======================================================================
FAIL: test_it_creates_channel (hc.front.tests.test_add_email.AddEmailTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/healthchecks/healthchecks/hc/front/tests/test_add_email.py", line 32, in test_it_creates_channel
    self.assertFalse(c.email_verified)
AssertionError: True is not false

======================================================================
FAIL: test_instructions_work (hc.front.tests.test_add_telegram.AddTelegramTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/healthchecks/healthchecks/hc/front/tests/test_add_telegram.py", line 16, in test_instructions_work
    self.assertContains(r, "start@ExampleBot")
  File "/opt/healthchecks/hc-venv/lib/python3.7/site-packages/django/test/testcases.py", line 454, in assertContains
    self.assertTrue(real_count != 0, msg_prefix + "Couldn't find %s in response" % text_repr)
AssertionError: False is not true : Couldn't find 'start@ExampleBot' in response

----------------------------------------------------------------------
Ran 660 tests in 13.084s

FAILED (failures=6)
Originally created by @db045 on GitHub (Apr 29, 2020). Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/363 OS:Debian GNU/Linux 10 (buster) I have installed twice and encounter the same problem: HC did not send notifications if any check fails. But I really was able to get test messages from INTERGRATIONS. - [x ] Test notification(telegram): got test message - [x] Test slack: got test message - [x] Last Notification of CHECKS: Never I run manager.py test and got the above message. Please advice how I could adject any setting to run Healthchecks well. Thanks. ``` (hc-venv) root@DUMA:/opt/healthchecks/healthchecks# ./manage.py test Creating test database for alias 'default'... System check identified no issues (0 silenced). ..............................................................................FF..F..............................................................................................................................................................................................................................................................F..F........................................................................F...................................................................................................................................................................................................................................................... ====================================================================== FAIL: test_it_checks_for_existing_users (hc.accounts.tests.test_signup.SignupTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/opt/healthchecks/healthchecks/hc/accounts/tests/test_signup.py", line 61, in test_it_checks_for_existing_users self.assertContains(r, "already exists") File "/opt/healthchecks/hc-venv/lib/python3.7/site-packages/django/test/testcases.py", line 446, in assertContains response, text, status_code, msg_prefix, html) File "/opt/healthchecks/hc-venv/lib/python3.7/site-packages/django/test/testcases.py", line 418, in _assert_contains " (expected %d)" % (response.status_code, status_code) AssertionError: 403 != 200 : Couldn't retrieve content: Response code was 403 (expected 200) ====================================================================== FAIL: test_it_checks_syntax (hc.accounts.tests.test_signup.SignupTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/opt/healthchecks/healthchecks/hc/accounts/tests/test_signup.py", line 66, in test_it_checks_syntax self.assertContains(r, "Enter a valid email address") File "/opt/healthchecks/hc-venv/lib/python3.7/site-packages/django/test/testcases.py", line 446, in assertContains response, text, status_code, msg_prefix, html) File "/opt/healthchecks/hc-venv/lib/python3.7/site-packages/django/test/testcases.py", line 418, in _assert_contains " (expected %d)" % (response.status_code, status_code) AssertionError: 403 != 200 : Couldn't retrieve content: Response code was 403 (expected 200) ====================================================================== FAIL: test_it_sends_link (hc.accounts.tests.test_signup.SignupTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/opt/healthchecks/healthchecks/hc/accounts/tests/test_signup.py", line 15, in test_it_sends_link self.assertContains(r, "Account created") File "/opt/healthchecks/hc-venv/lib/python3.7/site-packages/django/test/testcases.py", line 446, in assertContains response, text, status_code, msg_prefix, html) File "/opt/healthchecks/hc-venv/lib/python3.7/site-packages/django/test/testcases.py", line 418, in _assert_contains " (expected %d)" % (response.status_code, status_code) AssertionError: 403 != 200 : Couldn't retrieve content: Response code was 403 (expected 200) ====================================================================== FAIL: test_instructions_work (hc.front.tests.test_add_email.AddEmailTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/opt/healthchecks/healthchecks/hc/front/tests/test_add_email.py", line 19, in test_instructions_work self.assertContains(r, "Requires confirmation") File "/opt/healthchecks/hc-venv/lib/python3.7/site-packages/django/test/testcases.py", line 454, in assertContains self.assertTrue(real_count != 0, msg_prefix + "Couldn't find %s in response" % text_repr) AssertionError: False is not true : Couldn't find 'Requires confirmation' in response ====================================================================== FAIL: test_it_creates_channel (hc.front.tests.test_add_email.AddEmailTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/opt/healthchecks/healthchecks/hc/front/tests/test_add_email.py", line 32, in test_it_creates_channel self.assertFalse(c.email_verified) AssertionError: True is not false ====================================================================== FAIL: test_instructions_work (hc.front.tests.test_add_telegram.AddTelegramTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/opt/healthchecks/healthchecks/hc/front/tests/test_add_telegram.py", line 16, in test_instructions_work self.assertContains(r, "start@ExampleBot") File "/opt/healthchecks/hc-venv/lib/python3.7/site-packages/django/test/testcases.py", line 454, in assertContains self.assertTrue(real_count != 0, msg_prefix + "Couldn't find %s in response" % text_repr) AssertionError: False is not true : Couldn't find 'start@ExampleBot' in response ---------------------------------------------------------------------- Ran 660 tests in 13.084s FAILED (failures=6) ```
kerem closed this issue 2026-02-25 23:41:52 +03:00
Author
Owner

@cuu508 commented on GitHub (Apr 29, 2020):

Is the manage.py sendalerts command running?

https://github.com/healthchecks/healthchecks#sending-status-notifications

<!-- gh-comment-id:621225136 --> @cuu508 commented on GitHub (Apr 29, 2020): Is the `manage.py sendalerts` command running? https://github.com/healthchecks/healthchecks#sending-status-notifications
Author
Owner

@db045 commented on GitHub (Apr 29, 2020):

Is the manage.py sendalerts command running?

https://github.com/healthchecks/healthchecks#sending-status-notifications

Yes, thank your reminding for doing this.
I got manu notifications from SLACK and Telegram I should receive.
Now I do this again:

  1. curl the CHECKS : PING
  2. Trigger CHECKS: fail
  3. Still not got any notification after 5 minutes.
  4. But got notifications if I run manager.py sendalerts
    Hope I could show this good product to my boss ASAP. ^^
<!-- gh-comment-id:621236206 --> @db045 commented on GitHub (Apr 29, 2020): > Is the `manage.py sendalerts` command running? > > https://github.com/healthchecks/healthchecks#sending-status-notifications Yes, thank your reminding for doing this. I got manu notifications from SLACK and Telegram I should receive. Now I do this again: 1. curl the CHECKS : PING 2. Trigger CHECKS: fail 3. Still not got any notification after 5 minutes. 4. But got notifications if I run `manager.py sendalerts` Hope I could show this good product to my boss ASAP. ^^
Author
Owner

@cuu508 commented on GitHub (Apr 29, 2020):

You have to set up the sendalerts command to run continuously.

In development & testing you can just have it running in the terminal.

For production, you would want to make sure it is always running in background, starts on system boot, and gets restarted if it crashes.

<!-- gh-comment-id:621242692 --> @cuu508 commented on GitHub (Apr 29, 2020): You have to set up the `sendalerts` command to run continuously. In development & testing you can just have it running in the terminal. For production, you would want to make sure it is always running in background, starts on system boot, and gets restarted if it crashes.
Author
Owner

@db045 commented on GitHub (Apr 29, 2020):

You have to set up the sendalerts command to run continuously.

In development & testing you can just have it running in the terminal.

For production, you would want to make sure it is always running in background, starts on system boot, and gets restarted if it crashes.

Thank you. I think now I realize how to make Healthchecks really check.
I set up sendalerts running continuously and now I got alerts.
Thank your quick replay and help me to do the good thing.

<!-- gh-comment-id:621244969 --> @db045 commented on GitHub (Apr 29, 2020): > You have to set up the `sendalerts` command to run continuously. > > In development & testing you can just have it running in the terminal. > > For production, you would want to make sure it is always running in background, starts on system boot, and gets restarted if it crashes. Thank you. I think now I realize how to make Healthchecks really check. I set up `sendalerts` running continuously and now I got alerts. Thank your quick replay and help me to do the good thing.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/healthchecks#279
No description provided.