Files
Denozordec 9fa6269174
quality / changes (push) Successful in 7s
quality / commitlint (push) Skipped
quality / openapi (push) Successful in 30s
quality / web (push) Successful in 1m3s
quality / api (push) Successful in 1m15s
quality / linux-agent-smoke (push) Failing after 27s
quality / docker-check (push) Failing after 2m28s
CD / quality (push) Failing after 5m52s
CD / publish (push) Skipped
feat: harden firewall policies telemetry and operations
Implement reliable agent apply, telemetry v2, analytics retention, guarded rollouts, enrollment, labels and webhooks. Improve ReUI frontend data safety and bounded list loading, and add Docker smoke, recovery and resource checks. Document local verification and pending native acceptance.
2026-10-26 13:10:58 +07:00

28 lines
1.5 KiB
SQL

ALTER TABLE agent_telemetry_state ADD COLUMN dropped_baseline_at TEXT;
ALTER TABLE agent_telemetry_state ADD COLUMN accepted_baseline_at TEXT;
ALTER TABLE agent_stats_samples ADD COLUMN dropped_interval_start TEXT;
ALTER TABLE agent_stats_samples ADD COLUMN accepted_interval_start TEXT;
ALTER TABLE agent_stats_samples ADD COLUMN dropped_present INTEGER;
ALTER TABLE agent_stats_samples ADD COLUMN accepted_present INTEGER;
ALTER TABLE agent_stats_samples ADD COLUMN analytics_processed INTEGER NOT NULL DEFAULT 0;
CREATE INDEX idx_stats_agent_cursor ON agent_stats_samples(agent_id, recorded_at, id);
CREATE INDEX idx_stats_recorded_at ON agent_stats_samples(recorded_at);
CREATE INDEX idx_stats_analytics_pending ON agent_stats_samples(analytics_processed, recorded_at, id);
CREATE TABLE agent_stats_rollups (
agent_id TEXT NOT NULL REFERENCES agents(id) ON DELETE CASCADE,
resolution TEXT NOT NULL CHECK(resolution IN ('1m','1h','1d')),
bucket_start TEXT NOT NULL,
packets_dropped REAL NOT NULL DEFAULT 0,
packets_accepted REAL NOT NULL DEFAULT 0,
dropped_coverage_ms INTEGER NOT NULL DEFAULT 0,
accepted_coverage_ms INTEGER NOT NULL DEFAULT 0,
partial INTEGER NOT NULL DEFAULT 0,
truncated INTEGER NOT NULL DEFAULT 0,
estimated INTEGER NOT NULL DEFAULT 0,
unsupported_json TEXT NOT NULL DEFAULT '[]',
lost_reports INTEGER NOT NULL DEFAULT 0,
PRIMARY KEY(agent_id, resolution, bucket_start)
);
CREATE INDEX idx_stats_rollups_resolution_time ON agent_stats_rollups(resolution, bucket_start);