Resolved.
It was the trailing whitespace in the myspace.prom file to cause the error.
I killed the node_exporter process and restarted it from CLI. After the starting lines, I got the error:
Searching the web, I found: https://github.com/prometheus/common/issues/33. In short: the node-exporter textfile parser does not tolerate trailing whitespaces.
It was the trailing whitespace in the myspace.prom file to cause the error.
I killed the node_exporter process and restarted it from CLI. After the starting lines, I got the error:
Quotets=2025-02-06T11:14:06.216Z caller=textfile.go:245 level=error collector=textfile msg="failed to collect textfile data" file=myfile.prom err="failed to parse textfile data from \"/var/tmp/node_exporter/myfile.prom\": text format parsing error in line 3: expected integer as timestamp, got \"\""
Searching the web, I found: https://github.com/prometheus/common/issues/33. In short: the node-exporter textfile parser does not tolerate trailing whitespaces.