Skip to content

viable-systems/vsm-telemetry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vsm_telemetry

Phoenix LiveView application that collects and displays metrics for all 5 VSM subsystems. Exports Prometheus metrics and provides a web dashboard.

Status

  • Version: 0.1.0
  • Phoenix application with LiveView dashboard
  • Prometheus export via prometheus_ex and prometheus_plugs
  • 2 test files; coverage unknown
  • Depends on vsm_core via path dependency when standalone

What it does

Runs 5 supervisor trees (one per VSM subsystem), each containing monitoring GenServers that collect metrics. Exposes those metrics via Prometheus at /metrics and renders them in a LiveView dashboard at /.

Architecture

VSM System Monitors Metrics
System 1 (Operations) OperationalMonitor, PerformanceTracker, ResourceMonitor Response time, throughput, resource utilization
System 2 (Coordination) ChannelMonitor, CoordinationMonitor, VarietyManager Coordination efficiency, channel capacity, variety handling
System 3 (Control) ControlMonitor, AuditManager, OptimizationEngine Control effectiveness, audit compliance, optimization
System 4 (Intelligence) EnvironmentScanner, FutureProjector, ThreatAnalyzer Environmental awareness, future readiness
System 5 (Policy) IdentityManager, PolicyMonitor, StrategicPlanner Policy coherence, identity, strategic alignment

Additional components:

Module Purpose
Metrics Registers Prometheus histograms, counters, and summaries
MetricsCollector Central aggregation point
PrometheusExporter Formats metrics for Prometheus scraping
AlgedonicChannel Urgent bypass signal channel
VarietyCalculator Computes variety metrics
DashboardLive Main LiveView dashboard
SystemLive Per-system detail view

Endpoints

Path Description
/ LiveView dashboard
/metrics Prometheus metrics endpoint
/dev/dashboard Phoenix LiveDashboard (dev only)

Prometheus metrics registered

  • vsm_response_time - histogram with system/operation labels
  • vsm_processing_time - histogram with system/task_type labels
  • vsm_operations_total - counter with system/operation/status labels
  • vsm_errors_total - counter with system/error_type labels
  • vsm_messages_total - counter with from_system/to_system/message_type labels
  • vsm_variety_absorbed - summary per system
  • vsm_coordination_lag - summary between systems

Setup

mix deps.get
cd assets && npm install && cd ..
mix phx.server
# Visit http://localhost:4000

Configuration

  • config/config.exs - general settings
  • config/dev.exs - development (port, live reload)
  • config/prod.exs - production (requires SECRET_KEY_BASE, PHX_HOST, PORT env vars)

Limitations

  • Monitor GenServers exist but it is unclear whether they emit real metrics or placeholder values
  • No database; metrics are in-memory only
  • VarietyCalculator has tests but the 15 monitor modules do not
  • Path dependency on vsm_core prevents standalone Hex installation
  • No Grafana dashboards or alerting rules included

License

MIT

About

Observability and metrics collection system for Viable System Model implementations

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors