{"id":21423295,"url":"https://github.com/watchdogcloud/canario-sdk","last_synced_at":"2025-06-23T19:35:55.743Z","repository":{"id":248899967,"uuid":"825190819","full_name":"watchdogcloud/canario-sdk","owner":"watchdogcloud","description":"watchdog go-sdk for metric collection and export","archived":false,"fork":false,"pushed_at":"2024-07-20T08:12:49.000Z","size":5369,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-09-15T08:52:58.534Z","etag":null,"topics":["golang","sdk"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/watchdogcloud.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":"2024-07-07T04:18:53.000Z","updated_at":"2024-08-31T14:36:48.000Z","dependencies_parsed_at":"2024-07-20T09:27:59.819Z","dependency_job_id":"402e922d-9003-4f63-9e07-d4bd84d0e2d7","html_url":"https://github.com/watchdogcloud/canario-sdk","commit_stats":null,"previous_names":["watchdogcloud/canario"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/watchdogcloud%2Fcanario-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/watchdogcloud%2Fcanario-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/watchdogcloud%2Fcanario-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/watchdogcloud%2Fcanario-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/watchdogcloud","download_url":"https://codeload.github.com/watchdogcloud/canario-sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225964911,"owners_count":17552426,"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":["golang","sdk"],"created_at":"2024-11-22T21:15:50.925Z","updated_at":"2024-11-22T21:15:52.066Z","avatar_url":"https://github.com/watchdogcloud.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align='center'\u003e\n\n# Watchdog - Canario SDK\n\n\u003c/div\u003e\n\n\u003cdiv align='center'\u003e \n\u003cimg src=\".github/logo.png\" alt=\"canario.png\" width='150'\u003e\u003c/img\u003e\n\u003c/div\u003e\n\nThe Canario SDK is a Go SDK designed for easy metric collection and export. It is a part of `watchdogcloud` and is heavily dependent on a configuration and management server - Terrier (watch \u003ca href=\"https://github.com/watchdogcloud/terrier\"\u003ethis\u003c/a\u003e) that helps watchdog to send critical alerts to stakeholders when the hardware goes wrong.\n\nInternally, it uses `github.com/shirou/gopsutil` to expose the OS and hardware level details with metrics like disk, CPU, and memory.\n\nIn batches, these metrics are then pushed to the Terrier management server that processes these metrics, to be precise - stores them in persistent storage (MongoDB), streams realtime metrics to client apps, and constantly computes over these datapoints to calculate if there is a Spike trigger or a Cumulative trigger.\n\n### Spike Triggers\nThese are triggers that detect sudden and significant changes in the metric values, indicating potential issues that need immediate attention.\n\n### Cumulative Triggers\nThese triggers detect gradual changes in metric values over time, indicating potential issues that may arise if the trend continues.\n\nCurrent work involves making a nice console for watchdog so that the dirty configuration changes need not be done via touching the code. It's in progress and will hopefully be out soon.\n\n```bash\ngo get github.com/watchdogcloud/canario\n```\n\n## Configuration File (`canario.yml`)\n```yaml\n# canario.yml\nversion: 0.8.1\n\napi:\n  baseuri: 'http://localhost:3030' \n  key: '1bf42e28aa0ac838e47aabac10a4439567b289460bb784e57fc8304baf9ff095'\n\nmetrics:\n  cpu:\n    enabled: true\n  memory:\n    enabled: true\n  disk:\n    enabled: true\n  network:\n    enabled: true\n\nmonitoring:\n  interval_seconds: 1\n  retention_hours: 24\n```\n\n## Configuration Attributes\n\n|Attribute                     | Description  |\n|------------------------------|--------------|\n| `version` |The version of the Canario SDK. Ensure this matches with your installed version. |\n| `api.baseuri` | The base URI of the terrier management server. |\n| `api.key` | The API key used for authenticating requests to the terrier management server. |\n| `metrics.cpu.enabled` | Enable or disable CPU metrics collection. |\n| `metrics.memory.enabled` | Enable or disable Memory metrics collection. |\n| `metrics.disk.enabled` | Enable or disable Disk metrics collection. |\n|`metrics.network.enabled` | Enable or disable Network metrics collection. |\n\n\u003e [!NOTE]\n\u003e You can opt-in for the metrics you want to measure.\n\n\n\u003e [!CAUTION]\n\u003e Start the metric collection by invoking this in a different goroutine!Please don't invoke in the main thread, as the function is blocking and will not allow your application logic to run if you place it above. It is strongly advised to run it in a different goroutine.\n\nFor updates, documentation, and community support, visit the [Canario GitHub repository](https://github.com/watchdogcloud/canario). \n\nEnjoy monitoring with Canario! 🐕","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwatchdogcloud%2Fcanario-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwatchdogcloud%2Fcanario-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwatchdogcloud%2Fcanario-sdk/lists"}