mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-30 18:24:03 +00:00
added proper notes and block highlighting (#69)
parent
a8e0792aca
commit
daea415e11
7 changed files with 20 additions and 16 deletions
13
API-Keys.md
13
API-Keys.md
|
@ -39,17 +39,17 @@ Authentication is done by passing the API key in the `Authorization`
|
||||||
header. For example, here is a request made with curl to the `metrics`
|
header. For example, here is a request made with curl to the `metrics`
|
||||||
endpoint.
|
endpoint.
|
||||||
|
|
||||||
```
|
```bash
|
||||||
curl -u":<key>" uptime.kuma/metrics
|
curl -u":<key>" uptime.kuma/metrics
|
||||||
```
|
```
|
||||||
|
|
||||||
Note, the `:` is required before the key as basic authentication
|
> [!NOTE]
|
||||||
requires a username and password separated by a `:`, however we don't
|
> `:` is required before the key, because basic authentication requires a username and password separated by a `:`.
|
||||||
make use of the username field.
|
> We don't make use of the username field.
|
||||||
|
|
||||||
Here is an example config for Prometheus:
|
Here is an example config for Prometheus:
|
||||||
|
|
||||||
```
|
```yml
|
||||||
- job_name: 'uptime'
|
- job_name: 'uptime'
|
||||||
scrape_interval: 30s
|
scrape_interval: 30s
|
||||||
scheme: http
|
scheme: http
|
||||||
|
@ -59,4 +59,5 @@ Here is an example config for Prometheus:
|
||||||
password: <api key>
|
password: <api key>
|
||||||
```
|
```
|
||||||
|
|
||||||
Note: we don't need to set a username field as it is not used.
|
> [!NOTE]
|
||||||
|
> Seting the username field is not nessesary, as it is unused.
|
||||||
|
|
|
@ -45,20 +45,20 @@ start_post() {
|
||||||
|
|
||||||
Set the script to executable.
|
Set the script to executable.
|
||||||
|
|
||||||
```sh
|
```bash
|
||||||
sudo chmod 755 /etc/init.d/uptime-kuma
|
sudo chmod 755 /etc/init.d/uptime-kuma
|
||||||
```
|
```
|
||||||
|
|
||||||
Create a user and group `uptime-kuma:uptime-kuma` for the service.
|
Create a user and group `uptime-kuma:uptime-kuma` for the service.
|
||||||
|
|
||||||
```sh
|
```bash
|
||||||
sudo addgroup -S uptime-kuma
|
sudo addgroup -S uptime-kuma
|
||||||
sudo adduser -S -D -h /var/lib/uptime-kuma -s /sbin/nologin -G uptime-kuma -g uptime-kuma uptime-kuma
|
sudo adduser -S -D -h /var/lib/uptime-kuma -s /sbin/nologin -G uptime-kuma -g uptime-kuma uptime-kuma
|
||||||
```
|
```
|
||||||
|
|
||||||
Start the service and add it to default runlevel if preferred.
|
Start the service and add it to default runlevel if preferred.
|
||||||
|
|
||||||
```sh
|
```bash
|
||||||
sudo rc-service uptime-kuma start
|
sudo rc-service uptime-kuma start
|
||||||
sudo rc-update add uptime-kuma
|
sudo rc-update add uptime-kuma
|
||||||
```
|
```
|
||||||
|
|
|
@ -16,7 +16,7 @@ Labels to filter by include:
|
||||||
|
|
||||||
Put the following into your Prometheus config:
|
Put the following into your Prometheus config:
|
||||||
|
|
||||||
```
|
```yml
|
||||||
- job_name: 'uptime'
|
- job_name: 'uptime'
|
||||||
scrape_interval: 30s
|
scrape_interval: 30s
|
||||||
scheme: http
|
scheme: http
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
## With Docker
|
## With Docker
|
||||||
|
|
||||||
```
|
```bash
|
||||||
docker exec -it <container name> bash
|
docker exec -it <container name> bash
|
||||||
npm run reset-password
|
npm run reset-password
|
||||||
```
|
```
|
||||||
|
|
|
@ -166,7 +166,7 @@ Link to https-portal Websocket under [Advanced Usage](https://github.com/SteveLT
|
||||||
|
|
||||||
Example docker-compose.yml file using Https-Portal:
|
Example docker-compose.yml file using Https-Portal:
|
||||||
|
|
||||||
```
|
```yml
|
||||||
version: '3.3'
|
version: '3.3'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
@ -224,7 +224,7 @@ docker run -d --restart=always -p 127.0.0.1:3002:3001 -v uptime-kuma:/app/data -
|
||||||
7. Click `Create` -> `Websockets`, this automatically fills in the required headers for websockets.
|
7. Click `Create` -> `Websockets`, this automatically fills in the required headers for websockets.
|
||||||
|
|
||||||
# Traefik
|
# Traefik
|
||||||
```
|
```yml
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.http.routers.uptime-kuma.rule=Host(`YourOwnHostname`)"
|
- "traefik.http.routers.uptime-kuma.rule=Host(`YourOwnHostname`)"
|
||||||
|
|
|
@ -17,13 +17,15 @@ Restart=on-failure
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
```
|
```
|
||||||
|
|
||||||
Note: This unit file assumes that you are running the software as a separate 'uptime' user. If you have node/npm installed in a different path, you will need to alter the ExecStart line to match this.
|
> [!NOTE]
|
||||||
|
> This unit file assumes that you are running the software as a separate 'uptime' user.
|
||||||
|
> If you have node/npm installed in a different path, you will need to alter the ExecStart line to match this.
|
||||||
|
|
||||||
This unit file may be installed to /etc/systemd/system/uptime-kuma.service (Or whatever service name you'd prefer)
|
This unit file may be installed to /etc/systemd/system/uptime-kuma.service (Or whatever service name you'd prefer)
|
||||||
|
|
||||||
Once installed, issue the following commands to reload systemd unit files, enable it to start on boot, and start it immediately:
|
Once installed, issue the following commands to reload systemd unit files, enable it to start on boot, and start it immediately:
|
||||||
|
|
||||||
```sh
|
```bash
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
systemctl enable --now uptime-kuma
|
systemctl enable --now uptime-kuma
|
||||||
```
|
```
|
|
@ -115,7 +115,8 @@ https://github.com/louislam/uptime-kuma/wiki/Reverse-Proxy
|
||||||
|
|
||||||
### ☸️ OpenShift 4 and Kubernetes Helm 3 Chart (Unofficial)
|
### ☸️ OpenShift 4 and Kubernetes Helm 3 Chart (Unofficial)
|
||||||
|
|
||||||
> Note: This Chart relies on a repackaged OCI Container Image, which lets *uptime-kuma* run as **non-root** user. \
|
> [!NOTE]
|
||||||
|
> This Chart relies on a repackaged OCI Container Image, which lets *uptime-kuma* run as **non-root** user.
|
||||||
> The entire repackage process is automated via GitHub Actions and renovate-bot keeps everything up to date. (feel free to audit it yourself)
|
> The entire repackage process is automated via GitHub Actions and renovate-bot keeps everything up to date. (feel free to audit it yourself)
|
||||||
|
|
||||||
The Containerfile used to rebundle *uptime-kuma*: [rootless Containerfile](https://github.com/k3rnelpan1c-dev/uptime-kuma-helm/blob/main/container/Containerfile)
|
The Containerfile used to rebundle *uptime-kuma*: [rootless Containerfile](https://github.com/k3rnelpan1c-dev/uptime-kuma-helm/blob/main/container/Containerfile)
|
||||||
|
|
Loading…
Reference in a new issue