self.prometheus.publish_info(self.app.name, PORT)
def _on_backup_action(self, event: EventBase) -> NoReturn:
- url = f"http://{self.model.app.name}:{PORT}/api/v2/admin/tsdb/snapshot"
+ url = f"http://{self.model.app.name}:{PORT}/api/v1/admin/tsdb/snapshot"
result = requests.post(url)
if result.status_code == 200:
event.set_results({"backup-name": result.json()["name"]})
else:
- event.fail(f"status-code: {result.status_code}, result: {result.json()}")
+ event.fail(f"status-code: {result.status_code}")
def _build_files(self, config: ConfigModel):
files_builder = FilesV3Builder()