Skip to content

feat(slm): per-service health monitoring in SLM dashboard #1019

Closed

Description

@mrveiss

Problem

SLM currently tracks nodes but has no visibility into individual services running on each node. Services can fail silently without any logs or alerts in the dashboard.

Current State

  • SLM shows nodes: 03-AI-Stack online, but doesn't show that autobot-ai-stack service (ChromaDB) is running while the AI Stack API (port 8080) is dead
  • No per-service health status in the dashboard
  • Services fail silently (e.g., autobot-ai-stack.service crash-looped on Feb 18 with "No such file or directory" — nobody knew)

Requirements

Backend (SLM)

  1. SLM agent reports per-service status (running/stopped/failed/degraded) in heartbeat
  2. SLM backend stores service status per node
  3. API endpoint: GET /api/nodes/{node_id}/services returns service list with status
  4. Service status includes: name, status, port, last_started, error_message (if failed)

Frontend (SLM)

  1. Node detail view shows service cards with status indicators
  2. Fleet overview shows service health counts per node
  3. Failed/stopped services show red indicators with last error

Logging

  • All services must log to /var/log/autobot/<service>.log
  • Failed services must have error output captured
  • SLM agent reports last 5 lines of error log for failed services

Expected Service Inventory

Node Services Ports
.19 SLM autobot-slm-backend, postgresql, nginx, node_exporter 443, 5432, 9100
.20 Backend autobot-backend, ollama, vnc 8443, 11434, 6080
.21 Frontend nginx, node_exporter 443, 9100
.22 NPU autobot-npu-worker, node_exporter 8081, 9100
.23 Redis redis-server, node_exporter 6379, 9100
.24 AI Stack autobot-ai-stack-api (8080), chromadb (8000), node_exporter 8080, 8000, 9100
.25 Browser autobot-playwright, node_exporter 3000, 9100

Acceptance Criteria

  • SLM agent heartbeat includes service status array
  • SLM dashboard shows per-service status on node detail
  • Failed services show error context (not just "stopped")
  • No service can fail silently without appearing in dashboard

Discovered During

Systematic debugging of .24 AI Stack VM — found services running/failing with no SLM visibility.

Activity

  1. mrveiss commented on Feb 20, 2026

    @mrveiss
    OwnerAuthor

    ✅ Implemented per-service health monitoring in SLM dashboard

    Changes (2 commits: ed1f6ff, 9f986c5):

    Agent (health_collector.py):

    • Added _get_error_context() — captures last 5 journalctl lines for failed services
    • Failed services now include error_message in heartbeat extra_data.discovered_services

    Backend (reconciler.py, schemas.py, nodes.py):

    • Reconciler stores/clears error_message in Service extra_data JSON field
    • Added service_summary to NodeResponse schema (running/stopped/failed/total counts)
    • list_nodes endpoint now queries service counts per node via grouped count query
    • ServiceResponse schema includes extra_data field for frontend access

    Frontend (NodeCard.vue, NodeServicesPanel.vue, slm.ts):

    • NodeCard shows service health counts (green/gray/red dots with counts)
    • NodeServicesPanel displays expandable error context for failed services
    • SLMNode and NodeService TypeScript types updated with new fields

    Verification:

    • ✅ Ruff lint clean on all Python files
    • ✅ Pre-commit hooks (black, isort, flake8, bandit, function length) all passed
    • ✅ No schema migration needed (uses existing extra_data JSON column)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions