{"id":13564396,"url":"https://github.com/dimo414/task-mon","last_synced_at":"2025-03-21T14:31:32.234Z","repository":{"id":57669316,"uuid":"333026879","full_name":"dimo414/task-mon","owner":"dimo414","description":"CLI to execute commands and log results to healthchecks.io","archived":false,"fork":false,"pushed_at":"2023-10-11T06:58:31.000Z","size":67,"stargazers_count":26,"open_issues_count":4,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-28T07:35:24.010Z","etag":null,"topics":["cli","cron","healthcheck","healthchecks","healthchecksio","heartbeat","monitoring"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/task-mon","language":"Rust","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/dimo414.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2021-01-26T08:59:30.000Z","updated_at":"2024-11-12T01:20:51.000Z","dependencies_parsed_at":"2023-11-09T13:04:07.439Z","dependency_job_id":"b198ceae-7290-44e2-8735-326c1a1cded2","html_url":"https://github.com/dimo414/task-mon","commit_stats":{"total_commits":21,"total_committers":1,"mean_commits":21.0,"dds":0.0,"last_synced_commit":"27eecf5ed93639c5cbdf7e978a5b1f919f5f5042"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimo414%2Ftask-mon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimo414%2Ftask-mon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimo414%2Ftask-mon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimo414%2Ftask-mon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dimo414","download_url":"https://codeload.github.com/dimo414/task-mon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244141470,"owners_count":20404837,"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":["cli","cron","healthcheck","healthchecks","healthchecksio","heartbeat","monitoring"],"created_at":"2024-08-01T13:01:30.660Z","updated_at":"2025-03-21T14:31:31.945Z","avatar_url":"https://github.com/dimo414.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# Task Monitoring with Healthchecks.io\n\n[![github](https://img.shields.io/badge/github-dimo414/task--mon-green?logo=github)](https://github.com/dimo414/task-mon)\n[![crates.io](https://img.shields.io/crates/v/task-mon.svg?logo=rust)](https://crates.io/crates/task-mon)\n[![build status](https://img.shields.io/github/actions/workflow/status/dimo414/task-mon/rust.yml?branch=master)](https://github.com/dimo414/task-mon/actions)\n[![issues](https://img.shields.io/github/issues/dimo414/task-mon)](https://github.com/dimo414/task-mon/issues)\n[![license](https://img.shields.io/github/license/dimo414/task-mon)](https://github.com/dimo414/task-mon/blob/master/LICENSE)\n\n\n`task-mon` is a small binary for notifying Healthchecks.io when a command runs.\n\nThis serves a similar purpose to the `curl`-based patterns described in the Healthchecks\ndocumentation but provides more flexibility and ergonomics. Especially for shell scripts and\n[cron jobs](https://healthchecks.io/docs/monitoring_cron_jobs/), delegating health management to a\nseparate binary allows you to focus on the task at hand.\n\nIt supports Healthchecks' advanced optional features such as\n[reporting failures](https://healthchecks.io/docs/signaling_failures/),\n[attaching logs](https://healthchecks.io/docs/attaching_logs/), and\n[monitoring execution time](https://healthchecks.io/docs/measuring_script_run_time/).\n\n## Usage\n\nTo execute a task and ping Healthchecks.io when it completes simply invoke `task-mon` with the\ncheck's UUID and the command to run:\n\n```shell\n$ task-mon --uuid 1234-abcd -- some_command --to --monitor\n```\n\n```shell\n$ task-mon --ping-key abcd1234 --slug foo -- some_command --to --monitor\n```\n\n```shell\n$ crontab -e\n# m h dom mon dow command\n  8 6 * * * /usr/local/cargo/bin/task-mon --uuid 1234-abcd -- some_command --to --monitor\n```\n\n`task-mon` will run the command and ping Healthchecks.io when it completes, reporting the exit\nstatus and the last 10K of output from the process.\n\n### Customization\n\n```shell\n$ task-mon --help\ntask-mon 0.3.0\nCLI to execute commands and log results to healthchecks.io\n\nUSAGE:\n    task-mon [OPTIONS] \u003c--uuid \u003cUUID\u003e|--slug \u003cSLUG\u003e\u003e [--] \u003cCOMMAND\u003e...\n\nARGS:\n    \u003cCOMMAND\u003e...    The command to run\n\nOPTIONS:\n    -k, --uuid \u003cUUID\u003e                Check's UUID to ping\n    -s, --slug \u003cSLUG\u003e                Check's slug name to ping, requires also specifying --ping-key\n        --ping-key \u003cPING_KEY\u003e        Check's project ping key, required when using --slug [env:\n                                     HEALTHCHECKS_PING_KEY=]\n    -t, --time                       Ping when the program starts as well as completes\n        --head                       POST the first 10k bytes instead of the last\n        --ping-only                  Don't POST any output from the command\n        --log                        Log the invocation without signalling success or failure; does\n                                     not update the check's status\n        --detailed                   Include execution details in the information POST-ed (by\n                                     default just sends stdout/err\n        --env                        Also POSTs the process environment; requires --detailed\n        --verbose                    Write debugging details to stderr\n        --user-agent \u003cUSER_AGENT\u003e    Customize the user-agent string sent to the Healthchecks.io\n                                     server\n        --base-url \u003cBASE_URL\u003e        Base URL of the Healthchecks.io server to ping [env:\n                                     HEALTHCHECKS_BASE_URL=] [default: https://hc-ping.com]\n    -h, --help                       Print help information\n    -V, --version                    Print version information\n```\n\n## Related projects\n\nThere are of course a number of similar projects out there, but I was bored and didn't want to use\nany of them...\n\n* [Runitor](https://github.com/bdd/runitor) - linked from the\n  [Healthchecks docs](https://healthchecks.io/docs/attaching_logs/)\n* [healthchecks-rs](https://github.com/msfjarvis/healthchecks-rs) - Rust library and CLI for pinging and\n  monitoring Healthchecks\n* [hchk](https://github.com/healthchecks/hchk) - older CLI written by the Healthchecks.io maintainer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimo414%2Ftask-mon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdimo414%2Ftask-mon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimo414%2Ftask-mon/lists"}