influxdata / influxdata/telegraf
inputs.disk skipped sdb drive
- Dominant language
- Go
- Stars
- 17.8k
- Forks
- 5.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 161
Description
### Relevant telegraf.conf
```toml
[[inputs.disk]]
ignore_fs = ["tmpfs", "devtmpfs", "devfs", "overlay", "aufs", "squashfs"]
```
### Logs from Telegraf
```text
This can see the sdb disk:
sudo -u infra-telegraf cat /proc/self/mounts | grep sdb
/dev/sdb1 /data/kafka xfs rw,noatime,attr2,inode64,logbufs=8,logbsize=128k,sunit=256,swidth=512,noquota 0 0
This showing nothing only sda related:
grep 'disk,device=sdb' /tmp/metrics.out
debug log can see sdb:
infra-telegraf --debug --config /etc/infra-telegraf/infra-telegraf.d/infra-base.conf --test |grep sdb|grep disk|grep -v diskio
2024-10-30T07:55:45Z I! Loading config: /etc/infra-telegraf/infra-telegraf.d/infra-base.conf
2024-10-30T07:55:45Z I! Starting Telegraf 1.32.2 brought to you by InfluxData the makers of InfluxDB
2024-10-30T07:55:45Z I! Available plugins: 235 inputs, 9 aggregators, 32 processors, 26 parsers, 62 outputs, 6 secret-stores
2024-10-30T07:55:45Z I! Loaded inputs: cpu disk diskio exec kernel mem net netstat processes smart swap system temp
2024-10-30T07:55:45Z I! Loaded aggregators:
2024-10-30T07:55:45Z I! Loaded processors:
2024-10-30T07:55:45Z I! Loaded secretstores:
2024-10-30T07:55:45Z W! Outputs are not used in testing mode!
2024-10-30T07:55:45Z I! Tags enabled: host=sfdfsfsf
2024-10-30T07:55:45Z D! [agent] Initializing plugins
2024-10-30T07:55:45Z W! DeprecationWarning: Value "false" for option "ignore_protocol_stats" of plugin "inputs.net" deprecated since version 1.27.3 and will be removed in 1.36.0: use the 'inputs.nstat' plugin instead for protocol stats
2024-10-30T07:55:45Z D! [agent] Starting service inputs
2024-10-30T07:55:46Z D! [agent] Stopping service inputs
2024-10-30T07:55:46Z D! [agent] Input channel closed
2024-10-30T07:55:46Z D! [agent] Stopped Successfully
> disk,device=sdb1,fstype=xfs,host=dsfdsfsdfdsf,mode=rw,path=/data/kafka free=25641839218688u,inodes_free=2916264436u,inodes_total=2916292608u,inodes_used=28172u,inodes_used_percent=0.0009660210337850982,total=29860699308032u,used=4218860089344u,used_percent=14.128470488329123 1730274946000000000
In the metrics output which is actually would sent it over no sdb.
```
### System info
ubuntu 22.04 with telegraf 1.24.3 or telegraf 1.32.1
### Docker
_No response_
### Steps to reproduce
Just use the above config part and it will not be reported the disk, only diskio for that specific sdb drive.
### Expected behavior
sdb drive should be shown as this command can see it:
sudo -u telegraf cat /proc/self/mounts | grep sdb
### Actual behavior
sdb totally skipped from metrics
### Additional info
_No response_
Contributor guide
Research direction
Start with the inputs.disk entry point and reproduce the difference between --test output and the emitted metrics using the provided ignore_fs configuration. Trace the disk metric filtering for the mounted /dev/sdb1 path; done when the sdb1 filesystem appears in regular output without changing the intended ignored filesystems.
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
- 38/100