🎉 Initial commit

This commit is contained in:
Jonas Bengtsson
2026-10-07 10:38:21 +02:00
commit 1c64aeb071
38 changed files with 3391 additions and 0 deletions
+42
View File
@@ -0,0 +1,42 @@
# OPC DA Diagnozer — example configuration.
# Copy to config.yaml and adjust. Every threshold below is configurable
# (defaults live in src/opcda_diagnozer/config.py; rules in docs/SPECIFICATION.md §6).
opc:
server: "Matrikon.OPC.Simulation.1" # OPC DA server ProgID
#host: "CONTROL-HOST01" # DCOM host; omit for a local server
connect_timeout_s: 10
poll:
interval_s: 1.0 # poll cadence; keep modest (read-only tool)
timeout_ms: 5000 # beyond this the call is flagged as a hang (D7)
hard_hang_s: 120 # COM thread abandoned + rebuilt after this (§10.4)
tags:
- { name: "Channel1.Device1.Counter", expect_change: true } # D13 frozen-value detection applies
- { name: "Channel1.Device1.Level" }
latency:
warn_ms: 1000 # D4 single-spike threshold
critical_ms: 5000 # D5 sustained-slow severity
slow_poll_streak: 5 # D5 consecutive slow polls
window_polls: 60 # D6 rolling window for the p95 trend
quality:
persistent_bad_s: 30 # D10 single tag BAD longer than this
flapping_transitions_per_window: 5 # D11 quality transitions per window...
flapping_window_s: 600 # ...within this window (10 min)
stale:
enabled: true
max_age_s: 120 # D12 device timestamp older than this while GOOD
report:
heartbeat_s: 300 # D15 periodic stats snapshot
jsonl:
dir: "C:/ProgramData/OPCDA-Diagnozer/logs"
max_mb: 50 # rotate after this size
backups: 10 # rotated files kept
eventlog:
source: "OPCDA-Diagnozer"
min_severity: WARN # INFO / WARN / CRITICAL