{"id":14955922,"url":"https://github.com/wshihadeh/deep_health_check","last_synced_at":"2025-10-24T09:30:26.998Z","repository":{"id":36653976,"uuid":"229225531","full_name":"wshihadeh/deep_health_check","owner":"wshihadeh","description":"Health check middleware ","archived":false,"fork":false,"pushed_at":"2025-01-23T20:17:56.000Z","size":94,"stargazers_count":6,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-29T09:11:19.374Z","etag":null,"topics":["database","dependencies","health","healthcheck","http","middleware","rack","rails","ruby","tcp"],"latest_commit_sha":null,"homepage":"https://docs.shihadeh.dev","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wshihadeh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-20T08:43:56.000Z","updated_at":"2021-12-27T19:33:44.000Z","dependencies_parsed_at":"2024-09-22T00:01:26.060Z","dependency_job_id":null,"html_url":"https://github.com/wshihadeh/deep_health_check","commit_stats":{"total_commits":35,"total_committers":2,"mean_commits":17.5,"dds":0.4285714285714286,"last_synced_commit":"630f2aac20838d230090d0b42f585a917d6ed412"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wshihadeh%2Fdeep_health_check","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wshihadeh%2Fdeep_health_check/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wshihadeh%2Fdeep_health_check/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wshihadeh%2Fdeep_health_check/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wshihadeh","download_url":"https://codeload.github.com/wshihadeh/deep_health_check/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237944040,"owners_count":19391588,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["database","dependencies","health","healthcheck","http","middleware","rack","rails","ruby","tcp"],"created_at":"2024-09-24T13:12:00.926Z","updated_at":"2025-10-24T09:30:26.635Z","avatar_url":"https://github.com/wshihadeh.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DeepHealthCheck\n\n[![Gem Version](https://badge.fury.io/rb/deep_health_check.svg)](https://badge.fury.io/rb/deep_health_check)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](http://opensource.org/licenses/MIT)\n[![Build Status](https://travis-ci.org/wshihadeh/deep_health_check.svg?branch=master)](https://travis-ci.org/wshihadeh/deep_health_check)\n[![Depfu](https://badges.depfu.com/badges/b29d275b0743e77163a813ac51251be9/count.svg)](https://depfu.com/github/wshihadeh/deep_health_check?project_id=10389)\n![Codecov](https://img.shields.io/codecov/c/github/wshihadeh/deep_health_check)\n\n\nA simple Health status API\n\n# Getting Started\n\nInstall gem\n~~~sh\n # Gemfile\n gem 'deep_health_check'\n~~~\n\nAdd middleware before Rails::Rack::Logger to prevent false positive response\nif other middleware fails when database is down for example ActiveRecord::QueryCache\n\n~~~sh\n # config/application.rb\n config.middleware.insert_after \"Rails::Rack::Logger\", DeepHealthCheck::MiddlewareHealthCheck\n~~~\n\nOr for protecting all endpoits with hatauth \n\n~~~sh\n# config/application.rb\nconfig.middleware.use DeepHealthCheck::BasicAuthHealthCheck  do |username, password|\n  username == \"$USER\" \u0026\u0026 password == \"$PASS\"\nend\n~~~\n\n\n# Protect Health Check endpoints using htauth credentials.\nHealth check middleware expose the following endpoints\n  - /health\n  - /db_health\n  - /tcp_dependencies_health\n      + dependencies must follow the below format and can be coonfigured using envioronment varables such as:\n       ```sh\n       # TCP_DEPENDENCY_${00..99}=${ip_or_host}:${port}\n       TCP_DEPENDENCY_00=127.0.0.0:8080\n       ```\n  - /http_dependencies_health\n      + dependencies must be valid http url and can be coonfigured using envioronment varables such as:\n       ```sh\n       # HTTP_DEPENDENCY_${00..99}=${ip_or_host}:${port}\n       HTTP_DEPENDENCY_00=http://127.0.0.0:8080/health\n       ```\n\nSome of these endpoints provide information about the database and system status. By Default these endpoints are not protected and are accessible publicly. To reduce the security risk introduced by exposing these endpoints, We can protect them using htauth credentials. The following page provide all the necessary steps needed to achieve this task using nginx.\n\n[Nginx Configurations](NGINX.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwshihadeh%2Fdeep_health_check","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwshihadeh%2Fdeep_health_check","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwshihadeh%2Fdeep_health_check/lists"}