Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing escapee sequence in model_family Textfiled #27

Closed
Kn0lc opened this issue Nov 4, 2024 · 1 comment
Closed

Missing escapee sequence in model_family Textfiled #27

Kn0lc opened this issue Nov 4, 2024 · 1 comment

Comments

@Kn0lc
Copy link
Contributor

Kn0lc commented Nov 4, 2024

Host operating system: output of uname -a

Linux fedora-server 6.11.4-201.fc40.x86_64 prometheus/node_exporter#1 SMP PREEMPT_DYNAMIC Sun Oct 20 15:04:22 UTC 2024 x86_64 GNU/Linux

node_exporter version: output of node_exporter --version

node_exporter, version 1.8.2 (branch: tarball, revision: 1.fc40)
build user:
build date: 20240714
go version: go1.22.5
platform: linux/amd64
tags: rpm_crashtraceback,netgo,osusergo,static_build

node_exporter command line flags

/usr/bin/prometheus-node-exporter --collector.textfile.directory /var/lib/node_exporter/textfile_collector/

node_exporter log output

Okt 24 22:28:43 fedora-server prometheus-node-exporter[20502]: ts=2024-10-24T20:28:43.595Z 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 89: unexpected end of label value "Toshiba 25""

Line 89 in the Text file:
smartmon_device_info{disk="/dev/sdl",type="sat",model_family="Toshiba 2.5" HDD MQ01ABD...",model_name="TOSHIBA MQ01ABD100",device_model="",serial_number="54EOTUN8T",firmware_version="AX001U",vendor="",product="",revision="",lun_id=""} 1

Are you running node_exporter in Docker?

not running in Docker

What did you expect to see?

node exporter can handle the character " in the model_family textfield

What did you see instead?

an error see log output

Probably a " in any textfiled should be combined with an escape sequence like " to be handled error free.

@Kn0lc Kn0lc mentioned this issue Nov 6, 2024
@micha37-martins
Copy link
Owner

Thanks for your PR. It looks good to me and I merged it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants