-
Notifications
You must be signed in to change notification settings - Fork 0
Operations and Plugins en
EnerOS Bot edited this page Jul 5, 2026
·
1 revision
中文 | English
Maintained version: v0.51.2 | Last updated: 2026-07-06
EnerOS v0.40.0 introduced production-grade operations automation (SRE-style), v0.27.0 introduced the plugin system (v0.28.0 added process isolation). This page summarizes both subsystems; for full config see ADR-0008 + ADR-0003 + the main repo docs/deployment.md §3.5 + docs/plugin-development.md.
| Category | Endpoints |
|---|---|
| SLO |
/api/v1/ops/slo / /api/v1/ops/slo/burn-rate
|
| AIOps |
/api/v1/ops/aiops/alerts / /api/v1/ops/aiops/topology
|
| Incident |
/api/v1/ops/incidents / /api/v1/ops/incidents/{id}/runbook
|
| Oncall |
/api/v1/ops/oncall/shifts / /api/v1/ops/oncall/overrides
|
| Runbook |
/api/v1/ops/runbooks / /api/v1/ops/runbooks/{name}/execute
|
| Capacity |
/api/v1/ops/capacity/forecast / /api/v1/ops/capacity/thresholds
|
| Autoscaler |
/api/v1/ops/autoscaler/status / /api/v1/ops/autoscaler/scale
|
| Backup |
/api/v1/ops/backup/run / /api/v1/ops/backup/restore / /api/v1/ops/backup/drill
|
| Notification | /api/v1/ops/notify |
| Daemon | Binary | Responsibility |
|---|---|---|
| AutoScaler | eneros-autoscaler | Periodic check + decision + execute scaling |
| Backup | eneros-backup | cron-triggered backup + drill + cleanup |
| Oncall | eneros-oncall | Subscribe events + query schedule + notify + SLA escalation |
Disabled by default (OpsConfig.enabled = false); when unconfigured, all ops endpoints return 501.
[ops]
enabled = true
[ops.slo.slos]
name = "scada_availability"
target = 0.999
window = "30d"
[ops.aiops]
dedup_window_secs = 60
topology_threshold = 3
[ops.incident]
p0_sla_secs = 300
p1_sla_secs = 900
p2_sla_secs = 3600
p3_sla_secs = 14400
[ops.autoscaler]
min_instances = 1
max_instances = 10
scale_up_threshold = 100
scale_down_threshold = 10
[ops.backup]
backup_dir = "/var/backups/eneros"
cron = "0 2 * * *"
retention_days = 30
drill_enabled = true
drill_cron = "0 3 * * 0"- Frequency: Daily at 2 AM; adjust to every 12 hours for large data volumes
- Retention: 30 days (production recommendation ≥ 90 days)
- Drill: Sunday 3 AM isolated drill
-
Paths:
/var/lib/eneros(runtime state) +/etc/eneros(config) +/var/log/eneros/audit(audit log) - Verification: SHA-256 computed per file; auto-verified on restore
- Triggers: QueueDepth / SloBurnRate / CpuUsage / MemoryUsage
- Cooldown: Scale-up 300s / scale-down 600s (more conservative for scale-down)
- Double confirmation: Scale-down delayed 300s for confirmation, preventing false scale-down from transient fluctuation
| Type | trait | Permission cap | Purpose |
|---|---|---|---|
| Protocol | ProtocolPlugin |
Device access | Protocol adapter extension |
| Agent | AgentPlugin |
Operator | Agent strategy extension |
| Analysis | AnalysisPlugin |
Read-only analysis | Analysis module extension |
| Mode | Startup | Isolation | Use case |
|---|---|---|---|
| Inline | In-process load | None | Dev/debug |
| Daemon | plugin-daemon standalone process | seccomp + cgroups | Production |
In Daemon mode, plugin crashes do not affect the main process; plugin-daemon restarts them.
Production plugins must pass Ed25519 signature verification, reusing v0.22.0 OTA signing infrastructure:
# Generate key pair
enerosctl plugin gen-keys --output /etc/eneros/keys/
# Sign plugin
enerosctl plugin sign ./libmy_plugin.so /etc/eneros/keys/private.key
# Verify signature
enerosctl plugin verify ./libmy_plugin.so /etc/eneros/keys/public.pub[plugin]
name = "iec104-driver"
version = "1.2.0"
api_version = "0.28.0"
plugin_type = "Protocol"
description = "IEC 104 protocol driver"
author = "EnerOS"
[dependencies]
plugins = ["core-mbus"]
[security]
signer = "eneros-trusted"- 0.x versions: Compare MINOR version; same MINOR = compatible
- 1.x+ versions: Compare MAJOR version; same MAJOR = compatible
- Plugin manifest spec
- Signature chain
- Compatibility matrix
- Online download and install
- AIOps only alert dedup and topology correlation; root cause analysis (RCA) not integrated
- Runbook only YAML scripts; graphical orchestration not supported
- Plugin sandbox only seccomp syscall filtering; seccomp-bpf bytecode customization not supported
- Plugin marketplace only manifest browsing; paid distribution not supported
- ADR-0008 Operations Automation
- ADR-0003 Plugin Process Isolation
- HA and MultiRegion — Operations with HA
-
Configuration Reference —
[ops]section config - Main repo docs/deployment.md §3.5 — Operations deployment config
- Main repo docs/plugin-development.md — Plugin development guide
- Main repo crates/eneros-ops/ — Operations source
- Main repo crates/eneros-plugin/ — Plugin source
EnerOS Wiki | v0.51.2