{"id":13700916,"url":"https://github.com/ssimunic/gossm","last_synced_at":"2025-05-04T19:33:49.833Z","repository":{"id":48158493,"uuid":"100070063","full_name":"ssimunic/gossm","owner":"ssimunic","description":"Server status monitor written in Go","archived":false,"fork":false,"pushed_at":"2020-08-31T23:19:58.000Z","size":55,"stargazers_count":167,"open_issues_count":0,"forks_count":30,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-08-03T20:10:34.635Z","etag":null,"topics":["server-monitor","server-status"],"latest_commit_sha":null,"homepage":null,"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/ssimunic.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":"2017-08-11T21:04:40.000Z","updated_at":"2024-03-26T07:33:07.000Z","dependencies_parsed_at":"2022-08-28T14:20:56.432Z","dependency_job_id":null,"html_url":"https://github.com/ssimunic/gossm","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/ssimunic%2Fgossm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssimunic%2Fgossm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssimunic%2Fgossm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssimunic%2Fgossm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ssimunic","download_url":"https://codeload.github.com/ssimunic/gossm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224406065,"owners_count":17305718,"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":["server-monitor","server-status"],"created_at":"2024-08-02T20:01:08.248Z","updated_at":"2024-11-13T06:31:35.088Z","avatar_url":"https://github.com/ssimunic.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# gossm\nServer status monitor written in Go\n\n## Overview\n\ngossm performs checks if servers can be reached every *t* seconds and notifies when unsuccessful\n\n### Web Interface\n\n![Dashboard HTTP server](https://i.imgur.com/IkdmQ4k.png)\n\n## Instruction\n\n### Build and run\n\nRun from terminal:\n\n```bash\ngo get github.com/ssimunic/gossm/cmd/gossm\ngo build github.com/ssimunic/gossm/cmd/gossm\n./gossm -config configs/myconfig.json\n```\n\nThis will build and run program with configuration file `configs/myconfig.json`.\n\n### Command line arguments\n\nFollowing arguments are available:\n\n`config` configuration file path (default \"configs/default.json\")\n\n`log` log file path (default \"logs/current-date.log\")\n\n`http` address for http server (default \":8080\")\n\n`logfilter` text to filter log by (both console and file)\n\n`nolog` presence of this argument will disable logging to file only\n\nExample: `./gossm -config configs/myconfig.json -logfilter tcp -http :1337`. Web interface will be available at `localhost:1337`.\n\n\nYou can also use `./gossm -help` for help.\n\n## Docker\n\nAn example Dockerfile is located in the project root. Currently there is no offical build on Docker Hub, but that can be addressed if more people show interest.\n\n### docker-compose\n\nAn example docker-compose is also found in our project root.\n\n```yaml\nversion: \"2\"\n\nservices:\n  gossm:\n    build: ./\n    ports:\n      - \"8067:8080\"\n    volumes:\n      - ./configs:/configs\n      - ./logs:/var/log/gossum\n```\n\nGetting started with `docker-compose` is as simple as having Docker and Docker Compose installed on your machine, and typing:\n\n```bash\ndocker-compose build\ndocker-compose up\n```\n\nPlease note that the example config found at `configs/default.json` is invalid JSON, so we will need to fix that before bringing up the container.\n\n## Configuration\n\nJSON structure is used for configuration. Example can be found in `configs/default.json`.\n\n```json\n{\n    \"settings\": {\n        \"notifications\": {\n            \"email\": [\n                {\n                    \"smtp\": \"smtp.gmail.com\",\n                    \"port\": 587,\n                    \"username\": \"silvio.simunic@gmail.com\",\n                    \"password\": \"...\",\n                    \"from\": \"silvio.simunic@gmail.com\",\n                    \"to\": [\n                        \"silvio.simunic@gmail.com\"\n                    ]\n                }\n            ],\n            \"telegram\": [\n                {\n                    \"botToken\": \"123456:ABC-DEF1234...\",\n                    \"chatId\": \"12341234\"\n                }\n            ],\n            \"slack\": [\n                {\n                    \"bearerToken\": \"bearerToken\",\n                    \"channelId\": \"channelId\"\n                }\n            ],\n            \"pushover\": [\n                {\n                    \"userKey\": \"user_key\",\n                    \"appToken\": \"app_token\"\n                }\n            ],\n            \"webhook\": [\n                {\n                    \"url\": \"url\",\n                    \"method\": \"GET\"\n                }\n            ],\n            \"sms\": [\n                {\n                    \"sms\": \"todo\"\n                }\n            ]\n        },\n        \"monitor\": {\n            \"checkInterval\": 15,\n            \"timeout\": 5,\n            \"maxConnections\": 50,\n            \"exponentialBackoffSeconds\": 5\n        }\n    },\n    \"servers\": [\n        {\n            \"name\":\"Local Webserver 1\",\n            \"ipAddress\":\"192.168.20.168\",\n            \"port\": 80,\n            \"protocol\": \"tcp\",\n            \"checkInterval\": 5,\n            \"timeout\": 5\n        },\n        {\n            \"name\":\"Test server 1\",\n            \"ipAddress\":\"162.243.10.151\",\n            \"port\": 80,\n            \"protocol\": \"tcp\",\n            \"checkInterval\": 5,\n            \"timeout\": 5\n        },\n        {\n            \"name\":\"Test server 2\",\n            \"ipAddress\":\"162.243.10.151\",\n            \"port\": 8080,\n            \"protocol\": \"tcp\",\n            \"checkInterval\": 5,\n            \"timeout\": 5\n        }\n    ]\n}\n```\n\n### Global\n\n`checkInterval` check interval for each server in seconds\n\n`timeout` check connection timeout in seconds\n\n`maxConnections` maximum concurrent connections \n\n`exponentialBackoffSeconds`\n\nAfter each notification, time until next notification is available is increased exponetially. On first unsuccessful server reach, notification will always be sent immediately. If, for example, `exponentialBackoffSeconds` is set to `5`, then next notifications will be available after 5, 25, 125... seconds. On successful server reach after downtime, this will be reset.  \n\n### Servers\n\n`name` server name for identification\n\n`ipAddress` server ip address\n\n`port` server port\n\n`protocol` network protocol (tcp, udp)\n\n`checkInterval`  check interval for each server in seconds (this will override global settings)\n\n`timeout` check connection timeout in seconds (this will override global settings)\n\n### Notifications\n\nThere can be multiple email or sms notification settings.\n\n#### Email\n\n`smtp` smtp server address\n\n`port` smtp server port\n\n`username` login email\n\n`password` login password\n\n`from` email that notifications will be sent from\n\n`to` array of recipients \n\n#### Telegram\n\n`botToken` Telegram Bot token obtained via the BotFather.\n\n`chatId` ChatID of the user to message (Can also be a group id).\n\n#### Slack\n\n`bearerToken` Bearer auth token for Slack app.\n\n`channelId` Slack channel ID.\n\n#### Pushover\n\n`appToken` your Pushover application's API token\n\n`userKey` the user/group key of your Pushover user\n\n#### Webhook\n\n`url` url to make request to\n\n`method` method to use (`GET` or `POST`)\n\nServer information will be stored in `server` parameter.\n\n#### SMS\n\nTODO\n\n## API\n\nJSON of current status is available at `/json` endpoint.\n\nExample is given below.\n\n```json\n{\n    \"tcp 162.243.10.151:80\": [\n        {\n            \"time\": \"2018-03-06T19:57:33.633712261+01:00\",\n            \"online\": true\n        }\n    ],\n    \"tcp 176.32.98.166:80\": [\n        {\n            \"time\": \"2018-03-06T19:57:33.650150286+01:00\",\n            \"online\": true\n        }\n    ]\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssimunic%2Fgossm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fssimunic%2Fgossm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssimunic%2Fgossm/lists"}