Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Update Pingdom health check Database, Redis and Celery #871

Merged

Conversation

marijnkampf
Copy link
Contributor

@marijnkampf marijnkampf commented Mar 27, 2024

Description of change

Update the health check end point from ping.xml to pingdom/ping.xml
Extend health check to include Redis and Celery in addition to Database.

Test instructions

Visiting pingdom/ping.xml should display OK xml document with status code 200.

<pingdom_http_custom_check>
<status>OK</status>
</pingdom_http_custom_check>

When database / redis and/or celery are down it should display error message and return status code 500.

<pingdom_http_custom_check>
<status>FALSE</status>
</pingdom_http_custom_check>
<!-- Pingdom check Celery: Error -2 connecting to redis:6379. Name or service not known. -->
<!-- Pingdom check Redis: Error -2 connecting to redis:6379. Name or service not known. -->

@marijnkampf marijnkampf requested a review from a team as a code owner March 27, 2024 13:44
@marijnkampf marijnkampf changed the title WIP: Pingdom health check Database, Redis and Celery Update Pingdom health check Database, Redis and Celery Mar 27, 2024
Copy link

codecov bot commented Mar 28, 2024

Codecov Report

Attention: Patch coverage is 45.28302% with 29 lines in your changes are missing coverage. Please review.

Project coverage is 69.07%. Comparing base (52d7be8) to head (ef248b8).

Files Patch % Lines
app/pingdom/services.py 42.85% 20 Missing ⚠️
app/pingdom/views.py 40.00% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #871      +/-   ##
==========================================
- Coverage   69.58%   69.07%   -0.51%     
==========================================
  Files          60       61       +1     
  Lines        1979     2018      +39     
==========================================
+ Hits         1377     1394      +17     
- Misses        602      624      +22     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@marijnkampf marijnkampf changed the base branch from main to migration-deploy March 28, 2024 12:08
@marijnkampf marijnkampf merged commit 1044fe1 into migration-deploy Mar 28, 2024
2 of 4 checks passed
@marijnkampf marijnkampf deleted the migration/DPM-189-enquiry-management-health-check branch March 28, 2024 13:58
marijnkampf added a commit that referenced this pull request Apr 16, 2024
* Change health check end point to /pingdom/ping.xml.
* Extend health check to include Celery and Redis in addition to Database.
marijnkampf added a commit that referenced this pull request Apr 22, 2024
* Change health check end point to /pingdom/ping.xml.
* Extend health check to include Celery and Redis in addition to Database.
marijnkampf added a commit that referenced this pull request Apr 23, 2024
* Change health check end point to /pingdom/ping.xml.
* Extend health check to include Celery and Redis in addition to Database.
marijnkampf added a commit that referenced this pull request Apr 23, 2024
* Change health check end point to /pingdom/ping.xml.
* Extend health check to include Celery and Redis in addition to Database.
marijnkampf added a commit that referenced this pull request May 8, 2024
* Change health check end point to /pingdom/ping.xml.
* Extend health check to include Celery and Redis in addition to Database.
cgsunkel pushed a commit that referenced this pull request Jun 25, 2024
* Change health check end point to /pingdom/ping.xml.
* Extend health check to include Celery and Redis in addition to Database.
cgsunkel pushed a commit that referenced this pull request Jul 15, 2024
* Change health check end point to /pingdom/ping.xml.
* Extend health check to include Celery and Redis in addition to Database.
cgsunkel added a commit that referenced this pull request Jul 15, 2024
* update codeowners

* Add sample rate to sentry (#981)

* Add sample_rate to sentry setup

* Add new action for govpaas branch

* Bump django from 4.2.13 to 4.2.14 (#982)

Bumps [django](https://github.com/django/django) from 4.2.13 to 4.2.14.
- [Commits](django/django@4.2.13...4.2.14)

---
updated-dependencies:
- dependency-name: django
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add new fields to sentry config (#983)

* Remove migration actions (#984)

* Update Pingdom health check Database, Redis and Celery (#871)

* Change health check end point to /pingdom/ping.xml.
* Extend health check to include Celery and Redis in addition to Database.

* DPM 202 asim formatter logging (#893)

* Use ASIM formatter for logging on production environments
* Upgrade Python version in Docker

* add build config file

* allow for running on gov.uk paas and dbt platform

* allow any python 3.12 version

* allow nodejs buildpack to be included

* set nodejs version to 20.11

* add collect static command to build

* do not use sentry when dsn unset

* add required variables for local build

* DPM 623 Update DB connection environment variable (#915)

* Update database connection environment variable to use DATABASE_CREDENTIALS

* Update image_build for packaging.
Co-Authored-By: Kuds <kudrotey.khuda@digital.trade.gov.uk>

* Add extra env vars to image build.

* Adding Env vars
Co-Authored-By: Kuds <kudrotey.khuda@digital.trade.gov.uk>

* Update env vars
<yusuf.sheikh@digital.trade.gov.uk>

* Adding Env vars

* Added more env vars

* More Env vars

* More Env Vars

* Remove Duplicate Env Var

* Added extra env var

* fix: remove unnecessary start from package.json

* Update image_build_run.sh to include all env vars

* Add setuptools to requirements.txt

* fix: try downgrade of python

* Reset migration for staging deploy

* Apply admin migration before enquiry (#933)

* Revert migration script changes (#941)

* Remove celery check from pingdom (#944)

* Remove celery check from pingdom

* Remove celery pingdom checks

* fix: always call collectstatic
Co-Authored-By: Paul <paul.wheatcroft@digital.trade.gov.uk>

* Add saas compilation to image build script

* fix: update celery timezone

* chore: update default timezone

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Christopher <christopher.sunkel@digital.trade.gov.uk>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marijn Kampf <marijn.kampf@digital.trade.gov.uk>
Co-authored-by: Lawrence Goldstien <lawrence.goldstein@digital.trade.gov.uk>
Co-authored-by: markwarriner <mark.warriner@digital.trade.gov.uk>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants