feat(web-ui): add service health graphs and core log viewer
This commit is contained in:
@@ -484,6 +484,122 @@ Control a local backend daemon (`start`, `restart`, `stop`, `update`).
|
||||
}
|
||||
```
|
||||
|
||||
#### `system.observabilitySources`
|
||||
|
||||
Return graph/log-capable observability sources for the dashboard.
|
||||
|
||||
**Request:**
|
||||
```json
|
||||
{
|
||||
"id": 15,
|
||||
"method": "system.observabilitySources"
|
||||
}
|
||||
```
|
||||
|
||||
**Response:**
|
||||
```json
|
||||
{
|
||||
"id": 15,
|
||||
"result": {
|
||||
"sources": [
|
||||
{
|
||||
"id": "systemd:flynn",
|
||||
"name": "Flynn daemon",
|
||||
"kind": "systemd_system",
|
||||
"runtime": "systemd_system",
|
||||
"status": "running",
|
||||
"graphCapable": true,
|
||||
"logCapable": true
|
||||
},
|
||||
{
|
||||
"id": "docker:whisper",
|
||||
"name": "Whisper (whisper.cpp)",
|
||||
"kind": "docker_dependency",
|
||||
"runtime": "docker_compose",
|
||||
"status": "running",
|
||||
"graphCapable": true,
|
||||
"logCapable": true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### `system.observabilitySeries`
|
||||
|
||||
Return sampled service trend points (bounded, in-memory) for dashboard charts.
|
||||
|
||||
**Request:**
|
||||
```json
|
||||
{
|
||||
"id": 16,
|
||||
"method": "system.observabilitySeries",
|
||||
"params": {
|
||||
"windowMinutes": 60,
|
||||
"bucketSeconds": 30,
|
||||
"sourceIds": ["systemd:flynn", "docker:whisper"]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Response:**
|
||||
```json
|
||||
{
|
||||
"id": 16,
|
||||
"result": {
|
||||
"generatedAt": 1739999999000,
|
||||
"windowMinutes": 60,
|
||||
"bucketSeconds": 30,
|
||||
"series": [
|
||||
{
|
||||
"sourceId": "systemd:flynn",
|
||||
"points": [
|
||||
{ "ts": 1739999970000, "stateCode": 3, "healthCode": 2, "errorCount": 0, "restartCount": 0 },
|
||||
{ "ts": 1739999985000, "stateCode": 3, "healthCode": 2, "errorCount": 0, "restartCount": 1 }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### `system.serviceLogs`
|
||||
|
||||
Return recent logs for a discovered observability source. Flynn applies secret masking heuristics to returned lines.
|
||||
|
||||
**Request:**
|
||||
```json
|
||||
{
|
||||
"id": 17,
|
||||
"method": "system.serviceLogs",
|
||||
"params": {
|
||||
"sourceId": "docker:whisper",
|
||||
"lines": 200,
|
||||
"sinceSeconds": 900
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Response:**
|
||||
```json
|
||||
{
|
||||
"id": 17,
|
||||
"result": {
|
||||
"sourceId": "docker:whisper",
|
||||
"fetchedAt": 1739999999000,
|
||||
"redacted": false,
|
||||
"truncated": false,
|
||||
"lines": [
|
||||
{
|
||||
"ts": 1739999990000,
|
||||
"level": "warn",
|
||||
"text": "queue depth rising"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Response:**
|
||||
```json
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user