https://github.com/infoslack/go-check-host
Learning Go - app to check host status
https://github.com/infoslack/go-check-host
example golang
Last synced: 27 days ago
JSON representation
Learning Go - app to check host status
- Host: GitHub
- URL: https://github.com/infoslack/go-check-host
- Owner: infoslack
- Created: 2017-11-15T19:41:42.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-11-15T19:50:27.000Z (about 8 years ago)
- Last Synced: 2025-01-23T04:28:15.543Z (about 1 year ago)
- Topics: example, golang
- Language: Go
- Homepage:
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
check status host
=================
Learning Go - This example checks host status
### Build & Run
```
$ go build monit.go
```
Save the address of the hosts you want to monitor in `hosts.txt` and run:
```
$ echo "https://infoslack.pro" >> hosts.txt
$ ./monit
Monitoring...
Check https://infoslack.com
https://infoslack.com OK
Check https://infoslack.pro
https://infoslack.pro OK
^C
```
Press `ctrl+c` to stop.
### Logs
Logs are stored in status.log
```
$ tail status.log
Nov 15 16:49:18 - https://infoslack.com - online: true
Nov 15 16:49:19 - https://infoslack.pro - online: true
Nov 15 16:49:23 - https://infoslack.com - online: true
Nov 15 16:49:23 - https://infoslack.pro - online: true
```