-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Telegraf returns divide by zero with uneven CPU core count. #17225
Copy link
Copy link
Closed
Labels
bugunexpected problem or unintended behaviorunexpected problem or unintended behaviorwaiting for responsewaiting for response from contributorwaiting for response from contributor
Description
Relevant telegraf.conf
[global_tags]
[agent]
interval = "10s"
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 10000
collection_jitter = "0s"
flush_interval = "10s"
flush_jitter = "0s"
precision = ""
debug = true
quiet = false
omit_hostname = false
[[inputs.cpu]]
percpu = true
totalcpu = true
collect_cpu_time = false
[[inputs.disk]]
[[inputs.diskio]]
[[inputs.mem]]
[[inputs.processes]]
[[inputs.system]]
[[inputs.net]]
[[inputs.ping]]
method = "exec"
binary = "ping"
urls = ['1.1.1.1']
arguments = ["-4", "-c", "4"]
[[inputs.tail]]
data_format = "json"
files = ["/var/log/suricata/eve.json"]
name_override = "suricata"
tag_keys = ["event_type","src_ip","src_port","dest_ip","dest_port"]
json_string_fields = ["*"]Logs from Telegraf
panic: runtime error: integer divide by zero
goroutine 1 [running]:
github.com/klauspost/cpuid/v2.physicalCores()
github.com/klauspost/cpuid/v2@v2.2.10/cpuid.go:881 +0xef
github.com/klauspost/cpuid/v2.addInfo(0x11247c40, 0x42?)
github.com/klauspost/cpuid/v2@v2.2.10/detect_x86.go:33 +0x1e5
github.com/klauspost/cpuid/v2.Detect()
github.com/klauspost/cpuid/v2@v2.2.10/cpuid.go:376 +0x85
github.com/klauspost/cpuid/v2.init.0()
github.com/klauspost/cpuid/v2@v2.2.10/cpuid.go:355 +0x9f
System info
Proxmox, 8 core xeon, 5 cores attatched to the VM which caused the bug), using OPNsense
Docker
No response
Steps to reproduce
- Make a VM with uneven ammount of CPU cores.
- Start Telegraf.
Expected behavior
Telegraf starts without errors.
Actual behavior
Telegraf crashes with logs indicating a divide by zero error.
Additional info
Telegraf version 1.34.4_1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugunexpected problem or unintended behaviorunexpected problem or unintended behaviorwaiting for responsewaiting for response from contributorwaiting for response from contributor