From 8f2a9f6a3e1975d1ecc0911fba9843d1b00b5fc8 Mon Sep 17 00:00:00 2001 From: "ran.liao" Date: Fri, 3 Jul 2026 09:45:24 +0900 Subject: [PATCH 1/2] feat: support backup and restore grafana monitoring resources Add savemonitoring/restoremonitoring parameters to Backup and Restore, sending the monitoring query parameter to the webstack backup endpoint. The option is opt-in (defaults to False) to match the new webstack monitoring provider. Co-Authored-By: Claude Opus 4.8 (1M context) --- CHANGELOG.md | 4 ++++ python/mujinwebstackclient/version.py | 2 +- python/mujinwebstackclient/webstackclient.py | 6 ++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cc2ec0e..9ffb0d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.9.35 (2026-07-03) + +- Support backup and restore grafana monitoring resources. + ## 0.9.34 (2026-05-12) - Support backup calendar, logs and stats. diff --git a/python/mujinwebstackclient/version.py b/python/mujinwebstackclient/version.py index 01e31bd..e0aa97a 100644 --- a/python/mujinwebstackclient/version.py +++ b/python/mujinwebstackclient/version.py @@ -1,3 +1,3 @@ -__version__ = '0.9.34' +__version__ = '0.9.35' # Do not forget to update CHANGELOG.md diff --git a/python/mujinwebstackclient/webstackclient.py b/python/mujinwebstackclient/webstackclient.py index 20179fa..05df905 100644 --- a/python/mujinwebstackclient/webstackclient.py +++ b/python/mujinwebstackclient/webstackclient.py @@ -1083,6 +1083,7 @@ def Backup( saveeds=True, saveiodd=True, savecalendar=True, + savemonitoring=False, logentrytimerange=None, logentryids=None, logtypes=None, @@ -1107,6 +1108,7 @@ def Backup( :param saveeds: Whether we want to include eds files in the backup, defaults to True :param saveiodd: Whether we want to include iodd files in the backup, defaults to True :param savecalendar: Whether we want to include the production calendar in the backup, defaults to True + :param savemonitoring: Whether we want to include the grafana monitoring resources in the backup, defaults to False :param logentrytimerange: Timestamp range for backing up log entries, defaults to None :param logentryids: A list of log entry IDs for backing up log entries, defaults to None :param logtypes: A list of log entry types for backing up log entries, defaults to None @@ -1136,6 +1138,7 @@ def Backup( 'eds': 'true' if saveeds else 'false', 'iodd': 'true' if saveiodd else 'false', 'calendar': 'true' if savecalendar else 'false', + 'monitoring': 'true' if savemonitoring else 'false', 'logEntryTimeRange': logentrytimerange, 'logEntryIds': ','.join(logentryids) if logentryids else None, 'logTypes': ','.join(logtypes) if logtypes else None, @@ -1162,6 +1165,7 @@ def Restore( restoreeds=True, restoreiodd=True, restorecalendar=True, + restoremonitoring=False, archiveformat=None, timeout=600, ): @@ -1175,6 +1179,7 @@ def Restore( :param restoreeds: Whether we want to restore the eds files, defaults to True :param restoreiodd: Whether we want to restore the iodd files, defaults to True :param restorecalendar: Whether we want to restore the production calendar, defaults to True + :param restoremonitoring: Whether we want to restore the grafana monitoring resources, defaults to False :param archiveformat: The backup file archive format, supported values are tar.gz and zip, defaults to None :param timeout: Amount of time in seconds to wait before failing, defaults to 600 :raises WebstackClientError: If request wasn't successful @@ -1192,6 +1197,7 @@ def Restore( 'eds': 'true' if restoreeds else 'false', 'iodd': 'true' if restoreiodd else 'false', 'calendar': 'true' if restorecalendar else 'false', + 'monitoring': 'true' if restoremonitoring else 'false', 'archiveFormat': archiveformat, }, timeout=timeout, From e3852349f540fec915aed3517df23699aeb3aed1 Mon Sep 17 00:00:00 2001 From: "ran.liao" Date: Fri, 3 Jul 2026 11:18:33 +0900 Subject: [PATCH 2/2] feat: default monitoring backup and restore to enabled Co-Authored-By: Claude Opus 4.8 (1M context) --- python/mujinwebstackclient/webstackclient.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/mujinwebstackclient/webstackclient.py b/python/mujinwebstackclient/webstackclient.py index 05df905..316a541 100644 --- a/python/mujinwebstackclient/webstackclient.py +++ b/python/mujinwebstackclient/webstackclient.py @@ -1083,7 +1083,7 @@ def Backup( saveeds=True, saveiodd=True, savecalendar=True, - savemonitoring=False, + savemonitoring=True, logentrytimerange=None, logentryids=None, logtypes=None, @@ -1108,7 +1108,7 @@ def Backup( :param saveeds: Whether we want to include eds files in the backup, defaults to True :param saveiodd: Whether we want to include iodd files in the backup, defaults to True :param savecalendar: Whether we want to include the production calendar in the backup, defaults to True - :param savemonitoring: Whether we want to include the grafana monitoring resources in the backup, defaults to False + :param savemonitoring: Whether we want to include the grafana monitoring resources in the backup, defaults to True :param logentrytimerange: Timestamp range for backing up log entries, defaults to None :param logentryids: A list of log entry IDs for backing up log entries, defaults to None :param logtypes: A list of log entry types for backing up log entries, defaults to None @@ -1165,7 +1165,7 @@ def Restore( restoreeds=True, restoreiodd=True, restorecalendar=True, - restoremonitoring=False, + restoremonitoring=True, archiveformat=None, timeout=600, ): @@ -1179,7 +1179,7 @@ def Restore( :param restoreeds: Whether we want to restore the eds files, defaults to True :param restoreiodd: Whether we want to restore the iodd files, defaults to True :param restorecalendar: Whether we want to restore the production calendar, defaults to True - :param restoremonitoring: Whether we want to restore the grafana monitoring resources, defaults to False + :param restoremonitoring: Whether we want to restore the grafana monitoring resources, defaults to True :param archiveformat: The backup file archive format, supported values are tar.gz and zip, defaults to None :param timeout: Amount of time in seconds to wait before failing, defaults to 600 :raises WebstackClientError: If request wasn't successful