feat(proxmox): add journalctl streaming API endpoint for LXC containers

Add new /api/v1/proxmox/journalctl/:node/:vmid/:service endpoint that
streams real-time journalctl output from Proxmox LXC containers via
WebSocket connection. This enables live monitoring of container services
from the GoDoxy WebUI.

Implementation includes:
- New proxmox API handler with path parameter validation
- WebSocket upgrade for streaming output
- LXCCommand helper for executing commands over Proxmox VNC websocket
- LXCJournalctl wrapper for convenient journalctl -u service -f invocation
- Updated API documentation with proxmox integration
This commit is contained in:
yusing
2026-01-24 21:26:07 +08:00
parent 1793dd629f
commit ea6543b3f9
6 changed files with 298 additions and 9 deletions

View File

@@ -2076,6 +2076,48 @@ paths:
tags:
- agent
x-id: verify
/api/v1/proxmox/journalctl/{node}/{vmid}/{service}:
get:
consumes:
- application/json
description: Get journalctl output
parameters:
- in: path
name: node
required: true
type: string
- in: path
name: service
required: true
type: string
- in: path
name: vmid
required: true
type: integer
produces:
- application/json
responses:
"200":
description: Journalctl output
schema:
type: string
"400":
description: Invalid request
schema:
$ref: '#/definitions/ErrorResponse'
"403":
description: Unauthorized
schema:
$ref: '#/definitions/ErrorResponse'
"500":
description: Internal server error
schema:
$ref: '#/definitions/ErrorResponse'
summary: Get journalctl output
tags:
- proxmox
- websocket
x-id: journalctl
/auth/callback:
post:
description: Handles the callback from the provider after successful authentication