{"id":17002471,"url":"https://github.com/deadc0de6/checkah","last_synced_at":"2025-04-12T06:30:32.411Z","repository":{"id":49585038,"uuid":"399553561","full_name":"deadc0de6/checkah","owner":"deadc0de6","description":"agentless SSH system monitoring and alerting tool","archived":false,"fork":false,"pushed_at":"2025-04-04T08:28:02.000Z","size":92,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-04T09:23:21.174Z","etag":null,"topics":["agentless","alerting","golang","linux","monitoring","ssh"],"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/deadc0de6.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}},"created_at":"2021-08-24T17:38:12.000Z","updated_at":"2025-04-04T08:28:06.000Z","dependencies_parsed_at":"2022-09-12T23:21:44.565Z","dependency_job_id":null,"html_url":"https://github.com/deadc0de6/checkah","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deadc0de6%2Fcheckah","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deadc0de6%2Fcheckah/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deadc0de6%2Fcheckah/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deadc0de6%2Fcheckah/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deadc0de6","download_url":"https://codeload.github.com/deadc0de6/checkah/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248529114,"owners_count":21119448,"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":["agentless","alerting","golang","linux","monitoring","ssh"],"created_at":"2024-10-14T04:28:08.385Z","updated_at":"2025-04-12T06:30:32.366Z","avatar_url":"https://github.com/deadc0de6.png","language":"Go","funding_links":["https://ko-fi.com/deadc0de6"],"categories":[],"sub_categories":[],"readme":"# CHECKAH\n\n[![Tests Status](https://github.com/deadc0de6/checkah/workflows/tests/badge.svg)](https://github.com/deadc0de6/checkah/actions)\n[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](http://www.gnu.org/licenses/gpl-3.0)\n\n[![Donate](https://img.shields.io/badge/donate-KoFi-blue.svg)](https://ko-fi.com/deadc0de6)\n\n[checkah](https://github.com/deadc0de6/checkah) is an agentless SSH system monitoring and alerting tool.\n\nFeatures:\n\n* agentless\n* check over SSH (password, keyfile, agent)\n* config file based (yaml, json)\n* multiple alerts (webhooks, email, script, file, ...)\n* multiple checks (disk, memory, loadavg, process, opened ports, ...)\n\nYou need at least **golang 1.16**\n\nQuick start:\n```bash\ngo install -v github.com/deadc0de6/checkah/cmd/checkah@latest\ncheckah example --format=yaml --local \u003e /tmp/local.yaml\ncheckah check /tmp/local.yaml\n```\n\nOr pick a binary from the [latest release](https://github.com/deadc0de6/checkah/releases).\n\nOr use the Dockerfile (by changing `localhost.yaml` to the config you want to use):\n```bash\ndocker build -t checkah .\ndocker run -i checkah\n```\n\n# Build\n\n```bash\n## create a binary for your current host\nmake\n./bin/checkah --help\n\n## create all architecture binaries\nmake build-all\nls ./bin/\n```\n\n# Example\n\nLet's say you want to monitor the basic elements of your VPS.\n\nStart by creating a config file `configs/vps.yaml` and add a profile\nwith some basic checks (disk space, load average, sshd is running on port 22 and memory usage).\nAlso add two alerts in case some checks fail:\nappend alert to file `/tmp/alert.txt` and display a notification through `notify-send`\n```yaml\nprofiles:\n- name: profile1\n  checks:\n  - type: disk\n    options:\n      limit: \"80\"\n      mount: /\n  - type: loadavg\n    options:\n      load_15min: \"1\"\n  - type: uptime\n    options:\n      days: \"180\"\n  - type: process\n    options:\n      pattern: sshd\n  - type: memory\n    options:\n      limit_mem: \"90\"\n  - type: tcp\n    options:\n      port: \"22\"\n- alerts:\n  - type: file\n    options:\n      path: /tmp/alerts.txt\n  - type: command\n    options:\n      command: \"notify-send -u critical\"\n```\n\nThen add the host to check to the config file:\n```yaml\nhosts:\n- name: vps\n  host: 10.0.0.1\n  profiles:\n  - profile1\n```\n\nAnd finally call checkah with that config file:\n```bash\n./bin/checkah check configs/vps.yaml\n```\n\nThis example config file is available [here](/configs/vps.yaml).\n\n# Config\n\nA few config examples are available under the [configs directory](/configs).\nConfig file can be written in yaml or json.\n\nConfig examples can be generated using the `example` command directly:\n```bash\n## generate a generic example config in json\nbin/checkah example --format=json\n\n## generate a generic example config in yaml\nbin/checkah example --format=yaml\n\n## generate a localhost example config in json\nbin/checkah example --format=json --local\n\n## generate a localhost example config in yaml\nbin/checkah example --format=yaml --local\n```\n\nA config file is made of three main blocks:\n\n* **settings**\n* **hosts**\n* **profiles**\n\n*Note* that none of the blocks are mandatory. The config can be split across multiple files.\n\n## settings block\n\nGlobal settings\n\n* **hosts-parallel**: check hosts in parallel (optional, default `false`)\n* **checks-parallel**: run checks in parallel (optional, default `true`)\n* **global-alert**: an alert to trigger if any of the check fails (optional, see below for available alerts)\n  * *type*: the alert type\n  * *options* the alert options\n\n## hosts block\n\nA list of hosts to monitor\n\n* **name**: arbitrary name to identify this host\n* **host**: the host ip/domain\n* **port**: the SSH port (optional, default 22)\n* **user**: the SSH user (optional, default to the env variable `USER`)\n* **password**: the SSH password (optional)\n* **keyfile**: the SSH keyfile path (optional, default `~/.ssh/id_rsa`)\n* **timeout**: SSH connection timeout in seconds (optional, default \"3\")\n* **insecure**: disable known host checking if set to true (default `false`)\n* **profiles**: a list of profile to apply to this host\n* **disable**: a boolean indicating if the host is disabled (optional, default `false`)\n\nif the *host* value is either `127.0.0.1` or `localhost`, SSH is disabled\nand checks are run against localhost.\n\n## profiles block\n\nA list of profiles for monitoring hosts\n\n* **name**: arbitrary name to identify this profile\n* **extend**: list of other profiles to include in this one (optional)\n* **checks**: a list of checks (see below for the available checks)\n  * *type*: the check type\n  * *options*: the check options\n  * *disable*: a boolean indicating if this check is disabled (optional, default `false`)\n* **alerts**: a list of alerts (see below for the available alerts)\n  * *type*: the alert type\n  * *options* the alert options\n  * *disable*: a boolean indicating if this alert is disabled (optional, default `false`)\n\nThe following checks are available:\n\n* **disk**: check disk space used\n  * *mount*: mount point (optional, default to `/`)\n  * *limit*: if disk use percent crosses this value, an alert is triggered\n* **loadavg**: check load average\n  * *limit_1min*: if load average over 1 min crosses this value, an alert is triggered\n  * *limit_5min*: if load average over 5 min crosses this value, an alert is triggered\n  * *limit_15min*: if load average over 15 min crosses this value, an alert is triggered\n* **uptime**: check uptime\n  * *days*: if uptime is above this value, an alert is triggered\n* **memory**: check memory usage\n  * *limit_mem*: if memory use percent crosses this value, an alert is triggered\n* **process**: check if a process is running\n  * *pattern*: pattern to match process name\n  * *invert*: if value \"yes\", alert if process is present instead of absent (optional)\n* **script**: run a custom check script on remote\n  * *path*: the local path to the script\n* **tcp**: check a specific TCP port is opened\n  * *port*: TCP port to check\n* **command**: check the return code of a command run on remote\n  * *command*: the command\n  * *name*: command name for output description (optional)\n\nThe following alerts are available:\n\n* **file**: append to file\n  * *path*: file path\n  * *truncate*: a boolean indicating if file is truncated before logging (optional, default `false`)\n* **script**: call a script with the alert string as sole argument\n  * *path*: script path\n* **webhook**: call a webhook on new alert\n  * *url*: webhook url\n  * *header\u003cnum\u003e*: an header key (must start at `0`, optional)\n  * *value\u003cnum\u003e*: the corresponding value to *header\u003cnum\u003e* (optional)\n* **command**: execute a command on new alert\n  * *command*: command string to run\n* **email**: send an email on new alert\n  * *host*: SMTP server address\n  * *port*: SMTP server port\n  * *mailfrom*: from email address\n  * *mailto*: to email address\n  * *user*: plain auth username (optional)\n  * *password*: plain auth password (optional)\n\n# Testing\n\nTo run the test script, you need following dependencies:\n```bash\ngo get golang.org/x/lint/golint\ngo get honnef.co/go/tools/cmd/staticcheck\n./test.sh\n```\n\n# Thank you\n\nIf you like checkah, [buy me a coffee](https://ko-fi.com/deadc0de6).\n\n# License\n\nThis project is licensed under the terms of the GPLv3 license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeadc0de6%2Fcheckah","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeadc0de6%2Fcheckah","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeadc0de6%2Fcheckah/lists"}