{"id":13411376,"url":"https://github.com/healthchecks/healthchecks","last_synced_at":"2026-01-22T12:08:36.077Z","repository":{"id":34209964,"uuid":"38067078","full_name":"healthchecks/healthchecks","owner":"healthchecks","description":"Open-source cron job and background task monitoring service, written in Python \u0026 Django","archived":false,"fork":false,"pushed_at":"2026-01-21T07:56:15.000Z","size":26910,"stargazers_count":9808,"open_issues_count":58,"forks_count":938,"subscribers_count":97,"default_branch":"master","last_synced_at":"2026-01-21T07:57:46.006Z","etag":null,"topics":["cron","cron-jobs","devops","django","monitoring","ops"],"latest_commit_sha":null,"homepage":"https://healthchecks.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/healthchecks.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["healthchecks"]}},"created_at":"2015-06-25T18:38:33.000Z","updated_at":"2026-01-21T07:56:22.000Z","dependencies_parsed_at":"2023-10-04T13:17:33.926Z","dependency_job_id":"3aab9cb9-d9a6-454c-a27b-e1f938bff630","html_url":"https://github.com/healthchecks/healthchecks","commit_stats":{"total_commits":3032,"total_committers":100,"mean_commits":30.32,"dds":0.07025065963060684,"last_synced_commit":"c91213179f77c5ea936d5be840080c4d4bd01a19"},"previous_names":[],"tags_count":72,"template":false,"template_full_name":null,"purl":"pkg:github/healthchecks/healthchecks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/healthchecks%2Fhealthchecks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/healthchecks%2Fhealthchecks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/healthchecks%2Fhealthchecks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/healthchecks%2Fhealthchecks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/healthchecks","download_url":"https://codeload.github.com/healthchecks/healthchecks/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/healthchecks%2Fhealthchecks/sbom","scorecard":{"id":459050,"data":{"date":"2025-08-11","repo":{"name":"github.com/healthchecks/healthchecks","commit":"41e2e694c0211f614ba51ca084901d64e9b72d34"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.3,"checks":[{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Maintained","score":10,"reason":"30 commit(s) and 16 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 1/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/coverage.yml:1","Warn: no topLevel permission defined: .github/workflows/mypy.yml:1","Warn: no topLevel permission defined: .github/workflows/publish_docker_image.yml:1","Warn: no topLevel permission defined: .github/workflows/tests.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: BSD 3-Clause \"New\" or \"Revised\" License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/coverage.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/healthchecks/healthchecks/coverage.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/coverage.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/healthchecks/healthchecks/coverage.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/mypy.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/healthchecks/healthchecks/mypy.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/mypy.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/healthchecks/healthchecks/mypy.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish_docker_image.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/healthchecks/healthchecks/publish_docker_image.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish_docker_image.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/healthchecks/healthchecks/publish_docker_image.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish_docker_image.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/healthchecks/healthchecks/publish_docker_image.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish_docker_image.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/healthchecks/healthchecks/publish_docker_image.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish_docker_image.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/healthchecks/healthchecks/publish_docker_image.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish_docker_image.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/healthchecks/healthchecks/publish_docker_image.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/healthchecks/healthchecks/tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/healthchecks/healthchecks/tests.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tests.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/healthchecks/healthchecks/tests.yml/master?enable=pin","Warn: containerImage not pinned by hash: docker/Dockerfile:1","Warn: containerImage not pinned by hash: docker/Dockerfile:18: pin your Docker image by updating python:3.13.0-slim-bookworm to python:3.13.0-slim-bookworm@sha256:0de818129b26ed8f46fd772f540c80e277b67a28229531a1ba0fdacfaed19bcb","Warn: downloadThenRun not pinned by hash: docker/Dockerfile:9","Warn: pipCommand not pinned by hash: docker/Dockerfile:31-33","Warn: pipCommand not pinned by hash: docker/Dockerfile:31-33","Warn: pipCommand not pinned by hash: .github/workflows/coverage.yml:22","Warn: pipCommand not pinned by hash: .github/workflows/coverage.yml:23","Warn: pipCommand not pinned by hash: .github/workflows/coverage.yml:24","Warn: pipCommand not pinned by hash: .github/workflows/mypy.yml:22","Warn: pipCommand not pinned by hash: .github/workflows/mypy.yml:23","Warn: pipCommand not pinned by hash: .github/workflows/mypy.yml:24","Warn: pipCommand not pinned by hash: .github/workflows/mypy.yml:25","Warn: pipCommand not pinned by hash: .github/workflows/tests.yml:48","Warn: pipCommand not pinned by hash: .github/workflows/tests.yml:49","Warn: pipCommand not pinned by hash: .github/workflows/tests.yml:50","Info:   0 out of   7 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   6 third-party GitHubAction dependencies pinned","Info:   0 out of   2 containerImage dependencies pinned","Info:   0 out of   1 downloadThenRun dependencies pinned","Info:   0 out of  12 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/publish_docker_image.yml:9"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 1 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T10:36:00.417Z","repository_id":34209964,"created_at":"2025-08-19T10:36:00.417Z","updated_at":"2025-08-19T10:36:00.417Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28662945,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cron","cron-jobs","devops","django","monitoring","ops"],"created_at":"2024-07-30T20:01:13.248Z","updated_at":"2026-01-22T12:08:36.071Z","avatar_url":"https://github.com/healthchecks.png","language":"Python","funding_links":["https://github.com/sponsors/healthchecks"],"categories":["Python","Projects","Observability \u0026 Monitoring","Monitoring and observability ![](https://img.shields.io/badge/_-MONITORING-F46800?style=flat-square\u0026logo=grafana\u0026logoColor=white)","\u003ca id=\"tag-dev\" href=\"#tag-dev\"\u003eDev\u003c/a\u003e","置顶","📦 Modules/Packages","Apps","monitoring","Others","Python（165）","django","📊 System Monitoring","devops","Table of Contents"],"sub_categories":["Open Source Projects","Privacy front-ends and search","\u003ca id=\"tag-dev.ops\" href=\"#tag-dev.ops\"\u003eOps\u003c/a\u003e","05、运维监控体系",":curly_loop: Typography","Monitoring","📊 Repository Statistics","Automation"],"readme":"# Healthchecks\n\n[![Tests](https://github.com/healthchecks/healthchecks/actions/workflows/tests.yml/badge.svg)](https://github.com/healthchecks/healthchecks/actions/workflows/tests.yml)\n[![Coverage Status](https://coveralls.io/repos/healthchecks/healthchecks/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/healthchecks/healthchecks?branch=master)\n\nHealthchecks is a cron job monitoring service. It listens for HTTP requests\nand email messages (\"pings\") from your cron jobs and scheduled tasks (\"checks\").\nWhen a ping does not arrive on time, Healthchecks sends out alerts.\n\nHealthchecks comes with a web dashboard, API, 25+ integrations for\ndelivering notifications, monthly email reports, WebAuthn 2FA support,\nteam management features: projects, team members, read-only access.\n\nThe building blocks are:\n\n* Python 3.12+\n* Django 6.0\n* PostgreSQL, MySQL or MariaDB\n\nHealthchecks is licensed under the BSD 3-clause license.\n\nHealthchecks is available as a hosted service\nat [https://healthchecks.io/](https://healthchecks.io/).\n\nA [Dockerfile](https://github.com/healthchecks/healthchecks/tree/master/docker)\nand [pre-built Docker images](https://hub.docker.com/r/healthchecks/healthchecks) are\navailable.\n\nScreenshots:\n\nThe \"My Checks\" screen. Shows the status of all your cron jobs\nin a live-updating dashboard.\n\n![Screenshot of My Checks page](/static/img/my_checks.png?raw=true \"My Checks Page\")\n\nEach check has configurable Period and Grace Time parameters. Period is the expected\ntime between pings. Grace Time specifies how long to wait before sending out alerts\nwhen a job is running late.\n\n![Screenshot of Period/Grace dialog](/static/img/period_grace.png?raw=true \"Period/Grace Dialog\")\n\nAlternatively, you can define the expected schedules using a cron expressions.\nHealthchecks uses the [cronsim](https://github.com/cuu508/cronsim) library to\nparse and evaluate cron expressions.\n\n![Screenshot of Cron dialog](/static/img/cron.png?raw=true \"Cron Dialog\")\n\nCheck details page, with a live-updating event log.\n\n![Screenshot of Check Details page](/static/img/check_details.png?raw=true \"Check Details Page\")\n\nHealthchecks provides status badges with public but hard-to-guess URLs.\nYou can use them in your READMEs, dashboards, or status pages.\n\n![Screenshot of Badges page](/static/img/badges.png?raw=true \"Status Badges\")\n\n\n## Setting Up for Development\n\nIf you are planning to developing Healthchecks, please read\n[CONTRIBUTING.md](https://github.com/healthchecks/healthchecks/tree/master/CONTRIBUTING.md).\n\nTo set up Healthchecks development environment:\n\n* Install dependencies (Debian/Ubuntu):\n\n  ```sh\n  sudo apt update\n  sudo apt install -y gcc python3-dev python3-venv libpq-dev libcurl4-openssl-dev libssl-dev\n  ```\n\n* Prepare directory for project code and virtualenv. Feel free to use a\n  different location:\n\n  ```sh\n  mkdir -p ~/webapps\n  cd ~/webapps\n  ```\n\n* Prepare virtual environment\n  (with virtualenv you get pip, we'll use it soon to install requirements):\n\n  ```sh\n  python3 -m venv .venv\n  source .venv/bin/activate\n  pip3 install wheel # make sure wheel is installed in the venv\n  ```\n\n* Check out project code:\n\n  ```sh\n  git clone https://github.com/healthchecks/healthchecks.git\n  ```\n\n* Install requirements (Django, ...) into virtualenv:\n\n  ```sh\n  pip install -r healthchecks/requirements.txt -r healthchecks/requirements-dev.txt\n  ```\n\n* macOS only - pycurl needs to be reinstalled using the following method (assumes OpenSSL was installed using brew):\n\n  ```sh\n  export PYCURL_VERSION=`cat requirements.txt | grep pycurl | cut -d '=' -f3`\n  export OPENSSL_LOCATION=`brew --prefix openssl`\n  export PYCURL_SSL_LIBRARY=openssl\n  export LDFLAGS=-L$OPENSSL_LOCATION/lib\n  export CPPFLAGS=-I$OPENSSL_LOCATION/include\n  pip uninstall -y pycurl\n  pip install pycurl==$PYCURL_VERSION --compile --no-cache-dir\n  ```\n\n* Create database tables and a superuser account:\n\n  ```sh\n  cd ~/webapps/healthchecks\n  ./manage.py migrate\n  ./manage.py createsuperuser\n  ```\n\n  With the default configuration, Healthchecks stores data in a SQLite file\n  `hc.sqlite` in the checkout directory (`~/webapps/healthchecks`).\n\n* Run tests:\n\n  ```sh\n  ./manage.py test\n  ```\n\n* Run development server:\n\n  ```sh\n  ./manage.py runserver\n  ```\n\nThe site should now be running at `http://localhost:8000`.\nTo access Django administration site, log in as a superuser, then\nvisit `http://localhost:8000/admin/`\n\n## Configuration\n\nHealthchecks reads configuration from environment variables. See the\n[full list of configuration parameters](https://healthchecks.io/docs/self_hosted_configuration/)\nyou can set via environment variables.\n\nIn addition, Healthchecks reads settings from the `hc/local_settings.py` file if it\nexists. You can set or override any [standard Django setting](https://docs.djangoproject.com/en/5.1/ref/settings/)\nin this file. You can copy the provided `hc/local_settings.py.example` as\n`hc/local_settings.py` and use it as a starting point.\n\nIf a setting is specified both as environment variable and in `hc/local_settings.py`,\nthe latter takes precedence.\n\n## Accessing Administration Panel\n\nHealthchecks comes with Django's administration panel where you can perform\nadministrative tasks: delete user accounts, change passwords, increase limits for\nspecific users, inspect contents of database tables.\n\nTo access the administration panel,\n\n * if you haven't already, create a superuser account: `./manage.py createsuperuser`\n * log into the site using superuser credentials\n * in the top navigation, \"Account\" dropdown, select \"Site Administration\"\n\n\n## Sending Emails\n\nHealthchecks must be able to send email messages, so it can send out login\nlinks and alerts to users. Specify your SMTP credentials using the following\nenvironment variables:\n\n- Implicit TLS (*recommended*):\n    ```python\n    DEFAULT_FROM_EMAIL = \"valid-sender-address@example.org\"\n    EMAIL_HOST = \"your-smtp-server-here.com\"\n    EMAIL_PORT = 465\n    EMAIL_HOST_USER = \"smtp-username\"\n    EMAIL_HOST_PASSWORD = \"smtp-password\"\n    EMAIL_USE_TLS = False\n    EMAIL_USE_SSL = True\n    ```\n\n    Port 465 should be the preferred method according to [RFC8314 Section 3.3: Implicit TLS for SMTP Submission](https://tools.ietf.org/html/rfc8314#section-3.3). Be sure to use a TLS certificate and not an SSL one.\n\n- Explicit TLS:\n    ```python\n    DEFAULT_FROM_EMAIL = \"valid-sender-address@example.org\"\n    EMAIL_HOST = \"your-smtp-server-here.com\"\n    EMAIL_PORT = 587\n    EMAIL_HOST_USER = \"smtp-username\"\n    EMAIL_HOST_PASSWORD = \"smtp-password\"\n    EMAIL_USE_TLS = True\n    ```\n\nFor more information, have a look at Django documentation,\n[Sending Email](https://docs.djangoproject.com/en/4.2/topics/email/) section.\n\n## Receiving Emails\n\nHealthchecks comes with a `smtpd` management command, which starts up a\nSMTP listener service. With the command running, you can ping your\nchecks by sending email messages\nto `your-uuid-here@my-monitoring-project.com` email addresses.\n\nStart the SMTP listener on port 2525:\n\n```sh\n./manage.py smtpd --port 2525\n```\n\nSend a test email:\n\n```sh\ncurl --url 'smtp://127.0.0.1:2525' \\\n    --mail-from 'foo@example.org' \\\n    --mail-rcpt '11111111-1111-1111-1111-111111111111@my-monitoring-project.com' \\\n    -F '='\n```\n\n## Sending Alerts and Reports\n\nHealthchecks comes with a `sendalerts` management command, which continuously\npolls database for any checks changing state, and sends out notifications as\nneeded. Within an activated virtualenv, you can manually run\nthe `sendalerts` command like so:\n\n```sh\n./manage.py sendalerts\n```\n\nIn a production setup, you will want to run this command from a process\nmanager like systemd or [supervisor](http://supervisord.org/).\n\nHealthchecks also comes with a `sendreports` management command which\nsends out monthly reports, weekly reports, and the daily or hourly reminders.\n\nRun `sendreports` without arguments to run any due reports and reminders\nand then exit:\n\n```sh\n./manage.py sendreports\n```\n\nRun it with the `--loop` argument to make it run continuously:\n\n```sh\n./manage.py sendreports --loop\n```\n\n## Database Cleanup\n\nHealthchecks deletes old entries from `api_ping`, `api_flip`, and `api_notification`\ntables automatically. By default, Healthchecks keeps the 100 most recent\npings for every check. You can set the limit higher to keep a longer history:\ngo to the Administration Panel, look up user's **Profile** and modify its\n\"Ping log limit\" field.\n\nHealthchecks also provides management commands for cleaning up\n`auth_user` (user accounts) and `api_tokenbucket` (rate limiting records) tables,\nand for removing stale objects from external object storage.\n\n* Remove user accounts that are older than 1 month and have never logged in:\n\n  ```sh\n  ./manage.py pruneusers\n  ```\n\n* Remove old records from the `api_tokenbucket` table. The TokenBucket\n  model is used for rate-limiting login attempts and similar operations.\n  Any records older than one day can be safely removed.\n\n  ```sh\n  ./manage.py prunetokenbucket\n  ```\n\n* Remove old objects from external object storage. When an user removes\n  a check, removes a project, or closes their account, Healthchecks\n  does not remove the associated objects from the external object\n  storage on the fly. Instead, you should run `pruneobjects` occasionally\n  (for example, once a month). This command first takes an inventory\n  of all checks in the database, and then iterates over top-level\n  keys in the object storage bucket, and deletes any that don't also\n  exist in the database.\n\n  ```sh\n  ./manage.py pruneobjects\n  ```\n\nWhen you first try these commands on your data, it is a good idea to\ntest them on a copy of your database, not on the live database right away.\nIn a production setup, you should also have regular, automated database\nbackups set up.\n\n## Two-factor Authentication\n\nHealthchecks optionally supports two-factor authentication using the WebAuthn\nstandard. To enable WebAuthn support, set the `RP_ID` (relying party identifier )\nsetting to a non-null value. Set its value to your site's domain without scheme\nand without port. For example, if your site runs on `https://my-hc.example.org`,\nset `RP_ID` to `my-hc.example.org`.\n\n## External Authentication\n\nHealthchecks supports external authentication by means of HTTP headers set by\nreverse proxies or the WSGI server. This allows you to integrate it into your\nexisting authentication system (e.g., LDAP or OAuth) via an authenticating proxy.\nWhen this option is enabled, **healthchecks will trust the header's value implicitly**,\nso it is **very important** to ensure that attackers cannot set the value themselves\n(and thus impersonate any user). How to do this varies by your chosen proxy,\nbut generally involves configuring it to strip out headers that normalize to the\nsame name as the chosen identity header.\n\nTo enable this feature, set the `REMOTE_USER_HEADER` value to a header you wish to\nauthenticate with. HTTP headers will be prefixed with `HTTP_` and have any dashes\nconverted to underscores. Headers without that prefix can be set by the WSGI server\nitself only, which is more secure.\n\nWhen `REMOTE_USER_HEADER` is set, Healthchecks will:\n - assume the header contains user's email address\n - look up and automatically log in the user with a matching email address\n - automatically create an user account if it does not exist\n - disable the default authentication methods (login link to email, password)\n\nThe header name in `REMOTE_USER_HEADER` must be specified in upper-case,\nwith any dashes replaced with underscores, and prefixed with `HTTP_`. For\nexample, if your authentication proxy sets a `X-Authenticated-User` request\nheader, you should set `REMOTE_USER_HEADER=HTTP_X_AUTHENTICATED_USER`.\n\n**Note on using `local_settings.py`:**\nWhen Healthchecks reads settings from environment variables and encounters\nthe `REMOTE_USER_HEADER` environment variable, it sets *two* settings,\n`REMOTE_USER_HEADER` and `AUTHENTICATION_BACKENDS`. This logic has already run by the\ntime Healthchecks reads `local_settings.py`. Therefore, if you configure Healthchecks\nusing the `local_settings.py` file instead of environment variables, and specify\n`REMOTE_USER_HEADER` there, you will also need a line which sets the other setting,\n`AUTHENTICATION_BACKENDS`:\n\n```\nREMOTE_USER_HEADER = \"HTTP_X_AUTHENTICATED_USER\"\nAUTHENTICATION_BACKENDS = [\"hc.accounts.backends.CustomHeaderBackend\"]\n```\n\n## External Object Storage\n\nHealthchecks can optionally store large ping bodies in S3-compatible object\nstorage. To enable this feature, you will need to:\n\n* ensure you have the [MinIO Python library](https://docs.min.io/docs/python-client-quickstart-guide.html) installed:\n\n  ```bash\n  pip install minio\n  ```\n* configure the credentials for accessing object storage: `S3_ACCESS_KEY`,\n  `S3_SECRET_KEY`, `S3_ENDPOINT`, `S3_REGION` and `S3_BUCKET`.\n\nHealthchecks will use external object storage for storing any request bodies that\nexceed 100 bytes. If the size of a request body is 100 bytes or below, Healthchecks\nwill still store it in the database.\n\nHealthchecks automatically removes old stored ping bodies from object\nstorage while uploading new data. However, Healthchecks does not automatically\nclean up data when you delete checks, projects or entire user accounts.\nUse the `pruneobjects` management command to remove data for checks that don't\nexist any more.\n\nWhen external object storage is not enabled (the credentials for accessing object\nstorage are not set), Healthchecks stores all ping bodies in the database.\nIf you enable external object storage, Healthchecks will still be able to\naccess the ping bodies already stored in the database. You don't need to migrate\nthem to the object storage. On the other hand, if you later decide to disable\nexternal object storage, Healthchecks will not have access to the externally\nstored ping bodies any more. And there is currently no script or management command\nfor migrating ping bodies from external object storage back to the database.\n\n## Integrations\n\n### Slack\n\nHealthchecks supports two Slack integration setup flows: legacy and app-based.\n\nThe legacy flow does not require additional configuration and is used by default.\nIn this flow the user creates an incoming webhook URL on the Slack side, and\npastes the webhook URL in a form on the Healthchecks side.\n\nIn the app-based flow the user clicks an \"Add to Slack\" button in Healthchecks,\nand gets transferred to a Slack-hosted dialog where they select the channel to\npost notifications to. This flow uses OAuth2 behind the scenes. To enable this\nflow, you will need to set up a Slack OAuth2 app:\n\n* Create a new Slack app on https://api.slack.com/apps/\n* Add at least one scope in the permissions section to be able to deploy the app in\n  your workspace (By example `incoming-webhook` for the `Bot Token Scopes`).\n* Add a _redirect url_ in the format `SITE_ROOT/integrations/add_slack_btn/`.\n  For example, if your SITE_ROOT is `https://my-hc.example.org` then the redirect URL\n  would be `https://my-hc.example.org/integrations/add_slack_btn/`.\n* Look up your Slack app for the Client ID and Client Secret. Put them\n  in `SLACK_CLIENT_ID` and `SLACK_CLIENT_SECRET` environment\n  variables. Once these variables are set, Healthchecks will switch from using\n  the legacy flow to using the app-based flow.\n\nThe legacy and app-based flows only affect the user experience during the initial\nsetup of Slack integrations. The contents of notifications posted to Slack are the same\nregardless of the setup flow used.\n\n### Discord\n\nTo enable Discord integration, you will need to:\n\n* register a new application on https://discord.com/developers/applications/me\n* add a redirect URI to your Discord application. The URI format is\n  `SITE_ROOT/integrations/add_discord/`. For example, if you are running a\n  development server on `localhost:8000` then the redirect URI would be\n  `http://localhost:8000/integrations/add_discord/`\n* Look up your Discord app's Client ID and Client Secret. Put them\n  in `DISCORD_CLIENT_ID` and `DISCORD_CLIENT_SECRET` environment\n  variables.\n\n\n### Pushover\n\nPushover integration works by creating an application on Pushover.net which\nis then subscribed to by Healthchecks users. The registration workflow is as follows:\n\n* On Healthchecks, the user adds a \"Pushover\" integration to a project\n* Healthchecks redirects user's browser to a Pushover.net subscription page\n* User approves adding the Healthchecks subscription to their Pushover account\n* Pushover.net HTTP redirects back to Healthchecks with a subscription token\n* Healthchecks saves the subscription token and uses it for sending Pushover\n  notifications\n\nTo enable the Pushover integration, you will need to:\n\n* Register a new application on Pushover via https://pushover.net/apps/build.\n* Within the Pushover 'application' configuration, enable subscriptions.\n  Make sure the subscription type is set to \"URL\". Also make sure the redirect\n  URL is configured to point back to the root of the Healthchecks instance\n  (e.g., `http://healthchecks.example.com/`).\n* Put the Pushover application API Token and the Pushover subscription URL in\n  `PUSHOVER_API_TOKEN` and `PUSHOVER_SUBSCRIPTION_URL` environment\n  variables. The Pushover subscription URL should look similar to\n  `https://pushover.net/subscribe/yourAppName-randomAlphaNumericData`.\n\n### Signal\n\nHealthchecks uses [signal-cli](https://github.com/AsamK/signal-cli) to send Signal\nnotifications. Healthcecks interacts with signal-cli over UNIX or TCP socket.\nHealthchecks requires signal-cli version 0.11.2 or later.\n\nTo enable the Signal integration via UNIX socket:\n\n* Set up and configure signal-cli to expose JSON RPC on an UNIX socket\n  ([instructions](https://github.com/AsamK/signal-cli/wiki/JSON-RPC-service)).\n  Example: `signal-cli -a +xxxxxx daemon --socket /tmp/signal-cli-socket`\n* Put the socket's location in the `SIGNAL_CLI_SOCKET` environment variable.\n\nTo enable the Signal integration via TCP socket:\n\n* Set up and configure signal-cli to expose JSON RPC on a TCP socket.\n  Example: `signal-cli -a +xxxxxx daemon --tcp 127.0.0.1:7583`\n* Put the socket's hostname and port in the `SIGNAL_CLI_SOCKET` environment variable\n  using \"hostname:port\" syntax, example: `127.0.0.1:7583`.\n\n\n### Telegram\n\n* Create a Telegram bot by talking to the\n[BotFather](https://core.telegram.org/bots#6-botfather). Set the bot's name,\ndescription, user picture, and add a \"/start\" command. To avoid user confusion,\nplease do not use the Healthchecks.io logo as your bot's user picture, use\nyour own logo.\n* After creating the bot you will have the bot's name and token. Put them\nin `TELEGRAM_BOT_NAME` and `TELEGRAM_TOKEN` environment variables.\n* Run `settelegramwebhook` management command. This command tells Telegram\nwhere to forward channel messages by invoking Telegram's\n[setWebhook](https://core.telegram.org/bots/api#setwebhook) API call:\n\n    ```sh\n    ./manage.py settelegramwebhook\n    Done, Telegram's webhook set to: https://my-monitoring-project.com/integrations/telegram/bot/\n    ```\n\nFor this to work, your `SITE_ROOT` must be correct and must use the \"https://\"\nscheme.\n\n### Apprise\n\nTo enable Apprise integration, you will need to:\n\n* ensure you have apprise installed in your local environment:\n\n  ```bash\n  pip install apprise\n  ```\n* enable the apprise functionality by setting the `APPRISE_ENABLED` environment variable.\n\n### Shell Commands\n\nThe \"Shell Commands\" integration runs user-defined local shell commands when checks\ngo up or down. This integration is disabled by default, and can be enabled by setting\nthe `SHELL_ENABLED` environment variable to `True`.\n\nNote: be careful when using \"Shell Commands\" integration, and only enable it when\nyou fully trust the users of your Healthchecks instance. The commands will be executed\nby the `manage.py sendalerts` process, and will run with the same system permissions as\nthe `sendalerts` process.\n\n### Matrix\n\nTo enable the Matrix integration you will need to:\n\n* Register a bot user (for posting notifications) in your preferred homeserver.\n* Use the [Login API call](https://www.matrix.org/docs/guides/client-server-api#login)\n  to retrieve bot user's access token. You can run it as shown in the documentation,\n  using curl in command shell.\n* Set the `MATRIX_` environment variables. Example:\n\n```\nMATRIX_HOMESERVER=https://matrix.org\nMATRIX_USER_ID=@mychecks:matrix.org\nMATRIX_ACCESS_TOKEN=[a long string of characters returned by the login call]\n```\n\n### PagerDuty Simple Install Flow\n\nTo enable PagerDuty [Simple Install Flow](https://developer.pagerduty.com/docs/app-integration-development/events-integration/),\n\n* Register a PagerDuty app at [PagerDuty](https://pagerduty.com/) › Developer Mode › My Apps\n* In the newly created app, add the \"Events Integration\" functionality\n* Specify a Redirect URL: `https://your-domain.com/integrations/add_pagerduty/`\n* Copy the displayed app_id value (PXXXXX) and put it in the `PD_APP_ID` environment\n  variable\n\n## Running in Production\n\nHere is a non-exhaustive list of pointers and things to check before launching a Healthchecks instance\nin production.\n\n* Environment variables, settings.py and local_settings.py.\n  * [DEBUG](https://docs.djangoproject.com/en/4.2/ref/settings/#debug). Make sure it is\n    set to `False`.\n  * [ALLOWED_HOSTS](https://docs.djangoproject.com/en/4.2/ref/settings/#allowed-hosts).\n    Make sure it contains the correct domain name you want to use.\n  * Server Errors. When DEBUG=False, Django will not show detailed error pages, and\n    will not print exception tracebacks to standard output. To receive exception\n    tracebacks in email, review and edit the\n    [ADMINS](https://docs.djangoproject.com/en/4.2/ref/settings/#admins) and\n    [SERVER_EMAIL](https://docs.djangoproject.com/en/4.2/ref/settings/#server-email)\n    settings. Consider setting up exception logging with [Sentry](https://sentry.io/for/django/).\n* Management commands that need to be run during each version upgrade.\n  * `manage.py compress` – creates combined JS and CSS bundles and\n     places them in the `static-collected` directory.\n  * `manage.py collectstatic` – collects static files in the `static-collected`\n     directory.\n  * `manage.py migrate` – applies any pending database schema changes\n     and data migrations.\n* Processes that need to be running constantly.\n  * `manage.py runserver` is intended for development only.\n     **Do not use it in production**, instead consider using\n     [uWSGI](https://uwsgi-docs.readthedocs.io/en/latest/) or\n     [gunicorn](https://gunicorn.org/).\n     An example of a minimal setup would be to install uWSGI using `pip3 install uwsgi`,\n     and to run `uwsgi --http :8000 --module hc.wsgi` from the project's root directory.\n  *  `manage.py sendalerts` is the process that monitors checks and sends out\n     monitoring alerts. It must be always running, it must be started on reboot, and it\n     must be restarted if it itself crashes. On modern linux systems, a good option is\n     to [define a systemd service](https://github.com/healthchecks/healthchecks/issues/273#issuecomment-520560304)\n     for it.\n* Static files. Healthchecks serves static files on its own, no configuration\n  required. It uses the [Whitenoise library](http://whitenoise.evans.io/en/stable/index.html)\n  for this.\n* General\n  * Make sure the database is secured well and is getting backed up regularly\n  * Make sure the TLS certificates are secured well and are getting refreshed regularly\n  * Have monitoring in place to be sure the Healthchecks instance itself is operational\n    (is accepting pings, is sending out alerts, is not running out of resources).\n\n## Docker Image\n\nHealthchecks provides a reference Dockerfile and prebuilt Docker images for every\nrelease. The Dockerfile lives in the [/docker/](https://github.com/healthchecks/healthchecks/tree/master/docker)\ndirectory, and Docker images for amd64, arm/v7 and arm64 architectures are available\n[on Docker Hub](https://hub.docker.com/r/healthchecks/healthchecks).\n\nThe Docker images:\n\n* Use uWSGI as the web server. uWSGI is configured to perform database migrations\n  on startup, and to run `sendalerts`, `sendreports`, and `smtpd` in the background.\n  You do not need to run them separately.\n* Ship with both PostgreSQL and MySQL database drivers.\n* Serve static files using the whitenoise library.\n* Have the apprise library preinstalled.\n* Do *not* handle TLS termination. In a production setup, you will want to put\n  the Healthchecks container behind a reverse proxy or load balancer that handles TLS\n  termination.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhealthchecks%2Fhealthchecks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhealthchecks%2Fhealthchecks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhealthchecks%2Fhealthchecks/lists"}