* [PATCH datacenter-manager] remove visualize_rrd.py helper script
@ 2026-03-25 12:52 Lukas Wagner
2026-03-25 16:55 ` applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Lukas Wagner @ 2026-03-25 12:52 UTC (permalink / raw)
To: pdm-devel
Mainly useful back when we did not have a working UI that could show
graphs. The script has been broken for a while, since it was never
adapted to use the HTTP-only cookie, so it seems okay to just remove it.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
---
visualize_rrd.py | 55 ------------------------------------------------
1 file changed, 55 deletions(-)
delete mode 100755 visualize_rrd.py
diff --git a/visualize_rrd.py b/visualize_rrd.py
deleted file mode 100755
index 24289a3f..00000000
--- a/visualize_rrd.py
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/usr/bin/env python3
-# deps: python3-matplotlib python3-pandas python3-requests
-#
-# Usage example:
-# ```
-# export PDM_USERNAME="root@pam"
-# export PDM_PASSWORD="<password>"
-# export PDM_URL="https://172.30.0.4:8443"
-#
-# ./visualize_rrd.py pve/remotes/<remote>/qemu/100 cpu-current
-# ./visualize_rrd.py pbs/remotes/<remote>/datastore/<store> disk-used
-# ```
-
-import os
-import sys
-
-import pandas as pd
-import matplotlib.pyplot as plt
-import requests
-
-for env_var in ["PDM_URL", "PDM_USERNAME", "PDM_PASSWORD"]:
- if not os.environ.get(env_var):
- raise Exception(f"{env_var} not set")
-
-url = os.environ["PDM_URL"]
-user = os.environ["PDM_USERNAME"]
-password = os.environ["PDM_PASSWORD"]
-
-query = sys.argv[1]
-rows = sys.argv[2:]
-
-r = requests.post(
- f"{url}/api2/json/access/ticket",
- verify=False,
- data={
- "username": user,
- "password": password
- }
-)
-
-data = r.json()['data']
-csrf = data['CSRFPreventionToken']
-ticket = data['ticket']
-
-r = requests.get(
- f"{url}/api2/json/{query}/rrddata",
- params={"cf": "AVERAGE", "timeframe": "hour"},
- cookies={"PDMAuthCookie": ticket},
- verify=False
-)
-
-data = r.json()
-df = pd.DataFrame(data['data'])
-df.plot(x='time', y=rows)
-plt.show()
--
2.47.3
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-25 17:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-25 12:52 [PATCH datacenter-manager] remove visualize_rrd.py helper script Lukas Wagner
2026-03-25 16:55 ` applied: " Thomas Lamprecht
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.