I was using this in my homelab, setup via a docker container. The script output the following, which caused an error in node_exporter trying to read the *.prom that the script creates
Output in smart_metrics.prom - This occured only for 3 of the 13 drives in the server.
HELP smartmon_bad_blk_ct_lat/erl_raw_value SMART metric bad_blk_ct_lat/erl_raw_value
Error from node_exporter:
Sep 30 15:43:01 nas node_exporter[3281987]: ts=2024-09-30T15:43:01.613Z caller=textfile.go:245 level=error collector=textfile msg="failed to collect textfile data" file=smart_metrics.prom err="failed to parse textfile data from \"/var/lib/node_exporter/textfile_collector/smart_metrics.prom\": text format parsing error in line 102: invalid metric name in comment"
Removing the lines from smart_metrics.prom resolved the problem. Assuming the script just needs to be editing to replace the '/' with an underscore, or ignore this attribute.
I was using this in my homelab, setup via a docker container. The script output the following, which caused an error in node_exporter trying to read the *.prom that the script creates
Output in smart_metrics.prom - This occured only for 3 of the 13 drives in the server.
HELP smartmon_bad_blk_ct_lat/erl_raw_value SMART metric bad_blk_ct_lat/erl_raw_value
TYPE smartmon_bad_blk_ct_lat/erl_raw_value gauge
smartmon_bad_blk_ct_lat/erl_raw_value{disk="/dev/sdx",type="sat",smart_id="170"} 0
Error from node_exporter: Sep 30 15:43:01 nas node_exporter[3281987]: ts=2024-09-30T15:43:01.613Z caller=textfile.go:245 level=error collector=textfile msg="failed to collect textfile data" file=smart_metrics.prom err="failed to parse textfile data from \"/var/lib/node_exporter/textfile_collector/smart_metrics.prom\": text format parsing error in line 102: invalid metric name in comment"
Removing the lines from smart_metrics.prom resolved the problem. Assuming the script just needs to be editing to replace the '/' with an underscore, or ignore this attribute.