Closed penguinpowernz closed 8 years ago
Comments and empty lines omitted for brevity.
[global_tags] [agent] interval = "30s" round_interval = true metric_batch_size = 1000 metric_buffer_limit = 10000 collection_jitter = "0s" flush_interval = "10s" flush_jitter = "0s" precision = "" debug = false quiet = false hostname = "" omit_hostname = false [[outputs.influxdb]] urls = ["http://xxx:8086"] # required database = "madmax" # required retention_policy = "" write_consistency = "any" timeout = "5s" [[inputs.cpu]] percpu = true totalcpu = true fielddrop = ["time_*"] [[inputs.disk]] ignore_fs = ["tmpfs", "devtmpfs"] [[inputs.kernel]] [[inputs.mem]] [[inputs.processes]] [[inputs.swap]] [[inputs.system]] [[inputs.net]] [[inputs.net_response]] protocol = "tcp" address = "dns1.stabletransit.com:53" timeout = "1s" [[inputs.sensors]] [[inputs.hddtemp]]
lm-sensors
[[inputs.sensors]]
/var/log/telegraf/telegraf.log
Should parse all of the sensors -A -u output:
sensors -A -u
nouveau-pci-0100 temp1: temp1_input: 58.000 temp1_max: 95.000 temp1_max_hyst: 3.000 temp1_crit: 125.000 temp1_crit_hyst: 2.000 temp1_emergency: 135.000 temp1_emergency_hyst: 5.000 atk0110-acpi-0 Vcore Voltage: in0_input: 1.136 in0_min: 0.800 in0_max: 1.600 +3.3 Voltage: in1_input: 3.360 in1_min: 2.970 in1_max: 3.630 +5 Voltage: in2_input: 5.112 in2_min: 4.500 in2_max: 5.500 +12 Voltage: in3_input: 12.040 in3_min: 10.200 in3_max: 13.800 CPU FAN Speed: fan1_input: 1721.000 fan1_min: 600.000 fan1_max: 7200.000 CHASSIS1 FAN Speed: fan2_input: 1506.000 fan2_min: 600.000 fan2_max: 7200.000 POWER FAN Speed: fan3_input: 0.000 fan3_min: 600.000 fan3_max: 7200.000 CPU Temperature: temp1_input: 30.500 temp1_max: 60.000 temp1_crit: 95.000 MB Temperature: temp2_input: 22.000 temp2_max: 45.000 temp2_crit: 95.000 coretemp-isa-0000 Core 0: temp2_input: 32.000 temp2_max: 82.000 temp2_crit: 100.000 temp2_crit_alarm: 0.000 Core 1: temp3_input: 32.000 temp3_max: 82.000 temp3_crit: 100.000 temp3_crit_alarm: 0.000 Core 2: temp4_input: 30.000 temp4_max: 82.000 temp4_crit: 100.000 temp4_crit_alarm: 0.000 Core 3: temp5_input: 33.000 temp5_max: 82.000 temp5_crit: 100.000 temp5_crit_alarm: 0.000
It only parses the first section (chip: nouveau-pci-0100). That first section appears in the Influx database:
nouveau-pci-0100
sensors,chip=nouveau-pci-0100,feature=temp1,host=madmax
temp_crit
temp_crit_hyst
temp_emergency
temp_emergency_hyst
temp_input
temp_max
temp_max_hyst
Then it fails with the following error:
2016/09/07 09:55:30 ERROR in input [sensors]: strconv.ParseFloat: parsing "": invalid syntax
I tried to figure out how to fix it myself but couldn't quite follow the code flow.
/cc @zbindenren @md14454 (authors of the file)
Cheers :)
Could you provide the output of sensors -A -u?
Sorry updated the issue.
closed by https://github.com/influxdata/telegraf/pull/1749
Amazing! Thanks guys :)
Bug report
Relevant telegraf.conf:
Comments and empty lines omitted for brevity.
System info:
Steps to reproduce:
lm-sensors
[[inputs.sensors]]
to telegraf.conf/var/log/telegraf/telegraf.log
for errorsExpected behavior:
Should parse all of the
sensors -A -u
output:Actual behavior:
It only parses the first section (chip:
nouveau-pci-0100
). That first section appears in the Influx database:sensors,chip=nouveau-pci-0100,feature=temp1,host=madmax
temp_crit
temp_crit_hyst
temp_emergency
temp_emergency_hyst
temp_input
temp_max
temp_max_hyst
Then it fails with the following error:
Additional info:
I tried to figure out how to fix it myself but couldn't quite follow the code flow.
/cc @zbindenren @md14454 (authors of the file)
Cheers :)