mirror of
https://github.com/shizunge/endlessh-go.git
synced 2026-08-07 07:15:02 +00:00
readme update for healthcheck
This commit is contained in:
@@ -58,6 +58,12 @@ Usage of ./endlessh-go
|
||||
Enable prometheus
|
||||
-geoip_supplier string
|
||||
Supplier to obtain Geohash of IPs. Possible values are "off", "ip-api", "max-mind-db" (default "off")
|
||||
-healthcheck
|
||||
GET healthcheck_host:healthcheck_port/health and exit 1 if status is not ok or timeout is exceeded (for container healthcheck)
|
||||
-healthcheck_host string
|
||||
The address for container healthcheck (default "127.0.0.1")
|
||||
-healthcheck_port string
|
||||
HTTP port for container healthcheck; serves JSON with status and uptime at /health (default "51000")
|
||||
-host string
|
||||
SSH listening address (default "0.0.0.0")
|
||||
-interval_ms int
|
||||
@@ -121,6 +127,23 @@ The endlessh-go server stores the geohash of attackers as a label on `endlessh_c
|
||||
|
||||
You could also use an offline GeoIP database from [MaxMind](https://www.maxmind.com) by setting `-geoip_supplier` to _max-mind-db_ and `-max_mind_db` to the path of the database file.
|
||||
|
||||
## Healthcheck
|
||||
|
||||
The endlessh-go server exposes an HTTP health endpoint while the server is running. By default it listens on `127.0.0.1:51000` at `/health` and returns a JSON like this:
|
||||
|
||||
```json
|
||||
{
|
||||
"status": "ok",
|
||||
"uptime": 123.456789012
|
||||
}
|
||||
```
|
||||
|
||||
`status` is always "ok".
|
||||
|
||||
`uptime` is the number of seconds since the server started. The host and port can be changed via `-healthcheck_host` and `-healthcheck_port`.
|
||||
|
||||
The [docker image](https://hub.docker.com/r/shizunge/endlessh-go) includes a built-in `HEALTHCHECK` that runs every 30 seconds.
|
||||
|
||||
## Dashboard
|
||||
|
||||
The dashboard requires Grafana 8.2.
|
||||
|
||||
Reference in New Issue
Block a user