Skip to content

Prometheus metrics reference

Every metric rcfg-sim exposes, with its labels and buckets. Metric names and label keys are public API — see versioning & scope.

MetricTypeLabelsDescription
rcfgsim_active_sessionsGaugeSSH sessions currently open across all listeners
rcfgsim_sessions_totalCounterresultSessions closed, by terminal result
rcfgsim_session_duration_secondsHistogramEnd-to-end session lifetime (accept → close)
rcfgsim_command_duration_secondsHistogramcommandPer-command dispatch + response latency
rcfgsim_bytes_sent_totalCounterTotal bytes written to SSH channels
rcfgsim_auth_attempts_totalCounterresultSSH password-auth attempts, by result
rcfgsim_handshake_duration_secondsHistogramTCP accept → completed SSH handshake
rcfgsim_faults_injected_totalCountertypeFaults injected, by type

These are the closed sets pre-registered at startup:

  • rcfgsim_sessions_total{result}ok, auth_fail, disconnect, error
  • rcfgsim_auth_attempts_total{result}ok, fail
  • rcfgsim_faults_injected_total{type}auth_fail, disconnect_mid, slow_response, malformed
  • rcfgsim_command_duration_seconds{command} — the Cisco command set, pre-registered at zero: CmdUnknown, CmdEmpty, CmdAmbiguous, CmdTerminalLength, CmdTerminalPager, CmdEnable, CmdShowVersion, CmdShowRunningConfig, CmdShowStartupConfig, CmdShowInventory, CmdExit.
HistogramBuckets (seconds)
rcfgsim_session_duration_seconds0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10, 30, 60
rcfgsim_command_duration_seconds0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5
rcfgsim_handshake_duration_seconds0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5

Standard Go (go_*) and process (process_*) collectors are also registered — goroutine counts, heap and GC stats, CPU time, and open file descriptors.

See Grafana queries for ready-to-use expressions over these metrics.