Compare commits

..
4 changed files with 41 additions and 0 deletions
+4
View File
@@ -107,3 +107,7 @@ DEFAULT_QUOTA="10 GB"
#HSTS_ENABLED=1
# Uncomment this line to add the `preload` part
#HSTS_PRELOAD=1
# Metrics
# COMPOSE_FILE="$COMPOSE_FILE:compose.metrics.yml"
# SECRET_METRICS_TOKEN_VERSION=v1 # length=32 charset=hex
+11
View File
@@ -129,6 +129,17 @@ To disable dashboard app (since it is so corporate):
- Configure a `defaultapp` in your `config.php` or use [apporder](https://apps.nextcloud.com/apps/apporder)
## Metrics
There is a [metrics exporter](https://github.com/xperimental/nextcloud-exporter) that can be run as sidecar container, also part of the nextcloud helm charts. Its configured via alloys label-based auto-discovery provided by the updated [monitoring-stack](https://git.coopcloud.tech/coop-cloud/monitoring-ng)
To enable, uncomment
```
COMPOSE_FILE="$COMPOSE_FILE:compose.metrics.yml"
SECRET_METRICS_TOKEN_VERSION=v1 # length=32 charset=hex
```
then generate the secret with abra and run
`abra app cmd <domain> app set_metrics_token`
## Upgrading Nextcloud
Upgrading Nextcloud can be a hair raising experiance. They
+4
View File
@@ -195,6 +195,10 @@ upgrade_mariadb() {
mariadb-upgrade -p`cat /run/secrets/db_root_password`
}
set_metrics_token() {
run_occ "config:app:set serverinfo token --value '$(cat /run/secrets/metrics_token)'"
}
# Checks whether this instance looks ready to update to the next Nextcloud
# major version.
#
+22
View File
@@ -0,0 +1,22 @@
version: "3.8"
services:
app:
secrets:
- metrics_token
metrics:
image: xperimental/nextcloud-exporter:0.9.0
environment:
- NEXTCLOUD_SERVER=https://$DOMAIN
- NEXTCLOUD_AUTH_TOKEN=@/run/secrets/metrics_token
secrets:
- metrics_token
networks:
- proxy
deploy:
labels:
- "prometheus.io/scrape=true"
- "prometheus.io/port=9205"
secrets:
metrics_token:
external: true
name: ${STACK_NAME}_metrics_token_${SECRET_METRICS_TOKEN_VERSION}