prometheus / node_exporter

Exporter for machine metrics
https://prometheus.io/
Apache License 2.0
10.99k stars 2.33k forks source link

can metrics value supports parsing hexadecimal? #3100

Closed hxcccc closed 2 weeks ago

hxcccc commented 2 weeks ago

Host operating system: output of lsb_release -a LSB Version: core-11.1.0ubuntu2-noarch:printing-11.1.0ubuntu2-noarch:security-11.1.0ubuntu2-noarch Distributor ID: Ubuntu Description: Ubuntu 20.04.6 LTS Release: 20.04 Codename: focal node_exporter version: output of node_exporter --version node_exporter, version 1.3.1.6 (branch: non-git, revision: non-git)

raw data critical_warning : 0 temperature : 73 C transfer metrics nvme_smart_log{device="/dev/nvme1n1", metric="critical_warning"} 0x2 nvme_smart_log{device="/dev/nvme1n1", metric="temperature"} 73

error log node-exporter[301051]: ts=2024-08-30T03:40:30.299Z caller=textfile.go:219 level=error collector=textfile msg="failed to collect textfile data" file=vpu_info.prom err="failed to parse textfile data from \"/home/toc/SDE/node_exporter/textfile_collector/vpu_info.prom\": text format parsing error in line 110: expected float as value, got \"0x2\""

SuperQ commented 2 weeks ago

No, metrics must be float64.

hxcccc commented 2 weeks ago

What I mean is parsing hexadecimal and converting to float64