Aggiunge monitoraggio ops: health check, log scanner, dashboard e notifiche.

Introduce incidenti con dedup, job Sidekiq ogni 3 min, scan log cron, /up/deep,
dashboard /admin/ops e push ntfy; include Sentry opzionale e fix test suite.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-12 08:16:47 +02:00
parent ce8939fffb
commit 52cfffb83f
44 changed files with 1396 additions and 24 deletions

View File

@@ -0,0 +1,26 @@
class CreateOpsIncidents < ActiveRecord::Migration[7.2]
def change
create_table :ops_incidents, id: :uuid do |t|
t.string :kind, null: false
t.string :severity, null: false, default: "warning"
t.string :status, null: false, default: "open"
t.string :title, null: false
t.text :message
t.jsonb :metadata, null: false, default: {}
t.string :fingerprint, null: false
t.integer :occurrence_count, null: false, default: 1
t.datetime :first_seen_at, null: false
t.datetime :last_seen_at, null: false
t.datetime :notified_at
t.datetime :acknowledged_at
t.datetime :muted_until
t.timestamps
end
add_index :ops_incidents, :fingerprint
add_index :ops_incidents, %i[status severity]
add_index :ops_incidents, :last_seen_at
add_index :ops_incidents, %i[fingerprint status]
end
end