From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 197381FF13B for ; Wed, 25 Mar 2026 13:52:20 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 26AB117A97; Wed, 25 Mar 2026 13:52:41 +0100 (CET) From: Lukas Wagner To: pdm-devel@lists.proxmox.com Subject: [PATCH datacenter-manager] remove visualize_rrd.py helper script Date: Wed, 25 Mar 2026 13:52:04 +0100 Message-ID: <20260325125204.245242-1-l.wagner@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1774443078629 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.573 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment NUMERIC_HTTP_ADDR 1.242 Uses a numeric IP address in URL SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record WEIRD_PORT 0.001 Uses non-standard port number for HTTP Message-ID-Hash: 2IXRN3VL2CPF3TIO3P4ZXOWITLOTXKP2 X-Message-ID-Hash: 2IXRN3VL2CPF3TIO3P4ZXOWITLOTXKP2 X-MailFrom: l.wagner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 --- 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="" -# export PDM_URL="https://172.30.0.4:8443" -# -# ./visualize_rrd.py pve/remotes//qemu/100 cpu-current -# ./visualize_rrd.py pbs/remotes//datastore/ 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