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:
26
backend/db/migrate/20260611120000_create_ops_incidents.rb
Normal file
26
backend/db/migrate/20260611120000_create_ops_incidents.rb
Normal 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
|
||||
Reference in New Issue
Block a user