fix: disk_usage_check.sh handles inode '-' (vfat/efi), checkdefaults sets target_id
- disk_usage_check.sh: sed 's/-/0/' for filesystems without inodes - checkdefaults.Ensure: includes target_id in check_defs INSERT so signals get proper target slug instead of null
This commit is contained in:
@@ -196,9 +196,9 @@ func Ensure(ctx context.Context, tx pgx.Tx, entityID uuid.UUID, slug, entityType
|
||||
configJSON, _ := json.Marshal(configMap)
|
||||
|
||||
_, _ = tx.Exec(ctx,
|
||||
`INSERT INTO check_defs (entity_id, kind, config, interval_s, timeout_s, enabled)
|
||||
VALUES ($1, $2, $3, $4, 30, true)
|
||||
`INSERT INTO check_defs (entity_id, target_id, kind, config, interval_s, timeout_s, enabled)
|
||||
VALUES ($1, $2, $3, $4, $5, 30, true)
|
||||
ON CONFLICT (entity_id) DO NOTHING`,
|
||||
checkID, def.Kind, configJSON, DefaultInterval(def.Kind))
|
||||
checkID, entityID, def.Kind, configJSON, DefaultInterval(def.Kind))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user