Add examples for Grafana and alertmanager and fix documentation regarding DB_SQLITE_FILE and prometheus reverse proxy if scraped publicly #noissue
All checks were successful
/ build (push) Successful in 3m28s
All checks were successful
/ build (push) Successful in 3m28s
This commit is contained in:
parent
98ed0c877b
commit
d68033037a
3 changed files with 2251 additions and 1 deletions
19
README.md
19
README.md
|
@ -240,6 +240,24 @@ upda_webhooks 2
|
|||
upda_events 146
|
||||
```
|
||||
|
||||
There's an example [Grafana](https://grafana.com) dashboard in the `_doc/` folder.
|
||||
|
||||
[Alertmanager](https://prometheus.io/docs/alerting/latest/alertmanager/) could check for the following:
|
||||
|
||||
```yaml
|
||||
- name: update_checks
|
||||
rules:
|
||||
- alert: UpdatesAvailable
|
||||
expr: upda_updates == 0 and upda_updates_pending > 0
|
||||
for: 4w
|
||||
labels:
|
||||
severity: high
|
||||
class: update
|
||||
annotations:
|
||||
summary: "Updates available from upda for {{ $labels.job }}"
|
||||
description: "Updates available from upda for {{ $labels.job }}"
|
||||
```
|
||||
|
||||
## Deployment
|
||||
|
||||
### Native
|
||||
|
@ -332,3 +350,4 @@ After the release has been created, ensure to change the following settings for
|
|||
* Adapt `CHANGELOG.md` and add an _UNRELEASED_ section
|
||||
* Adapt `api.yaml`: `version` attribute must reflect the _next_ version number
|
||||
* Adapt `env: VERSION_*` in `.forgejo/workflows/release.yaml` to _next_ version number
|
||||
|
||||
|
|
|
@ -111,7 +111,7 @@ services:
|
|||
image: git.myservermanager.com/varakh/upda:latest
|
||||
environment:
|
||||
- TZ=Europe/Berlin
|
||||
- DB_FILE=/data/upda.db
|
||||
- DB_SQLITE_FILE=/data/upda.db
|
||||
- ADMIN_USER=admin
|
||||
- ADMIN_PASSWORD=changeit
|
||||
restart: unless-stopped
|
||||
|
@ -158,5 +158,13 @@ server {
|
|||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
# metrics
|
||||
location ~* ^/metrics {
|
||||
proxy_pass http://localhost:8080;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
2223
_doc/upda-grafana-dashboard.json
Normal file
2223
_doc/upda-grafana-dashboard.json
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue