{"id":17572392,"url":"https://github.com/n0str/website-pinger","last_synced_at":"2025-03-29T15:12:47.196Z","repository":{"id":80608017,"uuid":"153787069","full_name":"n0str/website-pinger","owner":"n0str","description":"Async website uptime checker on Go","archived":false,"fork":false,"pushed_at":"2019-04-10T10:34:05.000Z","size":26,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-04T15:49:50.555Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/n0str.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-10-19T13:29:07.000Z","updated_at":"2018-12-10T06:51:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"0889f721-5a88-4e65-b5ee-c1fd5710adb9","html_url":"https://github.com/n0str/website-pinger","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n0str%2Fwebsite-pinger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n0str%2Fwebsite-pinger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n0str%2Fwebsite-pinger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n0str%2Fwebsite-pinger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/n0str","download_url":"https://codeload.github.com/n0str/website-pinger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246200323,"owners_count":20739566,"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":[],"created_at":"2024-10-21T19:04:33.754Z","updated_at":"2025-03-29T15:12:47.165Z","avatar_url":"https://github.com/n0str.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Website pinger\n\nA simple tool to monitor website uptime status with advanced rules set and various notification methods.\n\n# Installation\n\nClone Git repository and navigate to the source directory\n```\ngit clone https://github.com/n0str/website-pinger.git\ncd website_pinger\n```\n\n## Build executable\n\nBuild single executable\n```\ngo build -o pinger\n```\n\nYou can also build executable for Linux\n```\nGOOS=linux go build -o pinger\n```\n\n## Prepare directories\n* logs - directory for error logging\n* rules - databases with URL configuration parameters\n```\nmkdir logs\nmkdir rules\n```\n\n## Run\n\nRun server with default settings\n```\nchmod +x pinger\n./pinger\n```\n\n### Arguments\nCurrently support the following arguments\n\n|argument|default value|description\n|--|--|--\n|`--port`|`8080`|The server listening port\n|`--max_queue_size`|`100`|The maximum queue size\n|`--max_workers`|`5`|Number of workers\n\n# API\n\nYou can control settings with REST API.\n\n|URL|METHOD|description\n|--|--|--\n|`/api/set`|POST| Add and modify rules\n|`/api/get`|POST| Get rule by URL\n|`/api/list`|GET| Show all URLs\n|`/api/delete`|DELETE| Delete rule by URL\n|`/api/reload`|GET| Reload database without restart\n\n## Add and modify rules\n\n|Parameter|Type|description\n|--|--|--\n|`url`|`string`|URL\n|`status_code`|`integer`|Desired valid HTTP status code\n|`informer_type`|`integer`|Unique informer code _(see in the next section)_\n|`informer_payload`|`string`|Payload for informer\n\n### Example\n```\ncurl -X POST http://localhost:8080/api/set --data \"url=http://ifmo.su\u0026status_code=200\u0026informer_type=0\u0026informer_payload=code\"\n```\n\n### Informers\n\nCurrently we support only [CodeX Bot](https://ifmo.su/bot) informer. Notifications are made to Telegram according to the documentation: [https://github.com/codex-bot/Webhooks](https://github.com/codex-bot/Webhooks)\n\n|Informer code|name|description\n|--|--|--\n|`0`|`codex bot`|CodeX Bot Notifications\n\n## Get rule by URL\n\nGet information about the URL specified\n\n|Parameter|Type|description\n|--|--|--\n|`url`|`string`|URL\n\nResponse example\n```\n{\n\t\"Url\": \"https://ifmo.su\",\n\t\"DesiredStatusCode\": 200,\n\t\"InformerPayload\": {\n\t\t\"Type\": 0,\n\t\t\"Payload\": \"...\"\n\t}\n}\n```\n\n## Show all URLs\n\nShow URLs which are on monitoring\n\n|Parameter|Type|description\n|--|--|--\n|no params|\n\nResponse example\n```\n[\n\t\"https://hawk.so\",\n\t\"https://ifmo.su\"\n]\n```\n\n## Delete rule by URL\n\nDelete the specified URL from monitoring\n\n|Parameter|Type|description\n|--|--|--\n|`url`|`string`|URL\n\n## Reload database without restart\n\nReload rules from files in the `rules` directory. Can be useful if you update the settings manually.\n\n|Parameter|Type|description\n|--|--|--\n|no params|\n\n# Monitoring\n\nThe bot will send you notifications according to the informer. For example with CodeX Bot it will be like:\n\n![](https://capella.pics/eb1c22ae-2bbe-42ca-b170-d4f5274ae130.jpg)\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn0str%2Fwebsite-pinger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fn0str%2Fwebsite-pinger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn0str%2Fwebsite-pinger/lists"}