{"id":18053305,"url":"https://github.com/luzifer/webcheck","last_synced_at":"2025-04-10T19:42:55.001Z","repository":{"id":66477889,"uuid":"142013953","full_name":"Luzifer/webcheck","owner":"Luzifer","description":"webcheck is a CLI tool to check the health of a web page","archived":false,"fork":false,"pushed_at":"2024-07-16T13:12:40.000Z","size":1048,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T17:21:21.092Z","etag":null,"topics":["check","golang","health","http","web"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Luzifer.png","metadata":{"files":{"readme":"README.md","changelog":"History.md","contributing":null,"funding":null,"license":"LICENSE","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},"funding":{"custom":["https://www.paypal.me/luzifer"],"github":["Luzifer"],"ko_fi":"luziferus"}},"created_at":"2018-07-23T12:52:55.000Z","updated_at":"2024-07-16T13:12:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"9d5b2d1e-ce96-4f5d-a297-5c0e3395d0b7","html_url":"https://github.com/Luzifer/webcheck","commit_stats":{"total_commits":18,"total_committers":1,"mean_commits":18.0,"dds":0.0,"last_synced_commit":"019b23873b76d8ade09ac5494df67f30c0c81c2e"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luzifer%2Fwebcheck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luzifer%2Fwebcheck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luzifer%2Fwebcheck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luzifer%2Fwebcheck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Luzifer","download_url":"https://codeload.github.com/Luzifer/webcheck/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248281420,"owners_count":21077423,"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":["check","golang","health","http","web"],"created_at":"2024-10-30T23:16:46.050Z","updated_at":"2025-04-10T19:42:54.971Z","avatar_url":"https://github.com/Luzifer.png","language":"Go","readme":"![](https://badges.fyi/github/license/Luzifer/webcheck)\n![](https://badges.fyi/github/downloads/Luzifer/webcheck)\n![](https://badges.fyi/github/latest-release/Luzifer/webcheck)\n\n# Luzifer / webcheck\n\n`webcheck` is a CLI tool to check the health of a web page. It was written because there are quite a lot of GUI tools or services to monitor websites but I did not find any tool to execute on the CLI to to an ad-hoc monitoring of a page. To fix this I wrote this tool.\n\n`webcheck` is used to check:\n\n- HTTP status code 2xx\n- Regular expression match on the response body\n- Response within a certain timeout\n- Response times (only display, no checking)\n\nIf the request is marked as a `FAIL` all headers and the response body are written into a log file to be debugged manually. This can for example be helpful if your webserver delivers weird responses on certain requests and you are using `webcheck` to find them.\n\n## Installation\n\nYou either can download a pre-compiled binary for you system from the [Releases](https://github.com/Luzifer/webcheck/releases) section of this repository or if you do have a working Go environment you can just `go install github.com/Luzifer/webcheck@latest` the tool.\n\n## Usage\n\n```console\n$ webcheck --help\nUsage of webcheck:\n  -i, --interval duration        Check interval (default 1s)\n  -l, --log-dir string           Directory to log non-matched requests to (default \"/tmp/resp-log/\")\n      --log-level string         Log level (debug, info, warn, error, fatal) (default \"info\")\n      --log-retention duration   When to clean up file from log-dir (default 24h0m0s)\n  -m, --match string             RegExp to match the response body against to validate it (default \".*\")\n      --no-log                   Disable response body logging\n  -t, --timeout duration         Timeout for the request (default 30s)\n  -u, --url string               URL to query\n      --version                  Prints current version and exits\n```\n\n### Example\n\n```console\n$ webcheck -u https://bfa1c797.eu.ngrok.io/monitoring.txt -m healthy\n\n[Mon, 23 Jul 2018 16:07:02 CEST] (OKAY) Status was 200 and text matched (13.331ms/14.229ms/115.599ms)\n[Mon, 23 Jul 2018 16:07:16 CEST] (FAIL) Response body does not match regexp (13.314ms/14.229ms/15.316ms) (Resp: request-log/request827008143)\n[Mon, 23 Jul 2018 16:07:21 CEST] (OKAY) Status was 200 and text matched (13.411ms/14.436ms/18.25ms)\n[Mon, 23 Jul 2018 16:07:28 CEST] (FAIL) Status code was != 2xx: 404 (6.923ms/7.011ms/7.237ms) (Resp: request-log/request070057634)\n\n$ cat request-log/request827008143\nAccept-Ranges: bytes\nContent-Length: 4\nContent-Type: text/plain; charset=utf-8\nDate: Mon, 23 Jul 2018 14:07:16 GMT\nLast-Modified: Mon, 23 Jul 2018 14:07:15 GMT\n\nfoo\n```\n","funding_links":["https://www.paypal.me/luzifer","https://github.com/sponsors/Luzifer","https://ko-fi.com/luziferus"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluzifer%2Fwebcheck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluzifer%2Fwebcheck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluzifer%2Fwebcheck/lists"}