1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00

Merge pull request #1473 from brknkfr/fix_synapse

[synapse_]: Re-add forgotten/lost multigraph line
This commit is contained in:
Kenyon Ralph 2025-01-16 13:37:38 -08:00 committed by GitHub
commit 8ca0c1c5ec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -176,6 +176,7 @@ fetch_url -H "Authorization: Bearer ${AUTH_TOKEN}" "${SCHEME}${HOMESERVER}:${POR
ROOMS=$(fetch_url -H "Authorization: Bearer ${AUTH_TOKEN}" "${SCHEME}${HOMESERVER}:${PORT}${ADMIN_API_PATH}/v1/rooms?limit=${QUERY_LIMIT}")
REPORTS=$(fetch_url -H "Authorization: Bearer ${AUTH_TOKEN}" "${SCHEME}${HOMESERVER}:${PORT}${ADMIN_API_PATH}/v1/event_reports" | jq .total)
echo "multigraph synapse_users_${CLEANHOMESERVER}"
if total="$(jq -r .total "$USERS_FILE" | grep -E "^[0-9]+$")"; then
puppets="$(jq -r '.users[] | select(.deactivated==false) | select(.user_type!="bot")' "$USERS_FILE" | grep -c '"last_seen_ts": null')"
bots="$(jq -r '.users[] | select(.deactivated==false)' "$USERS_FILE" | grep -c '"user_type": "bot"')"