influxdata / influxdata/telegraf

Freebsd "ipmitool" error with "use_cache"

Open
#16,348 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
17.8k
Forks
5.8k
Avg merge
1d 20h
Merged PRs (30d)
161

Description

### Relevant telegraf.conf

```toml
[[inputs.ipmi_sensor]]
interval = "60s" timeout = "20s"
use_sudo = true
metric_version = 2
use_cache = true
```

### Logs from Telegraf

```text
E! [inputs.ipmi_sensor] Error in plugin: failed to run command "sudo -n /usr/local/bin/ipmitool sdr -S /tmp/_ipmi_
cache elist": exit status 1 - Invalid SDR command: -S
```

### System info

Telegraf 1.33? Freebsd 14.2

### Docker

_No response_

### Steps to reproduce

telegraf-1.33.0 Time-series data collection
ipmitool-1.8.19_2 CLI to manage IPMI systems

### Expected behavior

/usr/local/bin/ipmitool -S /tmp/_ipmi_cache sdr
SysHealth_Stat | 0x00 | ok
01-Inlet Ambient | 19 degrees C | ok
02-CPU 1 | 40 degrees C | ok
03-P1 DIMM 1-4 | 28 degrees C | ok
04-HD Max | 35 degrees C | ok

Note the position of -S is before "sdr" this works.

### Actual behavior

/usr/local/bin/ipmitool sdr -S /tmp/_ipmi_cache
Invalid SDR command: -S

This is the command as used by telegraf, note the position of the -S

### Additional info

The thing works on linux:
telegraf/unknown,now 1.33.0-1 amd64 [installed]
ipmitool/stable,now 1.8.19-4+deb12u2 amd64 [installed]

Contributor guide

Open the contributing guide

Research direction

Start at the inputs.ipmi_sensor plugin and trace how the ipmitool command is assembled when use_cache is enabled, comparing the FreeBSD command shown in the logs with the expected ordering. Check existing ipmi_sensor tests or add coverage for the command form, then verify that the cache option works with the reported FreeBSD ipmitool version.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
observability-sre
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.