From ea07852349b35980dd99acd9cf61909fdc9c412d Mon Sep 17 00:00:00 2001 From: Linus Gasser Date: Mon, 22 Jan 2024 16:15:51 +0100 Subject: [PATCH] Fixing small issues Closes #68 Closes #69 (except the 'edit' part which I cannot find) Also updates the README.md wrt how it's deployed. --- README.md | 8 ++------ dashboards-to-provision/servers.dashboard.py | 2 +- dashboards-to-provision/services/drand.dashboard.py | 4 ++-- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 2bb8040..f05c17b 100644 --- a/README.md +++ b/README.md @@ -3,15 +3,11 @@ The user setup behind [stats.c4dt.org](https://stats.c4dt.org). At root, it contains a bunch of script to run measurement, each regularly -started by an user systemd timer, found in `.config`. +started by a user systemd timer, found in `.config`. The timers output the results in a graphite database and shown in a grafana. Both are handle by the root `docker-compose.yaml`. To add or modify grafana's panels, look in `data/grafana`. -Deployment is done via Github Actions, which do: - -- rsync of the repo to the home directory of the user on the stats' server -- stop all timers of the user -- start timers in the repo +Deployment is done via ansible: [stats role](https://github.com/c4dt/ansible-config/tree/main/playbooks/roles/stats) If you need help with systemd, there is a [Systemd Cheatsheet](README.systemd.md) diff --git a/dashboards-to-provision/servers.dashboard.py b/dashboards-to-provision/servers.dashboard.py index f57d775..aa42032 100644 --- a/dashboards-to-provision/servers.dashboard.py +++ b/dashboards-to-provision/servers.dashboard.py @@ -33,7 +33,7 @@ def target(server_name: str) -> InfluxDBTarget: |> filter(fn: (r) => r.host == "{server_name}") |> filter(fn: (r) => r._field == "used_percent") |> keep(columns: ["_time", "_value", "path"]) - |> last() + |> aggregateWindow(every: 1h, fn: mean) """, ) diff --git a/dashboards-to-provision/services/drand.dashboard.py b/dashboards-to-provision/services/drand.dashboard.py index a5319bb..8e267f8 100644 --- a/dashboards-to-provision/services/drand.dashboard.py +++ b/dashboards-to-provision/services/drand.dashboard.py @@ -29,9 +29,9 @@ "drand: CPU usage", Target(target="drand.get-cpu-percentage"), GridPos(h=8, w=12, x=12, y=8), - UNITS.PERCENT_FORMAT, + UNITS.NO_FORMAT, frequency=1 * 60, - alert_at=1.5, + alert_at=10, ), simple_graph( "drand.c4dt.org: TTY activity",