fix: disk_usage_check.sh handles inode '-' (vfat/efi), checkdefaults sets target_id
Some checks failed
ci / build-test (push) Has been cancelled
ci / docker-build (push) Has been cancelled

- 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:
2026-07-08 21:58:44 +02:00
parent a512d40669
commit ef00e5b8e4
2 changed files with 4 additions and 4 deletions

View File

@@ -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))
}
}