Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ImSingee/swatchdog


https://github.com/ImSingee/swatchdog

Last synced: 3 months ago
JSON representation

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] --url

Options:
-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