Werk #18684: Bulk host import - error on invalid CSVs with varied field counts per row
| Component | Setup | ||
| Title | Bulk host import - error on invalid CSVs with varied field counts per row | ||
| Date | Oct 7, 2025 | ||
| Level | Trivial Change | ||
| Class | Bug Fix | ||
| Compatibility | Incompatible - Manual interaction might be required | ||
| Checkmk versions & editions |
|
The "Import hosts via CSV file" feature on the host setup page's "Hosts" menu now requires that all rows in the CSV file have a consistent number of fields. This count must match the number of fields in the title row if present, or the first data row otherwise.
Previous versions of Checkmk (earlier than 2.5) silently dropped fields that were missing in some rows but present in the first row.
For example, importing the CSV:
host_name,ipaddress,alias
server1,172.16.0.1
server2,172.16.0.2,my-alias
would cause server2 to never receive an alias because the alias column was not present in the first data row and was silently dropped. Administrators might only notice this issue when configuring the host for monitoring.
Now, the import fails with an error if any row has a different number of fields. This change prevents silent data loss during import.
If you encounter an import error due to inconsistent field counts, please ensure that all rows in your CSV file contain the same number of fields as the header or first data row before retrying the import.
After upgrading to Checkmk 2.5 or later, verify and correct your CSV files to avoid import errors caused by inconsistent row lengths.