Compare commits

...
Author SHA1 Message Date
fauno e5c3bdb1ca Merge branch 'renovate/grafana-monorepo' of https://git.coopcloud.tech/coop-cloud/monitoring-ng into monitoring.sutty.abyaya.la 2026-10-12 13:04:59 -03:00
fauno 66ac4c577c Merge branch 'renovate/grafana-alloy-1.x' of https://git.coopcloud.tech/coop-cloud/monitoring-ng into monitoring.sutty.abyaya.la 2026-10-12 13:02:41 -03:00
fauno ed286e2cee Merge branch 'renovate/prom-prometheus-3.x' of https://git.coopcloud.tech/coop-cloud/monitoring-ng into monitoring.sutty.abyaya.la 2026-10-12 13:00:49 -03:00
renovate-bot f980185f8f chore(deps): update prom/prometheus docker tag to v3.15.0 2026-10-12 03:16:46 +00:00
renovate-bot 0e711c86f5 chore(deps): update grafana/grafana docker tag to v13.2.3 2026-10-12 02:16:16 +00:00
renovate-bot 5028630b04 chore(deps): update grafana/alloy docker tag to v1.20.1 2026-10-12 01:16:59 +00:00
fauno b58e52873a chore: Configure Renovate (#11)
Reviewed-on: #11
2026-10-11 23:39:19 +00:00
fauno 1babe0c7e8 feat: smart monitoring (#25)
it requires a helper script on the host because swarm doesn't support privileged mode

Reviewed-on: #25
Reviewed-by: Danny Groenewegen <247+dannygroenewegen@noreply.git.coopcloud.tech>
Co-authored-by: f <f@sutty.nl>
2026-10-11 23:38:27 +00:00
fauno e0172eaed8 fix: monitoring-ng (#35)
Reviewed-on: #35
Reviewed-by: Danny Groenewegen <247+dannygroenewegen@noreply.git.coopcloud.tech>
Reviewed-by: moritz <98+moritz@noreply.git.coopcloud.tech>
Co-authored-by: f <f@sutty.nl>
2026-10-08 18:42:28 +00:00
fauno 335589ee0e fix: monitoring-ng 2026-10-05 12:46:00 -03:00
fauno 8fbd4c4e93 Merge branch 'main' into monitoring.sutty.abyaya.la 2026-10-01 13:48:48 -03:00
fauno 343aa55f75 feat: maintainers closes #33 2026-09-28 15:30:29 -03:00
fauno faaf18c74c Merge branch 'main' of https://git.coopcloud.tech/coop-cloud/monitoring-ng into monitoring.sutty.abyaya.la 2026-09-28 11:30:58 -03:00
fauno 69077eaefd fix: versiones 2026-09-25 12:08:50 -03:00
fauno b8baea9cfc Merge branch 'access-log' into monitoring.sutty.abyaya.la 2026-09-25 11:13:11 -03:00
fauno c92dd89b4c Merge branch 'smartctl' into monitoring.sutty.abyaya.la 2026-09-25 11:12:53 -03:00
fauno 8de8bc9008 Merge branch 'main' into monitoring.sutty.abyaya.la 2026-09-25 11:12:37 -03:00
fauno d7bb30d346 fix: logging is opt-in 2026-09-25 11:04:04 -03:00
Linus Gasser 6b72f2e1f6 Increase timeout for healthcheck 2026-09-25 09:20:48 +00:00
fauno 5a10a45ced fix: remove unused vars 2026-09-24 12:17:34 -03:00
fauno 9211b98cc1 fix: /dev is not needed 2026-09-24 12:11:59 -03:00
fauno f9820da529 feat: access log coop-cloud/traefik#126 2026-09-11 06:54:50 -03:00
fauno 48888a1fe9 fix: scrape once per hour 2026-09-11 06:49:19 -03:00
fauno b240c5273b feat: systemd timer 2026-09-11 06:49:19 -03:00
fauno 53e03e12a4 feat: smart monitoring 2026-09-11 06:49:19 -03:00
fauno be30a8a4fd Merge branch 'alloy' into monitoring.sutty.abyaya.la 2026-08-07 09:25:06 -03:00
fauno 627d988902 fix: upgrade to grafana 13.0.6 2026-08-07 09:24:53 -03:00
fauno 7043f3e1b1 Merge branch 'alloy' into monitoring.sutty.abyaya.la 2026-08-06 12:37:41 -03:00
fauno e75fa4487c fix: upgrade alloy to 1.18.1 2026-08-06 12:37:25 -03:00
fauno ac95f68b01 Merge branch 'alloy' into monitoring.sutty.abyaya.la 2026-08-04 10:49:27 -03:00
fauno 5f3f9c957c fix: upgrade to grafana 13.0.5 2026-08-04 10:48:47 -03:00
fauno 7818c89ad7 fix: provide access to containerd socket toolshed/abra#900 2026-07-31 13:57:43 -03:00
fauno 5dc27b4a0b Merge branch 'smartctl' into monitoring.sutty.abyaya.la 2026-07-31 13:45:04 -03:00
fauno 36ef86e8b7 feat: access log coop-cloud/traefik#126 2026-07-28 14:25:23 -03:00
fauno 1581ae6430 Merge branch 'alloy' into smartctl 2026-07-25 14:00:49 -03:00
fauno b47f1b021f fix: upgrade grafana to v13.0.3 2026-06-27 14:43:43 -03:00
fauno c6efc69859 fix: upgrade alloy to v1.17.0 2026-06-27 14:42:11 -03:00
fauno 6c529f3527 fix: upgrade to grafana v12.4.5 2026-06-27 14:37:58 -03:00
fauno 01b398ddea fix: unneeded flag 2026-06-27 14:24:59 -03:00
fauno 30ad8e54f6 fix: upgrade to alloy v1.16.3 2026-06-27 14:20:32 -03:00
fauno c9910eabf4 Merge branch 'main' of https://git.coopcloud.tech/coop-cloud/monitoring-ng into alloy 2026-06-20 23:59:20 -03:00
fauno 2972272303 fix: scrape once per hour 2026-06-20 13:09:39 -03:00
fauno 4c69cf97ab feat: systemd timer 2026-06-20 12:54:19 -03:00
fauno 1110786179 feat: smart monitoring 2026-06-19 20:34:28 -03:00
fauno 1d9eb10004 improve alloy config and match with main branch (#24)
Reviewed-on: #24
Reviewed-by: fauno <fauno@sutty.coop.ar>
2026-06-17 12:53:08 +00:00
fauno 23acf56637 fix: filter by proxy network 2026-06-16 22:01:50 -03:00
fauno 03227f1907 fix: send container metrics directly to prometheus 2026-06-16 22:01:05 -03:00
fauno d085c66d68 fix: needed labels come from docker swarm 2026-06-16 22:00:42 -03:00
fauno 1970061ff8 feat: live debugging alloy 2026-06-16 21:59:50 -03:00
fauno fa76179987 feat: enable alloy web ui 2026-06-16 21:20:29 -03:00
fauno 64cb07a4a2 feat: bearer auth support 2026-06-16 20:03:17 -03:00
dannygroenewegen e247677433 feat: scrape metrics from containers via Docker label discovery
Containers opt in with prometheus.io/scrape=true and optionally set
prometheus.io/port, prometheus.io/path, and prometheus.io/auth=basic.
2026-06-14 21:38:43 +02:00
dannygroenewegen f2310f2b86 improve alloy config and match with main branch
- Restrict Alloy UI to loopback
- Narrow volume mounts: drop /dev, reduce /var/run to docker.sock:ro
- Replace HTTP scrape of :12345 with prometheus.exporter.self
Match with main branch (node-exporter / promtail / cadvisor):
- Add docker_only and explicit enabled_metrics to cadvisor exporter
- Match node-exporter collector config
- Match promtail relabeling (container_name, container_id, stack_namespace,
  service_name) and external hostname label
- Add SYSLOG_FILES option to tail /var/log/*log (matches promtail)
- Fix journal path and syslog listener address
2026-06-13 22:07:55 +02:00
fauno f2711fa16e fix: upgrades 2026-06-03 00:19:41 -03:00
fauno 2870b9486c fix: use the actual health check path 2026-06-02 21:06:05 -03:00
fauno 3a1fabe4f9 fix: prevent redirections on health check 2026-06-02 21:04:56 -03:00
fauno a358837922 wip: relabel syslog according to docs 2026-06-02 21:00:34 -03:00
fauno dd0a0c1bb0 fixup! feat: read syslog 2026-06-02 20:19:45 -03:00
fauno 31cabc36ae fix: prevent traefik deprecation warnings 2026-06-02 19:16:49 -03:00
fauno d25986d5cb fix: README 2026-06-02 18:51:10 -03:00
fauno f8f8004445 feat: read syslog 2026-06-02 18:50:41 -03:00
fauno aa05d022da feat: optionally push to prometheus and loki 2026-06-02 18:50:20 -03:00
fauno fb52a76247 BREAKING CHANGE: deprecate node-exporter 2026-06-02 18:49:05 -03:00
fauno 2e2a52eae0 BREAKING CHANGE: deprecate promtail 2026-06-02 18:48:20 -03:00
fauno 48419d5afa fixup! BREAKING CHANGE: no need to expose exporters 2026-06-02 18:46:02 -03:00
fauno a0a6e2c509 fix: basic auth secret is always needed 2026-06-02 18:44:32 -03:00
fauno 024f2a8aec feat: send docker logs to loki 2026-06-02 18:39:24 -03:00
fauno 38095e23fa BREAKING CHANGE: no need to expose exporters 2026-06-02 18:37:56 -03:00
fauno 641161329e fix: grafana alternate domain doesn't work
the variable is not expanded and the domain name label ends up as a
literal "$DOMAIN".
2026-06-02 18:00:00 -03:00
fauno cdacfd035e fix: prometheus querying panel is accessible through basic auth 2026-06-02 17:52:25 -03:00
fauno b2d3901f61 fix: bind mounts recommended by docs 2026-06-02 13:24:28 -03:00
fauno 8becf1c1d6 fixup! feat: node exporter 2026-05-29 16:16:37 -03:00
fauno 777b1355dd fixup! feat: node exporter 2026-05-29 16:16:08 -03:00
fauno e83433cebd feat: node exporter 2026-05-29 16:04:19 -03:00
fauno a713f98ffb feat: instance name is domain 2026-05-29 16:03:59 -03:00
fauno 8dc84c591c fixup! feat: enable prometheus remote write receiver 2026-05-29 15:38:52 -03:00
fauno d9aa05a4b5 feat: send metrics to prometheus 2026-05-28 21:00:10 -03:00
fauno 349df12204 feat: enable prometheus remote write receiver 2026-05-28 20:44:00 -03:00
fauno 6c33089078 feat: cadvisor 2026-05-28 20:38:50 -03:00
fauno 4bedebfab1 BREAKING CHANGES: replace promtail and cadvisor for alloy 2026-05-28 20:33:36 -03:00
renovate-bot 60044473cb Add renovate.json 2026-03-10 17:55:43 +00:00
15 changed files with 165 additions and 8 deletions
+10
View File
@@ -58,6 +58,9 @@ SECRET_BASIC_AUTH_VERSION=v1
# COMPOSE_FILE="$COMPOSE_FILE:compose.docker-events.yml"
# Monitor physical disks health
# COMPOSE_FILE="$COMPOSE_FILE:compose.smartctl.yml"
# Monitoring Server
#
## Prometheus
@@ -130,3 +133,10 @@ SECRET_BASIC_AUTH_VERSION=v1
# Node memory usage alert will trigger when memory usage is above the given number in percent
#ALERT_NODE_MEMORY_USAGE=85
# Tell Traefik to keep access logs (could be very verbose). See Access
# logs on Traefik recipe.
#ALLOY_ACCESS_LOGS=true
#PROMETHEUS_ACCESS_LOGS=true
#LOKI_ACCESS_LOGS=true
#GRAFANA_ACCESS_LOGS=true
+1
View File
@@ -0,0 +1 @@
* @coop-cloud/monitoring-ng-maintainers
+35
View File
@@ -0,0 +1,35 @@
# Monitoring NG Recipe Maintenance
All contributions should be made via a pull request. This is to ensure a
certain quality and consistency, that others can rely on.
## Maintainer Responsibilities
A recipe maintainer has the following responsibilities:
- Respond to pull requests / issues within two weeks
- Make image security updates within a week
- Make image major updates every three months
In order to fullfill these responsibilities a recipe maintainer:
- Has to watch the repository (to get notifications)
- Needs to make sure renovate is configured properly
## Pull Requests
A pull request can be merged if it is approved by at least one maintainer. For
pull requests opened by a maintainer they need to be approved by another
maintainer. Even though it is okay to merge a pull request with one approval, it
is always better if all maintainers looked at the pull request and approved it.
## Become a maintainer
Everyone can apply to be a recipe maintainer:
1. Watch the repository to always get updates
2. Simply add your self to the list in the [README.md](./README.md) and open a new pull request with the change.
3. Once the pull request gets merged you will be added to the
[monitoring-ng maintainers
team](https://git.coopcloud.tech/org/coop-cloud/teams/monitoring-ng-maintainers).
4. Join the room
[#cc-|-monitoring-ng-maintenance:matrix.org](#cc-|-monitoring-ng-maintenance:matrix.org) and chat to other maintainers.
+9 -1
View File
@@ -7,7 +7,7 @@ It's based heavily on the [monitoring-lite](https://git.coopcloud.tech/coop-clou
Metrics and logs are collected by [Grafana Alloy](https://grafana.com/docs/alloy/latest/) and pushed to a central Prometheus/Loki (via `remote_write`/`loki push`). Every `monitoring-ng` instance runs its own Alloy, whether or not it also runs the central stack.
<!-- metadata -->
- **Maintainer**: [@coop-cloud/monitoring-ng-maintainers](https://git.coopcloud.tech/org/coop-cloud/teams/monitoring-ng-maintainers)
- **Category**: Apps
- **Status**: 2, beta
- **Image**: [`grafana/grafana`](https://hub.docker.com/r/grafana/grafana), 4, upstream
@@ -174,3 +174,11 @@ It is possible to enable the following alerts, by uncommenting the corresponding
- node disk space: `ALERT_NODE_DISK_SPACE_LEFT`
- node memory usage: `ALERT_NODE_MEMORY_USAGE`
## smart monitoring
To be able monitor hard drive health data, you need to configure
`smartd` to run on the host system, and also the
`collect-smartctl-json.sh` script provided here (via cronjob or as
a `smartd` hook). This is a limitation on Docker Swarm, which prevents
the `smartctl_exporter` from running on privileged mode.
+1 -1
View File
@@ -10,7 +10,7 @@ export PROMETHEUS_YML_VERSION=v2
export MATRIX_ALERTMANAGER_CONFIG_VERSION=v1
export MATRIX_ALERTMANAGER_ENTRYPOINT_VERSION=v1
export GF_ALERTS_NODE_VERSION=v3
export CONFIG_ALLOY_VERSION=v3
export CONFIG_ALLOY_VERSION=v11
# migrates secrets from old names to new names by reading values from the
# running containers on the server and re-inserting them under the new names.
+6
View File
@@ -0,0 +1,6 @@
[Unit]
Description=Collect SMART data
[Service]
Type=oneshot
ExecStart=/usr/local/bin/collect-smartctl-json.sh
+61
View File
@@ -0,0 +1,61 @@
#! /bin/bash
# Adapted from https://github.com/prometheus-community/smartctl_exporter/blob/master/collect-smartctl-json.sh
# Data directory to dump smartctl output
# This directory will be created if it doesn't exist
data_dir="/var/lib/smartmontools/json"
# The original script used --xall but that doesn't work
# This matches the command in readSMARTctl()
smartctl_args="--json --info --health --attributes --tolerance=verypermissive \
--nocheck=standby --format=brief --log=error"
# Ignore this devices
smartctl_ignore_dev_regex="^(/dev/bus)"
# Determine the json query tool to use
if command -v jq >/dev/null; then
json_tool="jq"
json_args="--raw-output"
elif command -v yq >/dev/null; then
json_tool="yq"
json_args="--unwrapScalar"
else
echo -e "One of 'yq' or 'jq' is required. Please try again after \
installing one of them"
exit 1
fi
if [[ ! "${UID}" -eq 0 ]] && ! command -v sudo >/dev/null; then
# Not root and sudo doesn't exist
echo "sudo does not exist. Please run this as root"
exit 1
fi
SUDO="sudo"
if [[ "${UID}" -eq 0 ]]; then
# Don't use sudo if root
SUDO=""
fi
[[ ! -d "${data_dir}" ]] && mkdir --parents "${data_dir}"
if [[ $# -ne 0 ]]; then
devices="${1}"
else
devices="$(smartctl --scan --json | "${json_tool}" "${json_args}" \
".devices[].name | select(test(\"${smartctl_ignore_dev_regex}\") | not)")"
mapfile -t devices <<< "${devices[@]}"
fi
for device in "${devices[@]}"
do
echo -n "Collecting data for '${device}'..."
# shellcheck disable=SC2086
data="$($SUDO smartctl ${smartctl_args} ${device})"
# Accommodate a smartmontools pre-7.3 bug
data=${data#" Pending defect count:"}
device_name="$(basename "${device}")"
echo -e "\tSaving to ${device_name}.json"
echo "${data}" > "${data_dir}/${device_name}.json"
done
+9
View File
@@ -0,0 +1,9 @@
[Unit]
Description=Collect SMART data
[Timer]
OnCalendar=hourly
Persistent=true
[Install]
WantedBy=timers.target
+1
View File
@@ -14,3 +14,4 @@ services:
- "traefik.http.routers.${STACK_NAME}-alloy.tls=true"
- "traefik.http.routers.${STACK_NAME}-alloy.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "traefik.http.routers.${STACK_NAME}-alloy.middlewares=basicauth@file"
- "traefik.http.routers.${STACK_NAME}-alloy.observability.accesslogs=${ALLOY_ACCESS_LOGS:-false}"
+3 -2
View File
@@ -2,7 +2,7 @@ version: '3.8'
services:
grafana:
image: grafana/grafana:13.0.6
image: grafana/grafana:13.2.3
volumes:
- grafana-data:/var/lib/grafana:rw
secrets:
@@ -39,10 +39,11 @@ services:
- "traefik.enable=true"
- "traefik.swarm.network=proxy"
- "traefik.http.services.${STACK_NAME}-grafana.loadbalancer.server.port=3000"
- "traefik.http.routers.${STACK_NAME}-grafana.rule=Host(`${GRAFANA_DOMAIN:-$DOMAIN}`)"
- "traefik.http.routers.${STACK_NAME}-grafana.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.${STACK_NAME}-grafana.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}-grafana.tls=true"
- "traefik.http.routers.${STACK_NAME}-grafana.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "traefik.http.routers.${STACK_NAME}-grafana.observability.accesslogs=${GRAFANA_ACCESS_LOGS:-false}"
healthcheck:
test: "wget -q http://localhost:3000/healthz -O/dev/null"
interval: 5s
+1
View File
@@ -34,6 +34,7 @@ services:
- "traefik.http.routers.${STACK_NAME}-loki.tls=true"
- "traefik.http.routers.${STACK_NAME}-loki.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "traefik.http.routers.${STACK_NAME}-loki.middlewares=basicauth@file"
- "traefik.http.routers.${STACK_NAME}-loki.observability.accesslogs=${LOKI_ACCESS_LOGS:-false}"
configs:
+2 -1
View File
@@ -2,7 +2,7 @@ version: '3.8'
services:
prometheus:
image: prom/prometheus:v3.12.0
image: prom/prometheus:v3.15.0
secrets:
- basic_auth
volumes:
@@ -38,6 +38,7 @@ services:
- "traefik.http.routers.${STACK_NAME}-prometheus.tls=true"
- "traefik.http.routers.${STACK_NAME}-prometheus.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "traefik.http.routers.${STACK_NAME}-prometheus.middlewares=basicauth@file"
- "traefik.http.routers.${STACK_NAME}-prometheus.observability.accesslogs=${PROMETHEUS_ACCESS_LOGS:-false}"
configs:
prometheus_yml:
+17
View File
@@ -0,0 +1,17 @@
---
version: "3.8"
services:
smartctl:
image: "prometheuscommunity/smartctl-exporter:v0.14.0"
volumes:
- "/var/lib/smartmontools/json:/debug"
command:
- "--smartctl.fake-data"
- "--smartctl.interval=1h"
networks:
- "proxy"
deploy:
labels:
- "prometheus.io/scrape=true"
- "prometheus.io/port=9633"
- "prometheus.io/path=/metrics"
+3 -3
View File
@@ -3,7 +3,7 @@ version: "3.8"
services:
app:
image: grafana/alloy:v1.18.1
image: grafana/alloy:v1.20.1
hostname: "${DOMAIN}"
configs:
- source: config_alloy
@@ -46,8 +46,8 @@ services:
test: ["CMD", "bash", "-c", "exec 3<>/dev/tcp/localhost/12345 && printf 'GET /-/ready HTTP/1.0\r\nHost: localhost\r\n\r\n' >&3 && head -1 <&3 | grep -q 200"]
interval: 5s
timeout: 10s
retries: 3
start_period: 10s
retries: 10
start_period: 30s
deploy:
restart_policy:
condition: on-failure
+6
View File
@@ -0,0 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended"
]
}