mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-09-14 18:45:54 +08:00
Merge ea4d66de78
into 0d16e8184a
This commit is contained in:
commit
7f102484ec
3 changed files with 79 additions and 1 deletions
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
"aio_services_v1": [
|
||||
{
|
||||
"container_name": "nextcloud-aio-nextcloud-exporter",
|
||||
"display_name": "Prometheus Nextcloud Exporter",
|
||||
"documentation": "https://github.com/nextcloud/all-in-one/tree/main/community-containers/nextcloud-exporter",
|
||||
"image": "ghcr.io/xperimental/nextcloud-exporter",
|
||||
"image_tag": "0.8.0",
|
||||
"internal_port": "9205",
|
||||
"restart": "unless-stopped",
|
||||
"ports": [
|
||||
{
|
||||
"ip_binding": "127.0.0.1",
|
||||
"port_number": "9205",
|
||||
"protocol": "tcp"
|
||||
}
|
||||
],
|
||||
"environment": [
|
||||
"TZ=%TIMEZONE%",
|
||||
"NEXTCLOUD_SERVER=https://%NC_DOMAIN%",
|
||||
"NEXTCLOUD_AUTH_TOKEN=%NEXTCLOUD_EXPORTER_TOKEN%",
|
||||
"NEXTCLOUD_LISTEN_ADDRESS=0.0.0.0:9205",
|
||||
"NEXTCLOUD_TIMEOUT=5s"
|
||||
],
|
||||
"secrets": [
|
||||
"NEXTCLOUD_EXPORTER_TOKEN"
|
||||
],
|
||||
"nextcloud_exec_commands": [
|
||||
"php /var/www/html/occ config:app:set serverinfo token --value %NEXTCLOUD_EXPORTER_TOKEN%"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
45
community-containers/nextcloud-exporter/readme.md
Normal file
45
community-containers/nextcloud-exporter/readme.md
Normal file
|
@ -0,0 +1,45 @@
|
|||
## Prometheus Nextcloud Exporter
|
||||
|
||||
A Prometheus exporter that collects metrics from your Nextcloud instance for monitoring and alerting.
|
||||
|
||||
### How to install
|
||||
|
||||
See the [Community Containers documentation](https://github.com/nextcloud/all-in-one/tree/main/community-containers#community-containers) for instructions on how to install this in your Nextcloud All-in-One setup.
|
||||
|
||||
### What it does
|
||||
- Monitors user activity, file counts, and storage usage
|
||||
- Tracks system health, database size, and app statistics
|
||||
- Exposes metrics on port `9205` for Prometheus to scrape
|
||||
- Uses Nextcloud's serverinfo API with secure token authentication
|
||||
|
||||
### Use cases
|
||||
- Monitor Nextcloud performance and capacity
|
||||
- Set up alerts for system issues or resource limits
|
||||
- Create dashboards showing usage trends and system health
|
||||
- Track active users and storage growth over time
|
||||
|
||||
### Prometheus Configuration
|
||||
Add this to your `prometheus.yml` to scrape the exporter:
|
||||
|
||||
```yaml
|
||||
scrape_configs:
|
||||
- job_name: 'nextcloud'
|
||||
scrape_interval: 90s
|
||||
static_configs:
|
||||
- targets: ['your-nextcloud-domain.com:9205']
|
||||
metrics_path: /metrics
|
||||
scheme: http
|
||||
```
|
||||
|
||||
Replace `your-nextcloud-domain.com` with your actual Nextcloud domain.
|
||||
|
||||
### Notes
|
||||
- Automatically configures the required serverinfo token for authentication between Nextcloud and the exporter.
|
||||
- Compatible with Grafana for visualization (dashboard ID `20716` available).
|
||||
- https://grafana.com/grafana/dashboards/20716-nextcloud/
|
||||
|
||||
### Repository
|
||||
https://github.com/xperimental/nextcloud-exporter
|
||||
|
||||
### Maintainer
|
||||
https://github.com/grotax
|
|
@ -81,7 +81,7 @@
|
|||
"properties": {
|
||||
"ip_binding": {
|
||||
"type": "string",
|
||||
"pattern": "^(%[A-Z_]+%)?$"
|
||||
"pattern": "^((%[A-Z_]+%)|127\\.0\\.0\\.1)?$"
|
||||
},
|
||||
"port_number": {
|
||||
"type": "string",
|
||||
|
|
Loading…
Add table
Reference in a new issue