Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ImSingee/swatchdog
https://github.com/ImSingee/swatchdog
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ImSingee/swatchdog
- Owner: ImSingee
- License: mit
- Created: 2023-09-13T03:03:03.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-04-28T03:29:09.000Z (9 months ago)
- Last Synced: 2024-04-28T07:00:24.105Z (9 months ago)
- Language: Rust
- Size: 11.7 KB
- Stars: 11
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# swatchdog - simple watchdog!
Just... Send an HTTP request per interval to a given URL. You can use any uptime monitoring service to monitor your machine.
## Download & Install
The latest version is available at [GitHub Releases](https://github.com/ImSingee/swatchdog/releases). It's just a single binary file, so you can download it and run it directly.
## Usage
Just as simple as... No need to explain anything! Just run it with `--help` to see the help message.
```
Usage: swatchdog [OPTIONS] --urlOptions:
-u, --url
--method [default: GET]
--interval [default: 60s]
--verbose
-h, --help Print help
-V, --version Print version
```The tool is tested with [uptime-kuma](https://github.com/louislam/uptime-kuma) and I personally recommend it.
## Configure
You may need to configure it to make it run as a service (start on boot).
**linux systemd service example**
```ini
[Unit]
Description=swatchdog[Service]
User=nobody
Group=nobody
ExecStart=/path/to/swatchdog -u http://example.com --interval 60s[Install]
WantedBy=multi-user.target
```(place it under `/lib/systemd/system/swatchdog.service` and run `systemctl enable swatchdog`)
**macos launchd service example**
```xml
Label
me.singee.swatchdog
ProgramArguments
/path/to/your/swatchdog
-u=http://example.com
--interval=60s
RunAtLoad
KeepAlive
StandardOutPath
/Users/USERNAME/.swatchdog.log
StandardErrorPath
/Users/USERNAME/.swatchdog.log
```
(place it under `~/Library/LaunchAgents/me.singee.swatchdog.plist` and run `launchctl load ~/Library/LaunchAgents/me.singee.swatchdog.plist`)
## License
MIT