How patricks-js/vektor works
Vektor is a native Linux monitoring and control plane. Users sign in to its web dashboard, inspect live and historical host telemetry, perform host or Incus operations, and review diagnostics and alerts. The daemon exposes authenticated HTTP/SSE services and persists history in SQLite; privileged actions use a separate Unix-socket helper. The README documents major capabilities, but many implementation excerpts are absent, so several subsystem connections are shown as unverified rather than asserted as source-confirmed calls.
Main entry points: server.go HTTP and SSE API · App.tsx Dashboard app · client.go Incus API client · client.ts API client
Components 26
Web dashboard
- Dashboard app
web/src/app/App.tsx - Navigation shell
web/src/app/Shell.tsx - UI preferences
web/src/app/preferences.ts - Overview
web/src/features/overview/Overview.tsx - Host views
web/src/features/host/HostPage.tsx - Instance views
web/src/features/instances/InstanceDetail.tsx - API client
web/src/lib/api/client.ts
Daemon services
- Daemon runtime
cmd/vektord/main.go - HTTP and SSE API
internal/httpapi/server.go - Sessions and auth
internal/auth/store.go - Diagnostics
internal/diagnostics/diagnostics.go
Telemetry and state
- Linux collectors
internal/metrics/collector/discovery.go - Collection scheduler
internal/metrics/scheduler/scheduler.go - History queries
internal/history/query.go - SQLite database
internal/database/database.go - Alert evaluation
internal/alerts/evaluator.go
Host operations
- Process and service info
internal/hostmgmt/processes.go - Action audit log
internal/audit/store.go - Privileged action helper
internal/ctl/server.go - Privileged client
internal/ctl/protocol.go
Incus virtualization
- Incus API client
internal/incus/client.go - Incus HTTP handlers
internal/httpapi/incus.go - Instance management UI
web/src/features/instances/InstancesPage.tsx
Other components
- Operator
- Incus service
- Alert webhook
Connections 24
- Operator → Dashboard app: uses
README.md - Dashboard app → Navigation shell: renders
web/src/app/App.tsx - Dashboard app → UI preferences: stores settings
web/src/app/App.tsx - Dashboard app → Overview: routes to
web/src/app/App.tsx - Dashboard app → Host views: routes to
web/src/app/App.tsx - Dashboard app → Instance views: routes to
web/src/app/App.tsx - Dashboard app → API client: provides API
- API client → HTTP and SSE API: requests data
- Daemon runtime → HTTP and SSE API: serves API
- HTTP and SSE API → Sessions and auth: authenticates
- HTTP and SSE API → History queries: queries
internal/httpapi/server.go - Linux collectors → Collection scheduler: collects through
- Collection scheduler → SQLite database: persists history
README.md - History queries → SQLite database: reads history
internal/history/query.go - HTTP and SSE API → Diagnostics: serves diagnostics
README.md - Alert evaluation → Alert webhook: sends alerts
README.md - HTTP and SSE API → Process and service info: exposes host info
internal/httpapi/server.go - HTTP and SSE API → Action audit log: records actions
README.md - HTTP and SSE API → Privileged client: dispatches privileged actions
README.md - Privileged client → Privileged action helper: sends socket requests
README.md - Privileged action helper → Incus API client: executes Incus actions
internal/ctl/server.go - Incus HTTP handlers → Incus API client: uses client
- Incus API client → Incus service: calls
README.md - Instance management UI → Incus HTTP handlers: manages instances
README.md