{"id":20432927,"url":"https://github.com/cdzombak/heartbeat","last_synced_at":"2025-10-09T03:38:51.787Z","repository":{"id":207203342,"uuid":"718634978","full_name":"cdzombak/heartbeat","owner":"cdzombak","description":"Simple HTTP heartbeat implementation for Golang","archived":false,"fork":false,"pushed_at":"2024-08-15T02:18:09.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-15T18:42:19.512Z","etag":null,"topics":["heartbeat","uptime-kuma"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/cdzombak/heartbeat","language":"Go","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/cdzombak.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-14T13:48:47.000Z","updated_at":"2024-08-15T02:05:52.000Z","dependencies_parsed_at":"2023-11-14T16:32:10.062Z","dependency_job_id":"51d56c5f-e984-4255-8041-b4ca591d4b5c","html_url":"https://github.com/cdzombak/heartbeat","commit_stats":null,"previous_names":["cdzombak/heartbeat"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdzombak%2Fheartbeat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdzombak%2Fheartbeat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdzombak%2Fheartbeat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdzombak%2Fheartbeat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cdzombak","download_url":"https://codeload.github.com/cdzombak/heartbeat/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241975558,"owners_count":20051492,"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":["heartbeat","uptime-kuma"],"created_at":"2024-11-15T08:17:12.107Z","updated_at":"2025-10-09T03:38:46.765Z","avatar_url":"https://github.com/cdzombak.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `github.com/cdzombak/heartbeat`\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/cdzombak/heartbeat.svg)](https://pkg.go.dev/github.com/cdzombak/heartbeat)\n\nSimple HTTP heartbeat \u0026 health server implementation for Golang. This implementation works particularly well with [Uptime Kuma](https://github.com/louislam/uptime-kuma)'s push monitors.\n\n## Installation\n\n```shell\ngo get github.com/cdzombak/heartbeat\n```\n\n## Usage\n\nCreate and start a Heartbeat client:\n\n```go\nhb, err = NewHeartbeat(\u0026HeartbeatConfig{\n    HeartbeatInterval: 30 * time.Second,\n    LivenessThreshold: 60 * time.Second,\n    HeartbeatURL:      \"https://uptimekuma.example.com:9001/api/push/1234abcd?status=up\u0026msg=OK\u0026ping=\",\n\tPort:              8888,\n    OnError: func(err error) {\n        log.Printf(\"heartbeat error: %s\", err)\n    },\n})\nif err != nil {\n    panic(err)\n}\n\n// other program setup might go here\n\nhb.Start()\n```\n\nThen, in your program's main loop/ticker/event handler, call `Alive` periodically to indicate that everything's working:\n\n```go\nhb.Alive(time.Now())\n```\n\n## License\n\nMIT; see `LICENSE` in this repository.\n\n## Author\n\n- Chris Dzombak ([dzombak.com](https://www.dzombak.com))\n    - [GitHub @cdzombak](https://www.github.com/cdzombak)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdzombak%2Fheartbeat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcdzombak%2Fheartbeat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdzombak%2Fheartbeat/lists"}