{"id":17117739,"url":"https://github.com/anderspitman/stealthcheck","last_synced_at":"2025-08-12T09:04:13.503Z","repository":{"id":81835969,"uuid":"263175836","full_name":"anderspitman/stealthcheck","owner":"anderspitman","description":"0-dependency service health checks/restarts/email alerts in 150 lines of Go","archived":false,"fork":false,"pushed_at":"2021-07-28T18:35:11.000Z","size":9,"stargazers_count":19,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-04T13:58:02.501Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anderspitman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2020-05-11T22:47:38.000Z","updated_at":"2024-05-29T20:23:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"a9d7cb30-be83-4771-9bf9-9d0b9c63740b","html_url":"https://github.com/anderspitman/stealthcheck","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/anderspitman/stealthcheck","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anderspitman%2Fstealthcheck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anderspitman%2Fstealthcheck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anderspitman%2Fstealthcheck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anderspitman%2Fstealthcheck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anderspitman","download_url":"https://codeload.github.com/anderspitman/stealthcheck/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anderspitman%2Fstealthcheck/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270032623,"owners_count":24515322,"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","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"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":[],"created_at":"2024-10-14T17:52:35.959Z","updated_at":"2025-08-12T09:04:13.450Z","avatar_url":"https://github.com/anderspitman.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"stealthcheck is a dead-simple service monitoring tool in \u003c150 lines of code\nwith no dependencies other than Go. It's so simple you probably should write\nyour own instead of using it.\n\nIt provides an easy way to set up health checks, automatic restarts, and email\nalerts for failed checks. It also has basic logging.\n\nEverything is based off shell commands shoved into a json config file. For each\nservice, you run a check command at a given interval. If the command returns\nanything other than 0, run the fail command.\n\n\n# Who watches the watchers?\n\nFor redundancy, simply set up 2 or more stealthcheck instances with commands to\ncheck and restart each other. To facilitate this, HTTP requests to stealthcheck\nreturn an empty response with 200 status.\n\n\n# Example configs\n\nNote that if a list of alert emails is specified for a specific check, none of\nthe alert email addresses in the main config will be alerted.\n\n## Main config\n\n```json\n{\n  \"alert_emails\": [\n    \"alice@example.com\",\n    \"bob@example.com\"\n  ],\n  \"smtp\": {\n    \"server\": \"smtp.fastmail.com\",\n    \"port\": 587,\n    \"sender\": \"someone@example.com\",\n    \"username\": \"someone@example.com\",\n    \"password\": \"************\"\n  }\n}\n```\n\n## checks.json\n\nstealthcheck instance 1:\n```json\n{\n  \"checks\": [\n    {\n      \"interval_ms\": 10000,\n      \"check_command\": \"curl localhost:8486\",\n      \"fail_command\": \"../stealthcheck -port 8486 -dir ../stealth2 \u003e\u003e ../stealth2/log.txt 2\u003e\u00261 \u0026\",\n      \"alert_emails\": [\n        \"someone@example.com\"\n      ]\n    },\n    {\n      \"interval_ms\": 120000,\n      \"check_command\": \"curl service1.example.com\",\n      \"fail_command\": \"ssh ubuntu@example.com ./service1\"\n    },\n    {\n      \"interval_ms\": 120000,\n      \"check_command\": \"./custom_checker_script.sh\",\n      \"fail_command\": \"ssh ubuntu@example.com ./service2\"\n    }\n  ]\n}\n```\n\nstealthcheck instance 2\n```json\n{\n  \"checks\": [\n    {\n      \"interval_ms\": 10000,\n      \"check_command\": \"curl localhost:8485\",\n      \"fail_command\": \"../stealthcheck -port 8485 -dir ../stealth1 \u003e\u003e ../stealth1/log.txt 2\u003e\u00261 \u0026\",\n      \"alert_emails\": [\n        \"someone@example.com\",\n        \"someone_else@example.com\"\n      ]\n    }\n  ]\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanderspitman%2Fstealthcheck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanderspitman%2Fstealthcheck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanderspitman%2Fstealthcheck/lists"}